aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2016-09-30 20:28:22 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2016-09-30 20:43:13 +0200
commitaf2db33a0ebab98700c3c03ea84a6ba9b987c5b5 (patch)
tree0b789b555d1d62af4e80aea8d802998a32573ad3
parent095442c4bdf437531eae2aecd364e74d756757fd (diff)
Preparing the experimental branch for improved Danube CI/CD experimentsexperimental
Fast forwarded to commit:cf93e6ee11c96de090b04196cc96b4a6b0948928 Change-Id: I13d10d870e8ffc7317ab03f8810592d5b2205875 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
-rw-r--r--INFO12
-rw-r--r--LICENSE.rst8
-rw-r--r--README10
-rw-r--r--build/Makefile259
-rw-r--r--build/README22
-rw-r--r--build/add_opnfv_packages23
-rw-r--r--build/apply_patches18
-rw-r--r--build/cache.mk55
-rwxr-xr-xbuild/cache.sh203
-rwxr-xr-xbuild/check_dependencies.sh41
-rw-r--r--build/config.mk41
-rw-r--r--build/docker/Dockerfile43
-rw-r--r--build/docker/Makefile42
-rw-r--r--build/docker/README25
-rwxr-xr-xbuild/docker/runcontext130
-rwxr-xr-xbuild/docker/ubuntu-builder/install_docker.sh36
-rwxr-xr-xbuild/docker/ubuntu-builder/setcontext20
-rw-r--r--build/f_isoroot/Makefile51
-rw-r--r--build/f_isoroot/README16
-rw-r--r--build/f_isoroot/cache.mk37
-rw-r--r--build/f_isoroot/f_bgpvpn-pluginbuild/Makefile91
-rw-r--r--build/f_isoroot/f_bgpvpn-pluginbuild/config.mk12
-rw-r--r--build/f_isoroot/f_bootstrap/Makefile46
-rw-r--r--build/f_isoroot/f_bootstrap/README24
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh14
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh34
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh14
-rw-r--r--build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile91
-rw-r--r--build/f_isoroot/f_collectd-ceilometer-pluginbuild/config.mk13
-rw-r--r--build/f_isoroot/f_collectd-ceilometer-pluginbuild/packages.yaml9
-rw-r--r--build/f_isoroot/f_isolinux/Makefile49
-rw-r--r--build/f_isoroot/f_kscfg/Makefile50
-rw-r--r--build/f_isoroot/f_kscfg/README18
-rw-r--r--build/f_isoroot/f_kscfg/ks.cfg.patch31
-rw-r--r--build/f_isoroot/f_kvm-pluginbuild/Makefile92
-rw-r--r--build/f_isoroot/f_kvm-pluginbuild/config.mk12
-rw-r--r--build/f_isoroot/f_odlpluginbuild/Makefile82
-rw-r--r--build/f_isoroot/f_odlpluginbuild/config.mk16
-rw-r--r--build/f_isoroot/f_onosfwpluginbuild/Makefile90
-rw-r--r--build/f_isoroot/f_onosfwpluginbuild/config.mk11
-rw-r--r--build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile91
-rw-r--r--build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk12
-rw-r--r--build/f_isoroot/f_repobuild/Makefile91
-rw-r--r--build/f_isoroot/f_repobuild/config.mk13
-rw-r--r--build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml75
-rwxr-xr-xbuild/f_isoroot/f_repobuild/opnfv_mirror_conf.py57
-rwxr-xr-xbuild/f_isoroot/f_repobuild/select_ubuntu_repo.sh40
-rw-r--r--build/f_isoroot/f_vsperfpluginbuild/Makefile92
-rw-r--r--build/f_isoroot/f_vsperfpluginbuild/config.mk12
-rw-r--r--build/f_isoroot/f_yardstick-pluginbuild/Makefile92
-rw-r--r--build/f_isoroot/f_yardstick-pluginbuild/config.mk13
-rwxr-xr-xbuild/fuel_build_loop31
-rw-r--r--build/install/apt-ftparchive-deb.conf35
-rw-r--r--build/install/apt-ftparchive-release.conf18
-rw-r--r--build/install/apt-ftparchive-udeb.conf33
-rwxr-xr-xbuild/install/install.sh482
-rwxr-xr-xbuild/install/uninstall.sh79
-rw-r--r--build/patch-packages/Makefile26
-rwxr-xr-xbuild/patch-packages/tools/correct_deps78
-rwxr-xr-xbuild/patch-packages/tools/deb_pack63
-rwxr-xr-xbuild/patch-packages/tools/deb_unpack58
-rwxr-xr-xbuild/patch-packages/tools/udeb_pack38
-rwxr-xr-xbuild/patch-packages/tools/udeb_unpack58
-rw-r--r--build/patch-packages/tr_example/Makefile30
-rw-r--r--build/patch-repos/0010-bootstrap_admin_node.sh.patch83
-rw-r--r--build/patch-repos/0020-isolinux.cfg.patch21
-rw-r--r--build/patch-repos/0030-repo-multi-arch-local-mirrors.patch59
-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--build/patch-repos/build/repos/fuel-library/0001-Reduce-ceilometer-memory-usage.patch30
-rw-r--r--build/patch-repos/build/repos/fuel-nailgun/0010-Mark-Intel-82599-10-Gigabit-NIC-as-DPDK-capable.patch22
-rwxr-xr-xbuild/repo_info.sh63
-rwxr-xr-xbuild/select_closest_fuel_mirror.py35
-rw-r--r--ci/README101
-rwxr-xr-xci/build.sh269
-rwxr-xr-xci/clean_cache.sh38
-rwxr-xr-xci/deploy.sh264
-rw-r--r--deploy/README171
-rw-r--r--deploy/README.templater371
-rw-r--r--deploy/__init__.py8
-rw-r--r--deploy/cloud/configure_environment.py73
-rw-r--r--deploy/cloud/configure_network.py69
-rw-r--r--deploy/cloud/configure_nodes.py202
-rw-r--r--deploy/cloud/configure_settings.py75
-rw-r--r--deploy/cloud/deploy.py112
-rw-r--r--deploy/cloud/deployment.py232
-rw-r--r--deploy/common.py202
-rw-r--r--deploy/config/dea_base.yaml801
-rw-r--r--deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml255
-rw-r--r--deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml109
-rw-r--r--deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml252
-rw-r--r--deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml110
-rw-r--r--deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml253
-rw-r--r--deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml47
-rw-r--r--deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml251
-rw-r--r--deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml110
-rw-r--r--deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml22
-rw-r--r--deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml31
-rw-r--r--deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml30
-rw-r--r--deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml30
-rw-r--r--deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml27
-rw-r--r--deploy/config/plugins/fuel-nfvkvm_0.0.2.yaml34
-rw-r--r--deploy/config/plugins/fuel-nfvkvm_0.9.0.yaml34
-rw-r--r--deploy/config/plugins/fuel-nfvovs_0.0.1.yaml28
-rw-r--r--deploy/config/plugins/fuel-nfvovs_0.0.2.yaml35
-rw-r--r--deploy/config/plugins/fuel-nshovs_0.0.1.yaml44
-rw-r--r--deploy/config/plugins/fuel-nshovs_0.9.0.yaml37
-rw-r--r--deploy/config/plugins/fuel-odl_0.0.1.yaml91
-rw-r--r--deploy/config/plugins/fuel-odl_0.0.2.yaml91
-rw-r--r--deploy/config/plugins/fuel-odl_0.0.3.yaml117
-rw-r--r--deploy/config/plugins/fuel-odl_0.9.0.yaml143
-rw-r--r--deploy/config/plugins/fuel-onos_0.0.1.yaml33
-rw-r--r--deploy/config/plugins/fuel-onos_0.0.2.yaml33
-rw-r--r--deploy/config/plugins/fuel-onos_0.0.3.yaml38
-rw-r--r--deploy/dea.py105
-rw-r--r--deploy/deploy-config.py467
-rwxr-xr-xdeploy/deploy.py423
-rw-r--r--deploy/deploy_env.py285
-rw-r--r--deploy/dha.py38
-rw-r--r--deploy/dha_adapters/__init__.py8
-rw-r--r--deploy/dha_adapters/amt_adapter.py100
-rw-r--r--deploy/dha_adapters/hardware_adapter.py65
-rw-r--r--deploy/dha_adapters/hp_adapter.py37
-rw-r--r--deploy/dha_adapters/ipmi_adapter.py114
-rw-r--r--deploy/dha_adapters/libvirt_adapter.py173
-rw-r--r--deploy/dha_adapters/zte_adapter.py32
-rw-r--r--deploy/environments/__init__.py8
-rw-r--r--deploy/environments/execution_environment.py100
-rw-r--r--deploy/environments/libvirt_environment.py107
-rw-r--r--deploy/environments/virtual_fuel.py143
-rw-r--r--deploy/execution_environment.py37
-rw-r--r--deploy/fuel_patch/ks.cfg.patch19
-rw-r--r--deploy/install_fuel_master.py222
-rw-r--r--deploy/reap.py413
-rw-r--r--deploy/scenario/README159
-rw-r--r--deploy/scenario/ha_heat_ceilometer_scenario.yaml86
-rw-r--r--deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml173
-rw-r--r--deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml134
-rw-r--r--deploy/scenario/ha_odl-bgpvpn_scenario.yaml104
-rw-r--r--deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml104
-rw-r--r--deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml119
-rw-r--r--deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml120
-rw-r--r--deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml115
-rw-r--r--deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml95
-rw-r--r--deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml129
-rw-r--r--deploy/scenario/no-ha_heat_ceilometer_scenario.yaml62
-rw-r--r--deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml151
-rw-r--r--deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml114
-rw-r--r--deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml112
-rw-r--r--deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml81
-rw-r--r--deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml82
-rw-r--r--deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml98
-rw-r--r--deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml97
-rw-r--r--deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml93
-rw-r--r--deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml73
-rw-r--r--deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml103
-rw-r--r--deploy/scenario/scenario.yaml83
-rw-r--r--deploy/ssh_client.py103
-rwxr-xr-xdeploy/templater.py204
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/networks/fuel1.xml12
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/networks/fuel2.xml5
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/networks/fuel3.xml5
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/networks/fuel4.xml12
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml91
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml91
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml93
-rw-r--r--deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml91
-rw-r--r--deploy/templates/hardware_environment/vms/fuel.xml91
-rw-r--r--deploy/templates/intel/virtual_environment/noha/networks/fuel1.xml12
-rw-r--r--deploy/templates/intel/virtual_environment/noha/networks/fuel2.xml5
-rw-r--r--deploy/templates/intel/virtual_environment/noha/networks/fuel3.xml5
-rw-r--r--deploy/templates/intel/virtual_environment/noha/networks/fuel4.xml12
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/compute.xml91
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/controller.xml91
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/fuel.xml93
-rw-r--r--deploy/templates/plugins/.gitkeep0
-rw-r--r--deploy/templates/templater/base_dea_template.yaml24
-rw-r--r--deploy/templates/virtual_environment/networks/fuel1.xml12
-rw-r--r--deploy/templates/virtual_environment/networks/fuel2.xml6
-rw-r--r--deploy/templates/virtual_environment/networks/fuel3.xml5
-rw-r--r--deploy/templates/virtual_environment/networks/fuel4.xml12
-rw-r--r--deploy/templates/virtual_environment/vms/compute.xml67
-rw-r--r--deploy/templates/virtual_environment/vms/controller.xml64
-rw-r--r--deploy/templates/virtual_environment/vms/fuel.xml64
-rw-r--r--deploy/templates/virtual_environment_noha/networks/fuel1.xml12
-rw-r--r--deploy/templates/virtual_environment_noha/networks/fuel2.xml5
-rw-r--r--deploy/templates/virtual_environment_noha/networks/fuel3.xml5
-rw-r--r--deploy/templates/virtual_environment_noha/networks/fuel4.xml12
-rw-r--r--deploy/templates/virtual_environment_noha/vms/compute.xml64
-rw-r--r--deploy/templates/virtual_environment_noha/vms/controller.xml64
-rw-r--r--deploy/templates/virtual_environment_noha/vms/fuel.xml65
-rw-r--r--deploy/transplant_fuel_settings.py116
-rw-r--r--docs/buildprocedure/build.instruction.rst305
-rw-r--r--docs/buildprocedure/index.rst16
-rw-r--r--docs/conf.py28
-rw-r--r--docs/installationprocedure/img/addnodes.pngbin0 -> 24089 bytes
-rw-r--r--docs/installationprocedure/img/compute.pngbin0 -> 25978 bytes
-rw-r--r--docs/installationprocedure/img/computelist.pngbin0 -> 67975 bytes
-rw-r--r--docs/installationprocedure/img/fuelconsole1.pngbin0 -> 8269 bytes
-rw-r--r--docs/installationprocedure/img/fuelmenu1.pngbin0 -> 9276 bytes
-rw-r--r--docs/installationprocedure/img/fuelmenu2.pngbin0 -> 9774 bytes
-rw-r--r--docs/installationprocedure/img/fuelmenu3.pngbin0 -> 9783 bytes
-rw-r--r--docs/installationprocedure/img/fuelmenu4.pngbin0 -> 8843 bytes
-rw-r--r--docs/installationprocedure/img/fuelmenu5.pngbin0 -> 20442 bytes
-rw-r--r--docs/installationprocedure/img/fuelmenu6.pngbin0 -> 10322 bytes
-rw-r--r--docs/installationprocedure/img/grub-1.pngbin0 -> 388991 bytes
-rw-r--r--docs/installationprocedure/img/health.pngbin0 -> 51840 bytes
-rw-r--r--docs/installationprocedure/img/interfaceconf.pngbin0 -> 25676 bytes
-rw-r--r--docs/installationprocedure/img/interfaces.pngbin0 -> 58851 bytes
-rw-r--r--docs/installationprocedure/img/network.pngbin0 -> 55423 bytes
-rw-r--r--docs/installationprocedure/img/neutronl3.pngbin0 -> 40478 bytes
-rw-r--r--docs/installationprocedure/img/newenv.pngbin0 -> 37483 bytes
-rw-r--r--docs/installationprocedure/img/nodes.pngbin0 -> 9155 bytes
-rw-r--r--docs/installationprocedure/img/offloadingmodes.pngbin0 -> 23017 bytes
-rw-r--r--docs/installationprocedure/img/other.pngbin0 -> 41526 bytes
-rw-r--r--docs/installationprocedure/img/plugin_install.pngbin0 -> 17431 bytes
-rw-r--r--docs/installationprocedure/img/plugins.pngbin0 -> 52382 bytes
-rw-r--r--docs/installationprocedure/img/verifynet.pngbin0 -> 33162 bytes
-rw-r--r--docs/installationprocedure/index.rst15
-rw-r--r--docs/installationprocedure/installation.instruction.rst691
-rw-r--r--docs/releasenotes/index.rst16
-rw-r--r--docs/releasenotes/release-notes.rst260
-rw-r--r--onboarding.txt7
-rw-r--r--prototypes/sfc_tacker/README54
-rwxr-xr-xprototypes/sfc_tacker/poc.tacker-up.sh385
225 files changed, 18021 insertions, 5 deletions
diff --git a/INFO b/INFO
index 892db0756..37a1e3cf3 100644
--- a/INFO
+++ b/INFO
@@ -2,8 +2,8 @@ Project: Fuel based OPNFV installer (Fuel@OPNFV)
Project Creation Date: 2015.07.07
Project Category: Integration and testing
Lifecycle State: Incubation
-Primary Contact: jonas.bjurel@ericsson.com
-Project Lead: jonas.bjurel@ericsson.com
+Primary Contact: gelkinbard@mirantis.com
+Project Lead: gelkinbard@mirantis.com
Jira Project Name: Fuel based OPNFV installer
Jira Project Prefix: FUEL
Mailing list tag: [fuel]
@@ -11,12 +11,16 @@ IRC: Server:freenode.net Channel:#opnfv-fuel
Repository: fuel
Committers:
+gelkinbard@mirantis.com
+nikolas.hermanns@ericsson.com
jonas.bjurel@ericsson.com
stefan.k.berg@ericsson.com
daniel.smith@ericsson.com
-szilard.cserey@ericsson.com
+szilard.cserey@gmail.com
mskalski@mirantis.com
ruijing.guo@intel.com
+fzhadaev@mirantis.com
+Alexandru.Avadanii@enea.com
Link to TSC approval of the project: http://meetbot.opnfv.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-07-07-13.59.log.html
-Link(s) to approval of additional committers:
+Link(s) to approval of additional committers: http://ircbot.wl.linuxfoundation.org/meetings/opnfv-fuel/2016/opnfv-fuel.2016-04-28-11.49.html
diff --git a/LICENSE.rst b/LICENSE.rst
index efee103a7..67ef17d2a 100644
--- a/LICENSE.rst
+++ b/LICENSE.rst
@@ -1,4 +1,10 @@
-Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
+LICENSE
+=======
+This document is protected/licensed under the following conditions
+(c) Jonas Bjurel (Ericsson AB)
+Licensed under a Creative Commons Attribution 4.0 International License.
+You should have received a copy of the license along with this work.
+If not, see <http://creativecommons.org/licenses/by/4.0/>.
Open Platform for NFV Project Software Licence
==============================================
diff --git a/README b/README
new file mode 100644
index 000000000..4629763a3
--- /dev/null
+++ b/README
@@ -0,0 +1,10 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
diff --git a/build/Makefile b/build/Makefile
new file mode 100644
index 000000000..59d9096c6
--- /dev/null
+++ b/build/Makefile
@@ -0,0 +1,259 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+SHELL = /bin/bash
+
+# This file will be created if needed by runcontext to contain proxy
+# settings.
+-include environment.mk
+
+############################################################################
+# BEGIN of variables to customize
+#
+#Input args
+export MOSVERSION = 9.0
+export ISOSRC = file:$(shell pwd)/fuel-$(MOSVERSION).iso
+export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
+export PRODNO = "OPNFV_FUEL"
+export REVSTATE = "P0000"
+export USER ?= $(shell whoami)
+export BUILD_DATE = $(shell date --utc +%Y-%m-%d:%H:%M)
+export OPNFV_GIT_SHA = $(shell git rev-parse HEAD)
+# Store in /etc/fuel_build_id on fuel master
+export BUILD_ID := $(PRODNO)_$(BUILD_DATE)_$(OPNFV_GIT_SHA)
+
+ifdef BUILD_FUEL_PLUGINS
+$(warning Overriding plugin build selection to $(BUILD_FUEL_PLUGINS))
+export NEWISO = $(shell pwd)/release/unofficial-opnfv-${REVSTATE}.iso
+else
+export NEWISO = $(shell pwd)/release/opnfv-${REVSTATE}.iso
+endif
+
+# Note! Invoke with "make REVSTATE=RXXXX all" to make release build!
+# Invoke with ICOCACHE=/full/path/to/iso if cached ISO is in non-standard location.
+
+# Build variables
+export BUILD_BASE := $(shell pwd)
+export DEB_DEST := $(BUILD_BASE)/release/packages/ubuntu/pool/main
+export UDEB_DEST := $(BUILD_BASE)/release/packages/ubuntu/pool/debian-installer
+export PUPPET_DEST := $(BUILD_BASE)/release/puppet/modules
+export VERSION_FILE := $(BUILD_BASE)/.versions
+export DOCKERIMG = opnfv.org/ubuntu-builder:14.04
+export TOPDIR := $(shell pwd)
+export REPOINFO := $(BUILD_BASE)/repo_info.sh
+
+# Use snapshots
+# Use nearby repositories
+export MIRROR_UBUNTU_URL := $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh --url)
+export MIRROR_UBUNTU := $(shell echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f3 )
+export MIRROR_UBUNTU_ROOT := $(shell echo -n '/' ; echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f4-)
+
+export LATEST_MIRROR_ID_URL := http://$(shell ./select_closest_fuel_mirror.py)
+
+export MIRROR_MOS_UBUNTU ?= $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3)
+export LATEST_TARGET_UBUNTU := $(shell curl -sSf "$(MIRROR_MOS_UBUNTU)/mos-repos/ubuntu/$(MOSVERSION).target.txt" | head -1)
+export MIRROR_MOS_UBUNTU_ROOT := /mos-repos/ubuntu/$(LATEST_TARGET_UBUNTU)
+
+export LATEST_TARGET_CENTOS := $(shell curl -sSf "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/os.target.txt" | head -1)
+export MIRROR_FUEL := "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/$(LATEST_TARGET_CENTOS)/x86_64"
+
+# uncomment and use: make print-VARIABLE
+#print-% : ; @echo $* = $($*)
+
+#Build subclasses
+
+SUBDIRS := f_isoroot
+
+# f_example is only an example of how to generate a .deb package and
+# should not be enabled in official builds.
+#SUBDIRS += f_example
+
+ORIGDIR := $(TOPDIR)/origiso
+#
+# END of variables to customize
+#############################################################################
+
+# Fuel-main destination path and fuel-* submodule patching, for full list check:
+# https://github.com/openstack/fuel-main/blob/stable/mitaka/repos.mk#L32-L44
+FUEL_MAIN_DIR := /tmp/fuel-main
+FUEL_PATCHES := $(shell find $(BUILD_BASE)/patch-repos -name '*.patch' | sort)
+
+SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
+
+.PHONY: all
+all:
+ @docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1)
+ @make -C docker
+ @lsb_release -a | grep Ubuntu > /dev/null 2>&1 || (echo 'Ubuntu is the only supported Linux distribution for this build system'; exit 1)
+ @KERNEL_VER=$$(uname -r); \
+ KERNEL_ARRAY=($${KERNEL_VER//./ }); \
+ if [ $${KERNEL_ARRAY[0]} -lt 3 ] || [[ $${KERNEL_ARRAY[0]} -eq 3 && $${KERNEL_ARRAY[1]} -lt 19 ]] ; then (echo 'Kernel version must be 3.19 or newer'; exit 1) ; fi
+ @docker/runcontext $(DOCKERIMG) wget -q www.google.com -O /dev/null || (echo 'No docker network connectivity or name server - check your network- and docker settings'; exit 1)
+ @docker/runcontext $(DOCKERIMG) $(MAKE) $(MAKEFLAGS) iso
+
+
+############################################################################
+# BEGIN of Include definitions
+#
+include config.mk
+include cache.mk
+#
+# END Include definitions
+#############################################################################
+
+$(ISOCACHE):
+ # Clone Fuel to non-persistent location and build
+ sudo rm -rf $(FUEL_MAIN_DIR)
+ git clone $(FUEL_MAIN_REPO) $(FUEL_MAIN_DIR)
+ git -C $(FUEL_MAIN_DIR) checkout $(FUEL_MAIN_TAG)
+ @echo "fuel" `git -C $(FUEL_MAIN_DIR) rev-parse HEAD` >> $(VERSION_FILE)
+ # Remove Docker optimizations, otherwise multistrap will fail during
+ # Fuel build.
+ sudo rm -f /etc/apt/apt.conf.d/docker*
+ #
+ # Need to replace the old Docker v. 1.5.0 with a later version to be
+ # able to access the Docker remote repository!
+ sudo apt-get install apt-transport-https ca-certificates -y
+ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
+ sudo apt-get update -y
+ sudo apt-get install docker-engine -y
+ sudo sh -c 'echo DOCKER_OPTS=\"--bip 172.45.0.1/24\" > /etc/default/docker'
+ sudo service docker stop || exit 0
+ sudo service docker start
+
+ cd $(FUEL_MAIN_DIR) && ./prepare-build-env.sh
+ # Verify that Docker is alive
+ sudo docker info
+ # fuel-main Makefiles do not like `make -C`
+ cd $(FUEL_MAIN_DIR) && make repos
+ $(REPOINFO) -r $(FUEL_MAIN_DIR) > gitinfo_fuel.txt
+ # OPNFV patches at Fuel build time
+ # Need to be commited in order for them to be considered by the Fuel
+ # build system
+ $(foreach patch,$(FUEL_PATCHES),git \
+ -C $(subst $(BUILD_BASE)/patch-repos,$(FUEL_MAIN_DIR),$(dir $(patch))) \
+ am --whitespace=nowarn --committer-date-is-author-date $(patch) || \
+ (echo 'Error: Failed patching Fuel repos!' ; exit 1);)
+
+ # Repeat build up to three times
+ sudo -E ./fuel_build_loop
+ cp $(FUEL_MAIN_DIR)/build/artifacts/fuel*.iso .
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+.PHONY: mount-origiso umount-origiso
+mount-origiso: $(ISOCACHE)
+ @echo "Mounting original ISO in $(ORIGDIR)"
+ @mkdir -p $(ORIGDIR)
+ @fuseiso $(ISOCACHE) $(ORIGDIR)
+
+umount-origiso:
+ @echo "Unmounting original ISO from $(ORIGDIR)"
+ @fusermount -u $(ORIGDIR)
+ @rmdir $(ORIGDIR)
+
+.PHONY: $(SUBDIRS)
+$(SUBDIRS):
+ @mkdir -p release/packages/ubuntu/pool/main release/packages/ubuntu/pool/debian-installer release/puppet/modules release/isoroot
+ $(MAKE) -C $@ -f Makefile release
+
+.PHONY: patch-packages
+patch-packages:
+ ORIGISO=$(ISOCACHE) REVSTATE=$(REVSTATE) $(MAKE) -C $@ -f Makefile release
+
+.PHONY: clean $(SUBCLEAN)
+clean: $(SUBCLEAN)
+ $(MAKE) -C patch-packages -f Makefile clean
+ @rm -f *.iso
+ @rm -Rf release
+ @rm -Rf newiso
+ @rm -Rf .versions
+ @rm -f $(NEWISO)
+ @rm -f $(BUILD_BASE)/gitinfo_*.txt
+
+.PHONY: deepclean
+deepclean: clean clean-cache
+ make -C docker clean
+ docker rmi opnfv.org/ubuntu-builder:14.04 &>/dev/null || exit 0
+ docker rmi opnfv.org/ubuntu-builder:latest &>/dev/null || exit 0
+ docker rmi ubuntu:14.04 &>/dev/null || exit 0
+ @if docker images | grep -q "ubuntu *14.04"; then \
+ echo "Error: ubuntu:14.04 still present!"; \
+ exit 1; \
+ fi
+ @if docker images | grep -q "opnfv.org/ubuntu-builder"; then \
+ echo "Error: opnfv.org/ubuntu-builder still present!"; \
+ exit 1; \
+ fi
+
+$(SUBCLEAN): %.clean:
+ $(MAKE) -C $* -f Makefile clean
+
+.PHONY: setup-env
+setup-env:
+ @if [ -f environment.mk ]; then \
+ sudo bash -c "cat environment.mk >> /etc/environment"; \
+ fi
+
+# Todo: Make things smarter - we shouldn't need to clean everything
+# betwen make invocations.
+.PHONY: iso
+iso: setup-env $(ISOCACHE) $(SUBDIRS) patch-packages
+ $(REPOINFO) . > gitinfo_main.txt
+ install/install.sh iso $(ISOCACHE) $(NEWISO) $(PRODNO) $(REVSTATE)
+ @printf "\n\nProduct ISO is $(NEWISO)\n\n"
+
+# Start a bash shell in docker for Makefile debugging
+.PHONY: debug
+debug:
+ @docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1)
+ @make -C docker
+ docker/runcontext $(DOCKERIMG) debug
+
+#############################################################################
+# 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 commit ID of the full Fuel repo structre
+# - The contents of all local Fuel patches
+.cacheid:
+ git clone $(FUEL_MAIN_REPO) $(FUEL_MAIN_DIR)
+ git -C $(FUEL_MAIN_DIR) checkout $(FUEL_MAIN_TAG)
+ make -C $(FUEL_MAIN_DIR) repos
+ $(REPOINFO) -r $(FUEL_MAIN_DIR) > .cachedata
+ $(foreach patch,$(FUEL_PATCHES),sha1sum $(patch) >> .cachedata;)
+ sha1sum fuel_build_loop >> .cachedata
+ sha1sum config.mk >> .cachedata
+ sha1sum Makefile >> .cachedata
+ $(CACHETOOL) getbiweek >> .cachedata
+ cat .cachedata | $(CACHETOOL) getid > .cacheid
+ # Not removing fuel-main as it is re-used in build
+
+# Clean local data related to caching - called prior to ordinary build
+.PHONY: clean-cache
+clean-cache: $(SUBCLEANCACHE)
+ 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 \
+ exit 0;\
+ fi
+
+# Store cache if not already stored - called after ordinary build
+.PHONY: put-cache
+put-cache: .cacheid
+ @tar cf - fuel*.iso gitinfo_fuel.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/README b/build/README
new file mode 100644
index 000000000..a6e15694c
--- /dev/null
+++ b/build/README
@@ -0,0 +1,22 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+This purpose of this framework is to:
+
+1) Build fuel baseline from upstream OpenStack Fuel repos (builds in a docker container to isolate dependencies from host
+ and full re-producability)
+2) Apply arbitrary changes to the fuel baseline, consistent and non volatile:
+ - Add arbitrary packages with puppet modules for install and config. to be applied on controllers as well as computes.
+ - Change any stack-, or other pack config. using puppet
+ - Apply patches to the baseline.
+ - Etc.
+3) Re factor/rebuild the .iso image for deployment (also builds in a container, for the same reason as mentioned above)
+
+For detailed instructions on how to add content, configuration, build and deply - please see: DOC/
diff --git a/build/add_opnfv_packages b/build/add_opnfv_packages
new file mode 100644
index 000000000..44af92ea7
--- /dev/null
+++ b/build/add_opnfv_packages
@@ -0,0 +1,23 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Format of this file:
+#
+#TEXT>old package>url for replacement package
+#
+# Note! No spaces!
+# The TEXT can be anything it is just for information display.
+# Iff the packages is new, i.e. not replacing an existing package
+# the old package should be specified as NONE.
+# Note! For new packages a puppet manifest must actually install it.
+# Easiest is to just add it to add_packages.pp. (The same might
+# of course be true for an exising package if it isn't already
+# is being installed).
+#
diff --git a/build/apply_patches b/build/apply_patches
new file mode 100644
index 000000000..6925ff6b7
--- /dev/null
+++ b/build/apply_patches
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Format of this file:
+#
+#TR>old package>url for replacement package
+#
+# Note! No spaces!
+# Example:
+#FIX>foo_0.0.1.deb>https://example.org/foo_0.0.2.deb
+
diff --git a/build/cache.mk b/build/cache.mk
new file mode 100644
index 000000000..f6db01797
--- /dev/null
+++ b/build/cache.mk
@@ -0,0 +1,55 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#
+# This is the global cache implementation, providing the main target "cache"
+# which is called from ci/build.sh, and recursively calling the cache
+# operations clean-cache, get-cache and put-cache on all $(SUBDIRS).
+#############################################################################
+
+
+export CACHETOOL := $(BUILD_BASE)/cache.sh
+
+# Call sub caches
+SUBGETCACHE = $(addsuffix .getcache,$(SUBDIRS))
+$(SUBGETCACHE): %.getcache:
+ $(MAKE) -C $* -f Makefile get-cache
+
+SUBPUTCACHE = $(addsuffix .putcache,$(SUBDIRS))
+$(SUBPUTCACHE): %.putcache:
+ $(MAKE) -C $* -f Makefile put-cache
+
+SUBCLEANCACHE = $(addsuffix .cleancache,$(SUBDIRS))
+$(SUBCLEANCACHE): %.cleancache:
+ $(MAKE) -C $* -f Makefile clean-cache
+
+# Overlay implementation:
+# - clean
+# - clean cache identities
+# - get caches
+# - build iso
+# - store caches
+.PHONY: cached-all
+cached-all: clean clean-cache $(SUBCLEANCACHE) get-cache $(SUBGETCACHE) iso put-cache $(SUBPUTCACHE)
+ @echo "Cached build is complete"
+
+
+# cache: The target for ci/build.sh
+.PHONY: cache
+cache:
+ @if [ -z "${CACHEBASE}" ]; then \
+ echo "CACHEBASE not set, are you really building through build.sh?"; \
+ exit 1; \
+ fi
+ @docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1)
+ @make -C docker
+ docker/runcontext $(DOCKERIMG) $(MAKE) $(MAKEFLAGS) cached-all
diff --git a/build/cache.sh b/build/cache.sh
new file mode 100755
index 000000000..d4b2c45dd
--- /dev/null
+++ b/build/cache.sh
@@ -0,0 +1,203 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+exit_trap() {
+ if [ -d "$TMPDIR" ]; then
+ rm -rf $TMPDIR
+ fi
+}
+
+trap exit_trap EXIT
+
+CACHETRANSPORT=${CACHETRANSPORT:-"curl --silent"}
+CACHEMAXAGE=${CACHEMAXAGE:-$[14*24*3600]}
+CACHEDEBUG=${CACHEDEBUG:-1}
+PLUGINS_MATCH="${BUILD_BASE}/f_isoroot/*/"
+
+debugmsg () {
+ if [ "$CACHEDEBUG" -eq 1 ]; then
+ echo "$@" >&2
+ fi
+}
+
+errorexit () {
+ echo "$@" >&2
+ exit 1
+}
+
+# Generate a unique number every two weeks - a service routine that
+# can be used when generating the SHA1 to make sure that the cache is
+# rebuilt bi-weekly even if no pruning of the cache is taking place.
+getbiweek () {
+ echo "$(date +'%G')$[10#$(date +'%V')/2]"
+}
+
+# Get a SHA1 based on what's piped into the cache command
+getid() {
+ debugmsg "Generating sha1sum"
+ sha1sum | sed 's/ .*//'
+}
+
+
+# Put in cache
+put() {
+ if check $1; then
+ debugmsg "SHA1 $1 already in cache, skipping storage"
+ else
+ debugmsg "Storing SHA1 $1 in cache"
+ ${CACHETRANSPORT} -T - ${CACHEBASE}/$1.blob
+ echo "Expires: $[`date +"%s"` + $CACHEMAXAGE]" | ${CACHETRANSPORT} -T - ${CACHEBASE}/$1.meta
+ fi
+ exit 0
+}
+
+# Get from cache
+get() {
+ local rc
+
+ ${CACHETRANSPORT} -o - ${CACHEBASE}/$1.blob 2>/dev/null
+ rc=$?
+
+ if [ $rc -eq 0 ]; then
+ echo "Got SHA1 $1 from cache" 2>/dev/null
+ else
+ echo "Tried to get SHA1 $1 from cache but failed" 2>/dev/null
+ fi
+
+ return $?
+}
+
+# Check if in cache
+check() {
+ local rc
+
+ ${CACHETRANSPORT} ${CACHEBASE}/$1.meta &>/dev/null
+ rc=$?
+
+ if [ $rc -eq 0 ]; then
+ debugmsg "Checking for SHA1 $1 in cache and found it, rc = $rc"
+ else
+ debugmsg "Checking for SHA1 $1 in cache and failed, rc = $rc"
+ fi
+
+ return $rc
+}
+
+# Verify that SHA1 seems to be a SHA1...
+validSHA1() {
+ if [ $(echo $1 | wc -c) -ne 41 ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+# Figure out commit ID from URI and tag/branch/commit ID
+getcommitid() {
+ if echo $2 | grep -q '^refs/changes/'; then
+ REF=`echo $2 | sed "s,refs\/changes\/\(.*\),\1,"`
+ else
+ REF=$2
+ fi
+
+ echo "Repo is $1, ref is ${REF}" >&2
+
+ HEADMATCH=`git ls-remote $1 | grep "refs/heads/${REF}$" | awk '{ print $1 }'`
+ TAGMATCH=`git ls-remote $1 | grep "refs/tags/${REF}$" | awk '{ print $1 }'`
+ CHANGEMATCH=`git ls-remote $1 | grep "refs/changes/${REF}$" | awk '{ print $1 }'`
+
+ if [ -n "$HEADMATCH" ]; then
+ echo "$HEADMATCH"
+ elif [ -n "$TAGMATCH" ]; then
+ echo "$TAGMATCH"
+ elif [ -n "$CHANGEMATCH" ]; then
+ echo "Warning: ${REF} is a change!" >&2
+ TMPDIR=`mktemp -d /tmp/cacheXXXXX`
+ cd $TMPDIR
+ git clone $1 &>/dev/null || errorexit "Could not clone $1"
+ cd * || errorexit "Could not enter clone of $1"
+ git fetch $1 refs/changes/$REF &>/dev/null || errorexit "Could not fetch change"
+ git checkout FETCH_HEAD &>/dev/null || errorexit "Could not checkout FETCH_HEAD"
+ git show HEAD &>/dev/null || errorexit "Could not find commit $2"
+ git show HEAD | head -1 | awk '{ print $2 }'
+ else
+ TMPDIR=`mktemp -d /tmp/cacheXXXXX`
+ cd $TMPDIR
+ git clone $1 &>/dev/null || errorexit "Could not clone $1"
+ cd * || errorexit "Could not enter clone of $1"
+ git show $2 &>/dev/null || errorexit "Could not find commit $2"
+ git show $2 | head -1 | awk '{ print $2 }'
+ fi
+}
+
+packages() {
+ local PLUGINS_SHA1=''
+
+ # globbing expansion is alphabetical
+ for plugin in $PLUGINS_MATCH ; do
+ if [ -f "${plugin}packages.yaml" ]
+ then
+ PLUGINS_SHA1+=$(sha1sum ${plugin}packages.yaml)
+ fi
+ done
+
+ if [ -n "${PLUGINS_SHA1}" ]
+ then
+ echo -n $PLUGINS_SHA1 | sha1sum
+ fi
+}
+
+if [ -z "$CACHEBASE" ]; then
+ errorexit "CACHEBASE not set - exiting..."
+fi
+
+case $1 in
+ getbiweek)
+ if [ $# -ne 1 ]; then
+ errorexit "No arguments can be given to getbiweek!"
+ fi
+ getbiweek
+ ;;
+ getcommitid)
+ if [ $# -ne 3 ]; then
+ errorexit "Arg 1 needs to be URI and arg 2 tag/branch/commit"
+ fi
+ shift
+ getcommitid $@
+ ;;
+ getid)
+ if [ $# -ne 1 ]; then
+ errorexit "No arguments can be given to getid!"
+ fi
+ getid
+ ;;
+ get|check|put)
+ if [ $# -ne 2 ]; then
+ errorexit "Only one argument, the SHA1 sum, can be given to getid!"
+ else
+ if ! validSHA1 $2; then
+ errorexit "Invalid SHA1 format!"
+ fi
+ fi
+
+ $1 $2
+ exit $rc
+ ;;
+ packages)
+ if [ $# -ne 1 ]; then
+ errorexit "No arguments can be given to packages!"
+ fi
+ packages
+ ;;
+ *)
+ errorexit "I only know about getcommitid, getid, check, get and put!"
+esac
diff --git a/build/check_dependencies.sh b/build/check_dependencies.sh
new file mode 100755
index 000000000..cbcb98ab3
--- /dev/null
+++ b/build/check_dependencies.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Given a file as input, this script verifies that all URIs in the file can
+# be fetched.
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $(basename $0) <filename>"
+ exit 1
+fi
+
+if [ ! -e $1 ]; then
+ echo "Could not open $1"
+ exit 1
+fi
+
+echo "Checking dependencies in $1"
+rc=0
+for uri in `cat $1`
+do
+ if ! curl -sfr 0-100 $uri > /dev/null; then
+ echo "Failed fetching $uri" >&2
+ rc=1
+ fi
+done
+
+if [ $rc -ne 0 ]; then
+ echo "ERROR checking dependencies in $1"
+else
+ echo "Dependencies OK"
+fi
+
+exit $rc
diff --git a/build/config.mk b/build/config.mk
new file mode 100644
index 000000000..f78043e18
--- /dev/null
+++ b/build/config.mk
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+FUEL_MAIN_REPO := https://github.com/openstack/fuel-main
+FUEL_MAIN_TAG := 9.0.1
+MOS_VERSION = 9.0
+OPENSTACK_VERSION = mitaka-9.0
+
+# Pinning down exact Fuel repo versions for Fuel 9.0.1
+export FUELLIB_COMMIT?=e283b62750d9e26355981b3ad3be7c880944ae0f
+export NAILGUN_COMMIT?=e2b85bafb68c348f25cb7cceda81edc668ba2e64
+export PYTHON_FUELCLIENT_COMMIT?=67d8c693a670d27c239d5d175f3ea2a0512c498c
+export FUEL_AGENT_COMMIT?=7ffbf39caf5845bd82b8ce20a7766cf24aa803fb
+export FUEL_NAILGUN_AGENT_COMMIT?=46fa0db0f8944f9e67699d281d462678aaf4db26
+export ASTUTE_COMMIT?=390b257240d49cc5e94ed5c4fcd940b5f2f6ec64
+export OSTF_COMMIT?=f09c98ff7cc71ee612b2450f68a19f2f9c64345a
+export FUEL_MIRROR_COMMIT?=d1ef06b530ce2149230953bb3810a88ecaff870c
+export FUELMENU_COMMIT?=0ed9e206ed1c6271121d3acf52a6bf757411286b
+export SHOTGUN_COMMIT?=781a8cfa0b6eb290e730429fe2792f2b6f5e0c11
+export NETWORKCHECKER_COMMIT?=fcb47dd095a76288aacf924de574e39709e1f3ca
+export FUELUPGRADE_COMMIT?=c1c4bac6a467145ac4fac73e4a7dd2b00380ecfb
+export FUEL_UI_COMMIT?=90de7ef4477230cb7335453ed26ed4306ca6f04f
+
+# for the patches applying purposes
+export GIT_COMMITTER_NAME?=Fuel OPNFV
+export GIT_COMMITTER_EMAIL?=fuel@opnfv.org
+
+DOCKER_REPO := http://get.docker.com/builds/Linux/x86_64
+DOCKER_TAG := docker-latest
+
+.PHONY: get-fuel-repo
+get-fuel-repo:
+ @echo $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG)
+
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile
new file mode 100644
index 000000000..b38ea4c64
--- /dev/null
+++ b/build/docker/Dockerfile
@@ -0,0 +1,43 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+FROM ubuntu:14.04
+ENV http_proxy INSERT_HTTP_PROXY
+ENV https_proxy INSERT_HTTPS_PROXY
+ENV no_proxy INSERT_NO_PROXY
+ENV DEBIAN_FRONTEND noninteractive
+
+RUN apt-get update
+RUN apt-get install -y software-properties-common python-software-properties \
+ make python-setuptools python-all dpkg-dev debhelper ruby-json \
+ fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \
+ ca-certificates sudo apt-utils lsb-release dosfstools debmirror p7zip-full \
+ build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev
+
+RUN gem install fpm
+RUN pip install fuel-plugin-builder
+
+RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
+RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies
+# Keeping PWD is needed to build as root
+RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd
+# Keeping variables for ISO build
+RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH\"" > /etc/sudoers.d/keep-mos
+RUN chmod 0440 /etc/sudoers.d/open-sudo
+RUN chmod 0440 /etc/sudoers.d/keep-proxies
+RUN chmod 0440 /etc/sudoers.d/keep-pwd
+RUN chmod 0440 /etc/sudoers.d/keep-mos
+RUN chmod 4755 /bin/fusermount
+
+ADD ./setcontext /root/setcontext
+RUN chmod +x /root/setcontext
+
+VOLUME /var/lib/docker
diff --git a/build/docker/Makefile b/build/docker/Makefile
new file mode 100644
index 000000000..d4423b0a2
--- /dev/null
+++ b/build/docker/Makefile
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+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]} )))
+
+# 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)
+ tag_flags :=
+else
+ tag_flags := -f
+endif
+
+.PHONY: all
+all: .docker
+
+.docker: $(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
+ 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
+ test -n "${HTTP_PROXY}" && sed -i "s;INSERT_HTTP_PROXY;${HTTP_PROXY};" ubuntu-builder/Dockerfile || exit 0
+ 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
+
+.PHONY: clean
+clean:
+ rm -f .docker ubuntu-builder/Dockerfile
diff --git a/build/docker/README b/build/docker/README
new file mode 100644
index 000000000..e5ccdfab6
--- /dev/null
+++ b/build/docker/README
@@ -0,0 +1,25 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+The makefile on this level is used for *creating* the Docker image
+used for building in Ubuntu 12.04 context.
+
+There are two requirements before running make on this level:
+
+1. You need to have Docker installed on your system
+
+2. If in a corporate network, make sure to have a valid DNS config in
+ your /etc/default/docker, e.g:
+
+ DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
+
+The top level makefile will refer to the "runcontext" file in order to
+run the build process as the current user with the current working
+directory available to the container.
diff --git a/build/docker/runcontext b/build/docker/runcontext
new file mode 100755
index 000000000..daad663ac
--- /dev/null
+++ b/build/docker/runcontext
@@ -0,0 +1,130 @@
+#!/bin/bash
+set -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+#
+
+############################################################################
+# BEGIN of Exit handlers
+#
+
+do_exit () {
+ CID=`cat $CID_FILE </dev/null`
+ rm -f $CID_FILE
+ rm -rf $CONTEXT_DIR
+ set +e
+ docker kill $CID > /dev/null 2>&1
+ docker rm -f $CID > /dev/null 2>&1
+ docker rmi -f $IID > /dev/null 2>&1
+ set -e
+}
+
+#
+# End of Exit handlers
+############################################################################
+
+trap do_exit SIGINT SIGTERM EXIT
+
+context=$1
+shift
+USER_ID=`id -u`
+USER=`whoami`
+GROUP_ID=`id -g`
+
+GITROOT=`git rev-parse --show-toplevel`
+CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX`
+CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX`
+
+# If RSYNC_CONNECT_PROG is used, we need to copy all of
+# the SSH structure, should one of the keys need to be
+# used.
+if [ -n "$RSYNC_CONNECT_PROG" -a -x $HOME/.ssh ]; then
+ cp -rp $HOME/.ssh $CONTEXT_DIR
+ rm -f $CONTEXT_DIR/.ssh/known_hosts
+else
+ mkdir $CONTEXT_DIR/.ssh
+fi
+
+# Disable verification of unknown keys
+cat >> $CONTEXT_DIR/.ssh/config <<EOF
+StrictHostKeyChecking=no
+EOF
+
+cat > $CONTEXT_DIR/Dockerfile <<EOF
+FROM $context
+$(env | egrep -i 'proxy|rsync' | sed 's/^/ENV /' | sed 's/=/ /')
+RUN date || date
+COPY .ssh $HOME/.ssh
+RUN chown -R $USER_ID:$GROUP_ID $HOME/.ssh
+RUN chown -R $USER_ID:$GROUP_ID $HOME
+RUN chmod 700 $HOME/.ssh
+RUN /root/setcontext $USER $USER_ID $GROUP_ID $HOME
+EOF
+
+res=`docker build -q --force-rm $CONTEXT_DIR`
+IID=`echo $res | sed 's/.* //'`
+
+# Handle proxy settings passed to the context
+if env | grep -iq .*proxy; then
+ envfile="$(readlink -f $(dirname $0)/..)/environment.mk"
+
+ test -n "$HTTP_PROXY" && my_http_proxy=$HTTP_PROXY
+ test -n "$http_proxy" && my_http_proxy=$http_proxy
+
+ test -n "$HTTPS_PROXY" && my_https_proxy=$HTTPS_PROXY
+ test -n "$https_proxy" && my_https_proxy=$https_proxy
+
+ test -n "$NO_PROXY" && my_no_proxy=$NO_PROXY
+ test -n "$no_proxy" && my_no_proxy=$no_proxy
+
+ # Make sure to add the Docker socket in no_proxy
+ if [ -n "$my_no_proxy" ]; then
+ my_no_proxy+=",/var/run/docker.sock"
+ else
+ my_no_proxy="/var/run/docker.sock"
+ fi
+
+ echo "Creating $envfile"
+ echo "# This file is automatically generated by runcontext, do not edit!" > $envfile
+ test -n "$my_http_proxy" && echo "export http_proxy=$my_http_proxy" >> $envfile
+ test -n "$my_https_proxy" && echo "export https_proxy=$my_https_proxy" >> $envfile
+ test -n "$my_no_proxy" && echo "export no_proxy=$my_no_proxy" >> $envfile
+ test -n "$RSYNC_PROXY" && echo "export RSYNC_PROXY=$RSYNC_PROXY" >> $envfile
+ test -n "$RSYNC_CONNECT_PROG" && echo "export RSYNC_CONNECT_PROG=$RSYNC_CONNECT_PROG" >> $envfile
+ echo "export npm_config_registry=http://registry.npmjs.org/" >> $envfile
+else
+ echo "No need to generate environment.mk"
+ rm -f $envfile
+fi
+
+# Evaluate the need for bind mounting the cache directory
+if [ -n "$CACHEBASE" ]; then
+ if echo $CACHEBASE | grep -q '^file://'; then
+ CACHEMOUNT="-v $(echo $CACHEBASE | sed 's;file://;;'):$(echo $CACHEBASE | sed 's;file://;;')"
+ fi
+fi
+
+RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \
+ -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \
+ -e BUILD_FUEL_PLUGINS -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 \
+ -u $USER_ID:$GROUP_ID -w $PWD \
+ -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT"
+
+# Passing "debug" puts up an interactive bash shell
+if [ "$1" == "debug" ]; then
+ echo command: docker run ${RUN_CONTEXT_OPT} $IID bash
+ docker run -i -t ${RUN_CONTEXT_OPT} $IID bash
+else
+ echo command: docker run ${RUN_CONTEXT_OPT} $IID $@
+ docker run -t ${RUN_CONTEXT_OPT} $IID $@
+fi
+
diff --git a/build/docker/ubuntu-builder/install_docker.sh b/build/docker/ubuntu-builder/install_docker.sh
new file mode 100755
index 000000000..47c3a52ec
--- /dev/null
+++ b/build/docker/ubuntu-builder/install_docker.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# From prepare-build-env.sh of Fuel
+# Check if docker is installed
+if hash docker 2>/dev/null; then
+ echo "Docker binary found, checking if service is running..."
+ ps cax | grep docker > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "Docker is running."
+ else
+ echo "Process is not running, starting it..."
+ sudo service docker start
+ fi
+else
+ # Install docker repository
+ # Check that HTTPS transport is available to APT
+ if [ ! -e /usr/lib/apt/methods/https ]; then
+ sudo apt-get update
+ sudo apt-get -y install -y apt-transport-https
+ fi
+ # Add the repository to APT sources
+ echo deb http://mirror.yandex.ru/mirrors/docker/ docker main | sudo tee /etc/apt/sources.list.d/docker.list
+ # Import the repository key
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
+ # Install docker
+ sudo apt-get update
+ sudo apt-get -y install lxc-docker-1.7.1
+fi
diff --git a/build/docker/ubuntu-builder/setcontext b/build/docker/ubuntu-builder/setcontext
new file mode 100755
index 000000000..bc28994a9
--- /dev/null
+++ b/build/docker/ubuntu-builder/setcontext
@@ -0,0 +1,20 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+#
+SETUSER=$1
+SETUID=$2
+SETGID=$3
+SETHOME=$4
+
+getent group $SETUSER || /usr/sbin/groupadd --gid $SETGID $SETUSER
+getent passwd $SETUSER || /usr/sbin/adduser --system --uid=$SETUID --gid=$SETGID --home $SETHOME --shell /bin/bash $SETUSER
+/usr/sbin/usermod -a -G fuse $SETUSER
+exit 0
diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile
new file mode 100644
index 000000000..448f4158c
--- /dev/null
+++ b/build/f_isoroot/Makefile
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# 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_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_bgpvpn-pluginbuild
+export PLUGINS
+#NON_8-0_REBASED_PLUGINS = f_bgpvpn-pluginbuild
+
+# If the BUILD_FUEL_PLUGINS environment variable is set, only build the plugins
+# indicated therein.
+# Temporarilu disabling f_repobuild that currently have some issues on
+# Fuel Mitaka.
+ifdef BUILD_FUEL_PLUGINS
+export BUILD_FUEL_PLUGINS
+SUBDIRS = f_kscfg f_bootstrap f_isolinux f_repobuild $(BUILD_FUEL_PLUGINS)
+$(warning Overriding plugin build selection to $(BUILD_FUEL_PLUGINS))
+else
+SUBDIRS = f_kscfg f_bootstrap f_isolinux f_repobuild $(PLUGINS)
+endif
+SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
+
+.PHONY: all
+all: $(SUBDIRS)
+
+.PHONY: $(SUBDIRS)
+$(SUBDIRS):
+ @mkdir -p release
+ $(MAKE) -C $@ -f Makefile release
+
+.PHONY: clean $(SUBCLEAN)
+clean: $(SUBCLEAN)
+ @rm -Rf release
+
+$(SUBCLEAN): %.clean:
+ $(MAKE) -C $* -f Makefile clean
+
+.PHONY: release
+release: $(SUBDIRS)
+ @cp -Rvp release/* ../release/isoroot
+
+include cache.mk
diff --git a/build/f_isoroot/README b/build/f_isoroot/README
new file mode 100644
index 000000000..eb54c0827
--- /dev/null
+++ b/build/f_isoroot/README
@@ -0,0 +1,16 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+This is to (a) replace/patch existing Fuel ISO files as well
+as adding new information directly into the ISO structure
+
+Please separate changes into "patches" and new content into
+"additions". Both directories will be anchored at the ISO file
+root.
diff --git a/build/f_isoroot/cache.mk b/build/f_isoroot/cache.mk
new file mode 100644
index 000000000..2df3b6bd1
--- /dev/null
+++ b/build/f_isoroot/cache.mk
@@ -0,0 +1,37 @@
+##############################################################################
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#
+# This file is only meant for a top Makefile which is only calling its
+# own SUBDIRS, without building any cachable artifact by itself.
+#############################################################################
+
+# Call sub caches
+SUBGETCACHE = $(addsuffix .getcache,$(SUBDIRS))
+$(SUBGETCACHE): %.getcache:
+ $(MAKE) -C $* -f Makefile get-cache
+
+SUBPUTCACHE = $(addsuffix .putcache,$(SUBDIRS))
+$(SUBPUTCACHE): %.putcache:
+ $(MAKE) -C $* -f Makefile put-cache
+
+SUBCLEANCACHE = $(addsuffix .cleancache,$(SUBDIRS))
+$(SUBCLEANCACHE): %.cleancache:
+ $(MAKE) -C $* -f Makefile clean-cache
+
+.PHONY: get-cache
+get-cache: $(SUBGETCACHE)
+
+.PHONY: put-cache
+put-cache: $(SUBPUTCACHE)
+
+.PHONY: clean-cache
+clean-cache: $(SUBCLEANCACHE)
diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
new file mode 100644
index 000000000..8ce28fcf8
--- /dev/null
+++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2015 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
+# 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: .bgpvpnbuild
+
+.PHONY: clean
+clean:
+ @rm -f .bgpvpnbuild ../release/opnfv/bgpvpn*.rpm bgpvpn*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_bgpvpnplugin.txt gitinfo_bgpvpnplugin.txt
+
+.PHONY: release
+release:.bgpvpnbuild
+ @rm -f ../release/opnfv/bgpvpn*.rpm
+ @mkdir -p ../release/bgpvpn
+ @cp bgpvpn*.rpm ../release/opnfv/
+ cp gitinfo_bgpvpnplugin.txt $(BUILD_BASE)
+
+.bgpvpnbuild:
+ rm -rf fuel-plugin-bgpvpn
+ git clone $(BGPVPN_REPO)
+ cd fuel-plugin-bgpvpn; \
+ git checkout $(BGPVPN_BRANCH); \
+ if [ ! -z $(BGPVPN_CHANGE) ]; then \
+ git fetch $(BGPVPN_REPO) $(BGPVPN_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ fpb --debug --build fuel-plugin-bgpvpn/
+ mv fuel-plugin-bgpvpn/bgpvpn*.rpm .
+ $(REPOINFO) -r . > gitinfo_bgpvpnplugin.txt
+ rm -rf fuel-plugin-bgpvpn
+ touch .bgpvpnbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+
+# 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 $(BGPVPN_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(BGPVPN_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_BRANCH) > .cachedata; \
+ fi
+ sha1sum Makefile >> .cachedata
+ sha1sum config.mk >> .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 - .bgpvpnbuild bgpvpn*.rpm gitinfo_bgpvpnplugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk b/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk
new file mode 100644
index 000000000..ba6fb73ff
--- /dev/null
+++ b/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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
+##############################################################################
+
+BGPVPN_BRANCH?=master
+BGPVPN_REPO?="https://github.com/openstack/fuel-plugin-bgpvpn.git"
+BGPVPN_CHANGE?=3349842af5724be63a74a82c9060848d9d3d299e
diff --git a/build/f_isoroot/f_bootstrap/Makefile b/build/f_isoroot/f_bootstrap/Makefile
new file mode 100644
index 000000000..1c08405ab
--- /dev/null
+++ b/build/f_isoroot/f_bootstrap/Makefile
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all:
+ @mkdir -p release/opnfv/bootstrap/pre.d
+ @mkdir -p release/opnfv/bootstrap/post.d
+ @mkdir -p release/usr/local/sbin
+ @cp pre-scripts/* release/opnfv/bootstrap/pre.d
+ @cp post-scripts/* release/opnfv/bootstrap/post.d
+
+.PHONY: clean
+clean:
+ @rm -rf release
+
+.PHONY: release
+release:all
+ @cp -Rvp release/* ../release
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+# Clean local data related to caching - called prior to ordinary build
+.PHONY: clean-cache
+clean-cache: clean
+ @echo "clean-cache not implemented"
+
+# Try to download cache - called prior to ordinary build
+.PHONY: get-cache
+get-cache:
+ @echo "get-cache not implemented"
+
+# Store cache if not already stored - called after ordinary build
+.PHONY: put-cache
+put-cache:
+ @echo "put-cache not implemented"
diff --git a/build/f_isoroot/f_bootstrap/README b/build/f_isoroot/f_bootstrap/README
new file mode 100644
index 000000000..5da954ca4
--- /dev/null
+++ b/build/f_isoroot/f_bootstrap/README
@@ -0,0 +1,24 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+This function modifies the adds hooks to the beginning and end of
+/usr/local/sbin/bootstrap_admin_nodes.sh, which is run as the
+last post step from ks.cfg
+
+This enables other functions to place scripts into two directories
+run either at the beginning or the end of the bootstrap procedure:
+
+ /opt/opnfv/bootstrap/pre.d
+ /opt/opnfv/bootstrap/post.d
+
+These will be run in lexical order at pre or post.
+
+CI note: Using pre.d, it would be possible to "inject" a pre-defined
+astute.yaml for Fuel.
diff --git a/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh b/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh
new file mode 100755
index 000000000..4dfeca58e
--- /dev/null
+++ b/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh
@@ -0,0 +1,14 @@
+#/bin/sh
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+date
+echo "This is an example file run at post-bootstrap."
+exit 0
diff --git a/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh b/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh
new file mode 100755
index 000000000..be17e7e0a
--- /dev/null
+++ b/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh
@@ -0,0 +1,34 @@
+#/bin/sh
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+echo "Installing pre-build repo"
+if [ ! -d /opt/opnfv/nailgun ]; then
+ echo "Error - found no repo!"
+ exit 1
+fi
+
+mkdir -p /var/www/nailgun
+mv /opt/opnfv/nailgun/* /var/www/nailgun
+if [ $? -ne 0 ]; then
+ echo "Error moving repos to their correct location!"
+ exit 1
+fi
+rmdir /opt/opnfv/nailgun
+if [ $? -ne 0 ]; then
+ echo "Error removing /opt/opnfv/nailgun directory!"
+ exit 1
+fi
+mv /opt/opnfv/fuel_bootstrap_cli.yaml /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
+if [ $? -ne 0 ]; then
+ echo "Error moving bootstrap image configuration!"
+ exit 1
+fi
+echo "Done installing pre-build repo"
diff --git a/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh b/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh
new file mode 100755
index 000000000..3eaffa523
--- /dev/null
+++ b/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh
@@ -0,0 +1,14 @@
+#/bin/sh
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+date
+echo "This is an example file run at pre-bootstrap."
+exit 0
diff --git a/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile
new file mode 100644
index 000000000..17bc36d91
--- /dev/null
+++ b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# jonas.bjurel@eicsson.com
+# ruijing.guo@intel.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: .fastpathmetrics
+
+.PHONY: clean
+clean:
+ @rm -f .fastpathmetrics ../release/opnfv/fuel-plugin-collectd-ceilometer-*.rpm fuel-plugin-collectd-ceilometer-*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_collectd-ceilometer-plugin.txt gitinfo_collectd-ceilometer-plugin.txt
+
+.PHONY: release
+release:.fastpathmetrics
+ @rm -f ../release/opnfv/fuel-plugin-collectd-ceilometer-*.rpm
+ @mkdir -p ../release/opnfv
+ @cp fuel-plugin-collectd-ceilometer*.rpm ../release/opnfv/
+ cp gitinfo_collectd-ceilometer-plugin.txt $(BUILD_BASE)
+
+.fastpathmetrics:
+ @rm -rf fastpathmetrics
+ git clone $(COLLECTD_CEILOMETER_REPO)
+ cd fastpathmetrics; \
+ git checkout $(COLLECTD_CEILOMETER_BRANCH); \
+ if [ ! -z $(COLLECTD_CEILOMETER_CHANGE) ]; then \
+ git fetch $(COLLECTD_CEILOMETER_REPO) $(COLLECTD_CEILOMETER_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ fpb --debug --build fastpathmetrics/src/fuel-plugin
+ @mv fastpathmetrics/src/fuel-plugin/fuel-plugin-collectd-ceilometer*.rpm .
+ $(REPOINFO) -r . > gitinfo_collectd-ceilometer-plugin.txt
+ @rm -rf fastpathmetrics
+ @touch .fastpathmetrics
+ # 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 $(COLLECTD_CEILOMETER_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(COLLECTD_CEILOMETER_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(COLLECTD_CEILOMETER_REPO) $(COLLECTD_CEILOMETER_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(COLLECTD_CEILOMETER_REPO) $(COLLECTD_CEILOMETER_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 - .fastpathmetrics fuel-plugin-collectd-ceilometer*.rpm gitinfo_collectd-ceilometer-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_collectd-ceilometer-pluginbuild/config.mk b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/config.mk
new file mode 100644
index 000000000..0106213d3
--- /dev/null
+++ b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/config.mk
@@ -0,0 +1,13 @@
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# jonas.bjurel@eicsson.com
+# ruijing.guo@intel.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
+##############################################################################
+
+COLLECTD_CEILOMETER_BRANCH?=3ddf95235ef62de5fb9a520b3aa8f120518b0077
+COLLECTD_CEILOMETER_REPO?=http://gerrit.opnfv.org/gerrit/fastpathmetrics
+COLLECTD_CEILOMETER_CHANGE?=
diff --git a/build/f_isoroot/f_collectd-ceilometer-pluginbuild/packages.yaml b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/packages.yaml
new file mode 100644
index 000000000..1ba7201f4
--- /dev/null
+++ b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/packages.yaml
@@ -0,0 +1,9 @@
+##############################################################################
+# Copyright (c) 2016 OPNFV.
+# 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
+##############################################################################
+packages:
+ - "collectd"
diff --git a/build/f_isoroot/f_isolinux/Makefile b/build/f_isoroot/f_isolinux/Makefile
new file mode 100644
index 000000000..f3e09b234
--- /dev/null
+++ b/build/f_isoroot/f_isolinux/Makefile
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all: isolinux.cfg.iso
+ @mkdir -p release/isolinux
+ grep -q OpenStack_Fuel isolinux.cfg.iso
+ sed "s/OpenStack_Fuel/$(PRODNO)_$(REVSTATE)/g" isolinux.cfg.iso > isolinux.cfg
+ @cp isolinux.cfg release/isolinux/isolinux.cfg
+ @cp isolinux.cfg.iso release/isolinux/isolinux.cfg.orig
+
+isolinux.cfg.iso:
+ 7z -so x $(ISOCACHE) isolinux/isolinux.cfg > isolinux.cfg.iso
+
+.PHONY: clean
+clean:
+ @rm -rf release isolinux.cfg.iso isolinux.cfg
+
+.PHONY: release
+release: all
+ @cp -Rvp release/* ../release
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+# Clean local data related to caching - called prior to ordinary build
+.PHONY: clean-cache
+clean-cache: clean
+ @echo "clean-cache not implemented"
+
+# Try to download cache - called prior to ordinary build
+.PHONY: get-cache
+get-cache:
+ @echo "get-cache not implemented"
+
+# Store cache if not already stored - called after ordinary build
+.PHONY: put-cache
+put-cache:
+ @echo "put-cache not implemented"
diff --git a/build/f_isoroot/f_kscfg/Makefile b/build/f_isoroot/f_kscfg/Makefile
new file mode 100644
index 000000000..cfd433f8d
--- /dev/null
+++ b/build/f_isoroot/f_kscfg/Makefile
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all: ks.cfg.iso
+ @mkdir -p release
+ grep -q OpenStack_Fuel ks.cfg.iso
+ sed "s/OpenStack_Fuel/$(PRODNO)_$(REVSTATE)/g" ks.cfg.iso > ks.cfg
+ /usr/bin/patch -p0 < ks.cfg.patch
+ @cp ks.cfg.iso release/ks.cfg.orig
+ @cp ks.cfg release/ks.cfg
+
+ks.cfg.iso:
+ 7z -so x $(ISOCACHE) ks.cfg > ks.cfg.iso
+
+.PHONY: clean
+clean:
+ @rm -rf release ks.cfg.iso ks.cfg
+
+.PHONY: release
+release: all
+ @cp -Rvp release/* ../release
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+# Clean local data related to caching - called prior to ordinary build
+.PHONY: clean-cache
+clean-cache: clean
+ @echo "clean-cache not implemented"
+
+# Try to download cache - called prior to ordinary build
+.PHONY: get-cache
+get-cache:
+ @echo "get-cache not implemented"
+
+# Store cache if not already stored - called after ordinary build
+.PHONY: put-cache
+put-cache:
+ @echo "put-cache not implemented"
diff --git a/build/f_isoroot/f_kscfg/README b/build/f_isoroot/f_kscfg/README
new file mode 100644
index 000000000..c85efde77
--- /dev/null
+++ b/build/f_isoroot/f_kscfg/README
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+This function modifies the ks.cfg of the Fuel master to
+make copy whatever is in the top level opnfv directory
+of the ISO (populated by, for example, f_configfrontend) to
+/opt/opnfv. In the end this is where the installation
+parts will evolve.
+
+This is also the place to force the installation to overwrite
+the disk (set forceformat="yes" instead of "no").
diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch
new file mode 100644
index 000000000..a6840e479
--- /dev/null
+++ b/build/f_isoroot/f_kscfg/ks.cfg.patch
@@ -0,0 +1,31 @@
+*** /dev/null 2016-04-26 10:10:11.481587709 +0200
+--- ks.cfg 2016-04-26 10:10:11.481587709 +0200
+***************
+*** 579,584 ****
+--- 579,592 ----
+
+ EOF
+
++ ######### OPNFV addition BEGIN ############
++ # Copy data into /opt/opnfv
++ # TODO: This ought to be a package instead!
++ mkdir -p /opt/opnfv
++ cp -r ${SOURCE}/opnfv /opt
++ cp ${SOURCE}/gitinfo.txt /
++ ######### OPNFV addition END ############
++
+ # Unmounting source
+ umount -f ${SOURCE}
+ rm -rf ${SOURCE}
+***************
+*** 647,650 ****
+ /etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} > \
+ /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${adminif}
+ fi
+! %end
+\ No newline at end of file
+--- 655,658 ----
+ /etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} > \
+ /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${adminif}
+ fi
+! %end
diff --git a/build/f_isoroot/f_kvm-pluginbuild/Makefile b/build/f_isoroot/f_kvm-pluginbuild/Makefile
new file mode 100644
index 000000000..81309ef87
--- /dev/null
+++ b/build/f_isoroot/f_kvm-pluginbuild/Makefile
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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: .kvmbuild
+
+.PHONY: clean
+clean:
+ @rm -f .kvmbuild ../release/opnfv/fuel-plugin-kvm*.rpm fuel-plugin-kvm*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_kvm-plugin.txt gitinfo_kvm-plugin.txt
+
+.PHONY: release
+release:.kvmbuild
+ @rm -f ../release/opnfv/fuel-plugin-kvm*.rpm
+ @mkdir -p ../release/opnfv
+ @cp fuel-plugin-kvm*.rpm ../release/opnfv/
+ cp gitinfo_kvm-plugin.txt $(BUILD_BASE)
+
+.kvmbuild:
+ @rm -rf kvmfornfv
+ ../../docker/ubuntu-builder/install_docker.sh
+ git clone $(KVMFORNFV_REPO)
+ cd kvmfornfv; \
+ git checkout $(KVMFORNFV_BRANCH); \
+ if [ ! -z $(KVMFORNFV_CHANGE) ]; then \
+ git fetch $(KVMFORNFV_REPO) $(KVMFORNFV_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ cd kvmfornfv/fuel-plugin; \
+ INCLUDE_DEPENDENCIES=true fpb --debug --build ./
+ @mv kvmfornfv/fuel-plugin/fuel-plugin-kvm*.rpm .
+ $(REPOINFO) -r . > gitinfo_kvm-plugin.txt
+ @rm -rf kvmfornfv
+ @touch .kvmbuild
+ # 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 $(KVMFORNFV_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(KVMFORNFV_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(KVMFORNFV_REPO) $(KVMFORNFV_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(KVMFORNFV_REPO) $(KVMFORNFV_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 - .kvmbuild fuel-plugin-kvm*.rpm gitinfo_kvm-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_kvm-pluginbuild/config.mk b/build/f_isoroot/f_kvm-pluginbuild/config.mk
new file mode 100644
index 000000000..eaef3d414
--- /dev/null
+++ b/build/f_isoroot/f_kvm-pluginbuild/config.mk
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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
+##############################################################################
+
+KVMFORNFV_BRANCH=stable/colorado
+KVMFORNFV_REPO=https://gerrit.opnfv.org/gerrit/kvmfornfv
+KVMFORNFV_CHANGE=e6588d1d59d7ac24f25f644650e6845561dd441b
diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile
new file mode 100644
index 000000000..bf811f25f
--- /dev/null
+++ b/build/f_isoroot/f_odlpluginbuild/Makefile
@@ -0,0 +1,82 @@
+##############################################################################
+# Copyright (c) 2015 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
+##############################################################################
+
+TOP := $(shell pwd)
+
+include config.mk
+
+.PHONY: all
+all: .odlbuild
+
+.PHONY: clean
+clean:
+ @rm -f .odlbuild ../release/opnfv/opendaylight*.rpm opendaylight*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_odlplugin.txt gitinfo_odlplugin.txt
+ @rm -rf fuel-plugins
+
+.PHONY: release
+release:.odlbuild
+ @rm -f ../release/opnfv/opendaylight*.rpm
+ @mkdir -p ../release/opnfv
+ @cp opendaylight*.rpm ../release/opnfv/
+ cp gitinfo_odlplugin.txt $(BUILD_BASE)
+.odlbuild:
+ rm -rf fuel-plugin-opendaylight
+ git clone -b $(FUEL_PLUGIN_ODL_BRANCH) $(FUEL_PLUGIN_ODL_REPO)
+ cd fuel-plugin-opendaylight; \
+ if [ -n $(FUEL_PLUGIN_ODL_CHANGE) ]; then \
+ git checkout $(FUEL_PLUGIN_ODL_CHANGE); \
+ fi
+ fpb --debug --build fuel-plugin-opendaylight/
+ mv fuel-plugin-opendaylight/opendaylight*.rpm .
+ $(REPOINFO) -r . > gitinfo_odlplugin.txt
+ rm -rf fuel-plugin-opendaylight
+ touch .odlbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+
+# 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 $(FUEL_PLUGIN_ODL_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ if [ -n $(FUEL_PLUGIN_ODL_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(FUEL_PLUGIN_ODL_REPO) $(FUEL_PLUGIN_ODL_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(FUEL_PLUGIN_ODL_REPO) $(FUEL_PLUGIN_ODL_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 - .odlbuild opendaylight*.rpm gitinfo_odlplugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_odlpluginbuild/config.mk b/build/f_isoroot/f_odlpluginbuild/config.mk
new file mode 100644
index 000000000..7074ee2e0
--- /dev/null
+++ b/build/f_isoroot/f_odlpluginbuild/config.mk
@@ -0,0 +1,16 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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
+##############################################################################
+
+FUEL_PLUGIN_ODL_BRANCH ?= master
+FUEL_PLUGIN_ODL_CHANGE ?= 58cf41ff4e9ed928bf024b166776b9df1a2e517b
+FUEL_PLUGIN_ODL_REPO ?= https://github.com/openstack/fuel-plugin-opendaylight.git
+
+export ODL_TARBALL_LOCATION?=https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.4.3-Beryllium-SR3/distribution-karaf-0.4.3-Beryllium-SR3.tar.gz
+export ODL_VERSION_NUMBER?=0.4.3
+export ODL_BORON_TARBALL_LOCATION?=http://artifacts.opnfv.org/fuel/colorado/vendor/distribution-karaf-0.5.0-Boron-RC3.5.tar.gz
diff --git a/build/f_isoroot/f_onosfwpluginbuild/Makefile b/build/f_isoroot/f_onosfwpluginbuild/Makefile
new file mode 100644
index 000000000..02ba02951
--- /dev/null
+++ b/build/f_isoroot/f_onosfwpluginbuild/Makefile
@@ -0,0 +1,90 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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: .onosbuild
+
+.PHONY: clean
+clean:
+ @rm -f .onosbuild ../release/opnfv/onos*.rpm onos*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_onos-plugin.txt gitinfo_onos-plugin.txt
+
+.PHONY: release
+release:.onosbuild
+ @rm -f ../release/opnfv/onos*.rpm
+ @mkdir -p ../release/opnfv
+ @cp onos*.rpm ../release/opnfv/
+ cp gitinfo_onos-plugin.txt $(BUILD_BASE)
+
+.onosbuild:
+ @rm -rf fuel-plugin-onos
+ git clone $(ONOS_REPO)
+ cd fuel-plugin-onos; \
+ git checkout $(ONOS_BRANCH); \
+ if [ ! -z $(ONOS_CHANGE) ]; then \
+ git fetch $(ONOS_REPO) $(ONOS_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-onos/
+ @mv fuel-plugin-onos/onos*.rpm .
+ $(REPOINFO) -r . > gitinfo_onos-plugin.txt
+ @rm -rf fuel-plugin-onos
+ @touch .onosbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+
+# 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 $(ONOS_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(ONOS_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(ONOS_REPO) $(ONOS_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(ONOS_REPO) $(ONOS_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 - .onosbuild onos*.rpm gitinfo_onos-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_onosfwpluginbuild/config.mk b/build/f_isoroot/f_onosfwpluginbuild/config.mk
new file mode 100644
index 000000000..19d9d00d0
--- /dev/null
+++ b/build/f_isoroot/f_onosfwpluginbuild/config.mk
@@ -0,0 +1,11 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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
+##############################################################################
+
+ONOS_BRANCH=Mitaka
+ONOS_REPO=git://git.openstack.org/openstack/fuel-plugin-onos
diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile
new file mode 100644
index 000000000..2d0d202af
--- /dev/null
+++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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: .ovsbuild
+
+.PHONY: clean
+clean:
+ @rm -f .ovsbuild ../release/opnfv/fuel-plugin-ovs-*.rpm fuel-plugin-ovs-*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_ovs-nsh-dpdk-plugin.txt gitinfo_ovs-nsh-dpdk-plugin.txt
+
+.PHONY: release
+release:.ovsbuild
+ @rm -f ../release/opnfv/fuel-plugin-ovs-*.rpm
+ @mkdir -p ../release/opnfv
+ @cp fuel-plugin-ovs*.rpm ../release/opnfv/
+ cp gitinfo_ovs-nsh-dpdk-plugin.txt $(BUILD_BASE)
+
+.ovsbuild:
+ @rm -rf fuel-plugin-ovs
+ ../../docker/ubuntu-builder/install_docker.sh
+ git clone $(OVS_NSH_DPDK_REPO)
+ cd fuel-plugin-ovs; \
+ git checkout $(OVS_NSH_DPDK_BRANCH); \
+ if [ ! -z $(OVS_NSH_DPDK_CHANGE) ]; then \
+ git fetch $(OVS_NSH_DPDK_REPO) $(OVS_NSH_DPDK_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-ovs/
+ @mv fuel-plugin-ovs/fuel-plugin-ovs*.rpm .
+ $(REPOINFO) -r . > gitinfo_ovs-nsh-dpdk-plugin.txt
+ @rm -rf fuel-plugin-ovs
+ @touch .ovsbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+
+# 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 $(OVS_NSH_DPDK_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(OVS_NSH_DPDK_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(OVS_NSH_DPDK_REPO) $(OVS_NSH_DPDK_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(OVS_NSH_DPDK_REPO) $(OVS_NSH_DPDK_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 - .ovsbuild fuel-plugin-ovs*.rpm gitinfo_ovs-nsh-dpdk-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk
new file mode 100644
index 000000000..8effbd26b
--- /dev/null
+++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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
+##############################################################################
+
+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_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile
new file mode 100644
index 000000000..7c6b16304
--- /dev/null
+++ b/build/f_isoroot/f_repobuild/Makefile
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+SHELL := /bin/bash
+TOP := $(shell pwd)
+TMP_ROOT_DIR := $(shell echo "$(MIRROR_UBUNTU_ROOT)" | cut -d "/" -f2)
+
+include ../../config.mk
+include config.mk
+
+export MOS_VERSION
+export OPENSTACK_VERSION
+
+.PHONY: all
+all: nailgun
+
+nailgun:
+ sudo apt-get install -y git libxml2-dev libxslt-dev python-dev python-pip libz-dev libyaml-dev createrepo python-yaml
+ rm -Rf nailgun
+ sudo mkdir -p /var/www/nailgun
+ git clone $(FUEL_MIRROR_REPO)
+ cd fuel-mirror && git checkout -q $(FUEL_MIRROR_COMMIT)
+ sudo pip install -U -r ./fuel-mirror/requirements.txt
+ sudo pip install ./fuel-mirror
+ sudo pip install ./fuel-mirror/contrib/fuel_mirror
+ ./opnfv_mirror_conf.py
+ sudo fuel-mirror --debug --config ./opnfv-config.yaml create --group ubuntu --pattern=ubuntu
+ sudo chmod -R 755 /var/www/nailgun
+ cp -Rp /var/www/nailgun .
+ # On the end we want to have ubuntu repository in mirrors/ubuntu directory
+ -if [ "$(MIRROR_UBUNTU_ROOT)" != "/ubuntu/" ]; then \
+ mkdir -p nailgun/mirrors/ubuntu;\
+ mv nailgun/mirrors$(MIRROR_UBUNTU_ROOT)* nailgun/mirrors/ubuntu;\
+ [ "$(MIRROR_UBUNTU_ROOT)" != "/" ] && rm -rf nailgun/mirrors/$(TMP_ROOT_DIR);\
+ fi
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+.PHONY: clean
+clean:
+ @rm -rf ../release/opnfv/nailgun nailgun fuel-mirror opnfv-config.yaml ubuntu.yaml
+
+.PHONY: release
+release:nailgun
+ @rm -Rf ../release/opnfv/nailgun
+ @mkdir -p ../release/opnfv
+ @cp -Rp nailgun ../release/opnfv/nailgun
+ @cp fuel_bootstrap_cli.yaml ../release/opnfv/
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+# Create a unique hash to be used for getting and putting cache, based on:
+# - Year and week (causing the cache to be rebuilt weekly)
+# - The contents of this Makefile
+.cacheid:
+ date +"Repocache %G%V" > .cachedata
+ sha1sum Makefile >> .cachedata
+ sha1sum config.mk >> .cachedata
+ $(CACHETOOL) packages >> .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 - nailgun | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_repobuild/config.mk b/build/f_isoroot/f_repobuild/config.mk
new file mode 100644
index 000000000..d81732849
--- /dev/null
+++ b/build/f_isoroot/f_repobuild/config.mk
@@ -0,0 +1,13 @@
+##############################################################################
+# Copyright (c) 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
+##############################################################################
+
+FUEL_MIRROR_REPO?=https://github.com/openstack/fuel-mirror
+# Point to the commit where 302 redirects are handled
+# https://bugs.launchpad.net/fuel/mitaka/+bug/1593674
+FUEL_MIRROR_COMMIT?=192a3d9f8f993afb12c5108dd9339c6688c23e11
diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
new file mode 100644
index 000000000..fcf4257f1
--- /dev/null
+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
@@ -0,0 +1,75 @@
+##############################################################################
+# 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
+##############################################################################
+---
+ root_ssh_authorized_file: /root/.ssh/id_rsa.pub
+ extend_kopts: "biosdevname=0 net.ifnames=1 debug ignore_loglevel log_buf_len=10M print_fatal_signals=1 LOGLEVEL=8"
+ ubuntu_release: trusty
+ extra_dirs:
+ - /usr/share/fuel_bootstrap_cli/files/trusty
+ output_dir: /tmp/
+ kernel_flavor: linux-image-generic-lts-trusty
+ packages:
+ - fuel-agent
+ - hwloc
+ - hpsa-dkms
+ - i40e-dkms
+ - linux-firmware
+ - linux-firmware-nonfree
+ - linux-headers-generic
+ - live-boot
+ - live-boot-initramfs-tools
+ - mc
+ - mcollective
+ - msmtp-mta
+ - multipath-tools
+ - multipath-tools-boot
+ - nailgun-agent
+ - nailgun-mcagents
+ - network-checker
+ - ntp
+ - openssh-client
+ - openssh-server
+ - squashfs-tools
+ - ubuntu-minimal
+ - vim
+ - wget
+ - xz-utils
+ bootstrap_images_dir: /var/www/nailgun/bootstraps
+ active_bootstrap_symlink: /var/www/nailgun/bootstraps/active_bootstrap
+ flavor: ubuntu
+ http_proxy: ""
+ https_proxy: ""
+ repos:
+ - name: ubuntu
+ section: "main universe multiverse"
+ uri: "http://127.0.0.1:8080/mirrors/ubuntu"
+ priority:
+ suite: trusty
+ type: deb
+ - name: ubuntu-updates
+ section: "main universe multiverse"
+ uri: "http://127.0.0.1:8080/mirrors/ubuntu"
+ priority:
+ suite: trusty-updates
+ type: deb
+ - name: ubuntu-security
+ section: "main universe multiverse"
+ uri: "http://127.0.0.1:8080/mirrors/ubuntu"
+ priority:
+ suite: trusty-security
+ type: deb
+ - name: mos
+ section: "main restricted"
+ uri: "http://127.0.0.1:8080/ubuntu/x86_64"
+ priority: 1050
+ suite: mos9.0
+ type: deb
+ skip_default_img_build: false
+ direct_repo_addresses:
+ - "127.0.0.1"
diff --git a/build/f_isoroot/f_repobuild/opnfv_mirror_conf.py b/build/f_isoroot/f_repobuild/opnfv_mirror_conf.py
new file mode 100755
index 000000000..1c7eb591a
--- /dev/null
+++ b/build/f_isoroot/f_repobuild/opnfv_mirror_conf.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+##############################################################################
+# Copyright (c) 2015 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
+##############################################################################
+import os
+import yaml
+
+current_snapshot = os.environ["LATEST_TARGET_UBUNTU"]
+mos_version = os.environ['MOS_VERSION']
+openstack_version = os.environ['OPENSTACK_VERSION']
+mos_ubuntu = os.environ['MIRROR_MOS_UBUNTU']
+mos_ubuntu_root = os.environ['MIRROR_MOS_UBUNTU_ROOT']
+mirror_ubuntu = os.environ['MIRROR_UBUNTU_URL']
+if os.environ.get('BUILD_FUEL_PLUGINS'):
+ plugins = os.environ['BUILD_FUEL_PLUGINS']
+else:
+ plugins = os.environ['PLUGINS']
+
+
+configuration_file = open('fuel-mirror/contrib/fuel_mirror/etc/config.yaml').read()
+conf = yaml.load(configuration_file)
+conf['pattern_dir'] = '.'
+conf['openstack_version'] = openstack_version
+conf['mos_version'] = mos_version
+
+with open('opnfv-config.yaml', 'w') as outfile:
+ outfile.write( yaml.dump(conf, default_flow_style=False) )
+
+pattern_file = open('fuel-mirror/contrib/fuel_mirror/data/ubuntu.yaml').read()
+pattern = yaml.load(pattern_file)
+pattern['mos_baseurl'] = "http://{}{}".format(mos_ubuntu, mos_ubuntu_root)
+pattern['ubuntu_baseurl'] = mirror_ubuntu
+for group in pattern['groups']['mos']:
+ group['uri'] = pattern['mos_baseurl']
+for group in pattern['groups']['ubuntu']:
+ group['uri'] = pattern['ubuntu_baseurl']
+
+for plugin in plugins.split():
+ path = "../{}/packages.yaml".format(plugin)
+ if os.path.isfile(path):
+ f = open(path).read()
+ plugin_yaml = yaml.load(f)
+ plugin_set = set(plugin_yaml['packages'])
+ main_set = set(pattern['packages'])
+ new_packages = plugin_set - main_set
+ print "Plugin {} require new packages: {}".format(plugin, ', '.join(new_packages))
+ pattern['packages'] = pattern['packages'] + list(new_packages)
+
+pattern['requirements']['ubuntu'] = pattern['packages']
+
+with open('ubuntu.yaml', 'w') as outfile:
+ outfile.write( yaml.safe_dump(pattern, default_flow_style=False) )
diff --git a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
new file mode 100755
index 000000000..20b3485a1
--- /dev/null
+++ b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+##############################################################################
+# 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
+##############################################################################
+
+# Try to choose close ubuntu mirror from mirrors.txt, but "whitewash" this
+# against the full repo list to removed mirrors not up-to-date.
+
+# Some Ubuntu mirrors seem less reliable for this type of mirroring -
+# as they are discoved they can be added to the blacklist below in order
+# for them not to be considered.
+BLACKLIST="mirror.clibre.uqam.ca"
+
+#NOTE: For now the mirror selection is disabled due to issues not yet
+# understood/resolved.
+#for url in $((curl -s https://launchpad.net/ubuntu/+archivemirrors | \
+# grep -P -B8 "statusUP|statusSIX" | \
+# grep -o -P "(f|ht)tp.*\"" | \
+# sed 's/"$//' | sort | uniq; \
+# curl -s http://mirrors.ubuntu.com/mirrors.txt | sort | uniq) | \
+# sort | uniq -d)
+#do
+# host=$(echo $url | cut -d'/' -f3)
+# echo ${BLACKLIST} | grep -q ${host} && continue
+# if curl -s -o /dev/null --head --fail "$url"; then
+# echo $url
+# exit 0
+# else
+# continue
+# fi
+#done
+
+# If no suitable local mirror can be found,
+# the default archive is returned instead.
+echo "http://archive.ubuntu.com/ubuntu/"
diff --git a/build/f_isoroot/f_vsperfpluginbuild/Makefile b/build/f_isoroot/f_vsperfpluginbuild/Makefile
new file mode 100644
index 000000000..73de611ff
--- /dev/null
+++ b/build/f_isoroot/f_vsperfpluginbuild/Makefile
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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: .vsperfbuild
+
+.PHONY: clean
+clean:
+ @rm -f .vsperfbuild ../release/opnfv/fuel-plugin-vsperf*.rpm fuel-plugin-vsperf*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_vsperf-plugin.txt gitinfo_vsperf-plugin.txt
+
+.PHONY: release
+release:.vsperfbuild
+ @rm -f ../release/opnfv/fuel-plugin-vsperf*.rpm
+ @mkdir -p ../release/opnfv
+ @cp fuel-plugin-vsperf*.rpm ../release/opnfv/
+ cp gitinfo_vsperf-plugin.txt $(BUILD_BASE)
+
+.vsperfbuild:
+ @rm -rf vswitchperf
+ ../../docker/ubuntu-builder/install_docker.sh
+ git clone $(VSPERF_REPO) vswitchperf
+ cd vswitchperf; \
+ git checkout $(VSPERF_BRANCH); \
+ if [ ! -z $(VSPERF_CHANGE) ]; then \
+ git fetch $(VSPERF_REPO) $(VSPERF_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ cd vswitchperf; \
+ INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-vsperf/
+ @mv vswitchperf/fuel-plugin-vsperf/fuel-plugin-vsperf*.rpm .
+ $(REPOINFO) -r . > gitinfo_vsperf-plugin.txt
+ @rm -rf fuel-plugin-vsperf
+ @touch .vsperfbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+
+# 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 $(VSPERF_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(VSPERF_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(VSPERF_REPO) $(VSPERF_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(VSPERF_REPO) $(VSPERF_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 - .vsperfbuild fuel-plugin-vsperf*.rpm gitinfo_vsperf-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_vsperfpluginbuild/config.mk b/build/f_isoroot/f_vsperfpluginbuild/config.mk
new file mode 100644
index 000000000..35f4059f1
--- /dev/null
+++ b/build/f_isoroot/f_vsperfpluginbuild/config.mk
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.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
+##############################################################################
+
+VSPERF_BRANCH?=5a0c6772d255aeb0ab1e6246c91bbeb56bb3a239
+VSPERF_REPO?=https://gerrit.opnfv.org/gerrit/vswitchperf.git
+VSPERF_CHANGE?=
diff --git a/build/f_isoroot/f_yardstick-pluginbuild/Makefile b/build/f_isoroot/f_yardstick-pluginbuild/Makefile
new file mode 100644
index 000000000..32de3b3f4
--- /dev/null
+++ b/build/f_isoroot/f_yardstick-pluginbuild/Makefile
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.com
+# ruijing.guo@intel.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: .yardstickbuild
+
+.PHONY: clean
+clean:
+ @rm -f .yardstickbuild ../release/opnfv/fuel-plugin-yardstick*.rpm fuel-plugin-yardstick*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_yardstick-plugin.txt gitinfo_yardstick-plugin.txt
+
+.PHONY: release
+release:.yardstickbuild
+ @rm -f ../release/opnfv/fuel-plugin-yardstick*.rpm
+ @mkdir -p ../release/opnfv
+ @cp fuel-plugin-yardstick*.rpm ../release/opnfv/
+ cp gitinfo_yardstick-plugin.txt $(BUILD_BASE)
+
+.yardstickbuild:
+ @rm -rf yardstick
+ git clone $(YARDSTICK_REPO) yardstick
+ cd yardstick; \
+ git checkout $(YARDSTICK_BRANCH); \
+ if [ ! -z $(YARDSTICK_CHANGE) ]; then \
+ git fetch $(YARDSTICK_REPO) $(YARDSTICK_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ cd yardstick; \
+ INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin/
+ @mv yardstick/fuel-plugin/fuel-plugin-yardstick*.rpm .
+ $(REPOINFO) -r . > gitinfo_yardstick-plugin.txt
+ @rm -rf fuel-plugin-yardstick
+ @touch .yardstickbuild
+ # 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 $(YARDSTICK_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(YARDSTICK_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(YARDSTICK_REPO) $(YARDSTICK_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(YARDSTICK_REPO) $(YARDSTICK_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 - .yardstickbuild fuel-plugin-yardstick*.rpm gitinfo_yardstick-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_yardstick-pluginbuild/config.mk b/build/f_isoroot/f_yardstick-pluginbuild/config.mk
new file mode 100644
index 000000000..88b1ea604
--- /dev/null
+++ b/build/f_isoroot/f_yardstick-pluginbuild/config.mk
@@ -0,0 +1,13 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.com
+# ruijing.guo@intel.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
+##############################################################################
+
+YARDSTICK_BRANCH?=86b9fc4f434c72bd276e4bf1ce7d7f5a04b150b2
+YARDSTICK_REPO?=https://gerrit.opnfv.org/gerrit/yardstick.git
+YARDSTICK_CHANGE?=
diff --git a/build/fuel_build_loop b/build/fuel_build_loop
new file mode 100755
index 000000000..324f28c1a
--- /dev/null
+++ b/build/fuel_build_loop
@@ -0,0 +1,31 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+echo "MIRROR_MOS_UBUNTU_ROOT=${MIRROR_MOS_UBUNTU_ROOT}"
+echo "MIRROR_FUEL=${MIRROR_FUEL}"
+
+maxcount=3
+cnt=0
+rc=1
+while [ $cnt -lt $maxcount ] && [ $rc -ne 0 ]
+do
+ cnt=$[cnt + 1]
+ echo -e "\n\n\n*** Starting build attempt # $cnt"
+ cd /tmp/fuel-main
+ make iso
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ echo "### Build failed with rc $rc ###"
+ else
+ echo "### Build successful at attempt # $cnt"
+ fi
+done
+exit $rc
diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf
new file mode 100644
index 000000000..0d15aec6f
--- /dev/null
+++ b/build/install/apt-ftparchive-deb.conf
@@ -0,0 +1,35 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+Dir {
+ ArchiveDir ".";
+};
+
+TreeDefault {
+ Directory "pool";
+};
+
+BinDirectory "pool/main" {
+ Packages "dists/trusty/main/binary-amd64/Packages";
+ BinOverride "./indices/override.trusty.main";
+ ExtraOverride "./indices/override.trusty.extra.main";
+};
+
+Default {
+ Packages {
+ Extensions ".deb";
+ Compress ". gzip";
+ };
+};
+
+Contents {
+ Compress "gzip";
+};
+
diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf
new file mode 100644
index 000000000..02706bd7d
--- /dev/null
+++ b/build/install/apt-ftparchive-release.conf
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+APT::FTPArchive::Release::Origin "Ubuntu";
+APT::FTPArchive::Release::Label "Ubuntu";
+APT::FTPArchive::Release::Suite "trusty";
+APT::FTPArchive::Release::Version "1.04";
+APT::FTPArchive::Release::Codename "trusty";
+APT::FTPArchive::Release::Architectures "amd64";
+APT::FTPArchive::Release::Components "main";
+APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS";
diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf
new file mode 100644
index 000000000..3b5b239a6
--- /dev/null
+++ b/build/install/apt-ftparchive-udeb.conf
@@ -0,0 +1,33 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+Dir {
+ ArchiveDir ".";
+};
+
+TreeDefault {
+ Directory "pool";
+};
+
+BinDirectory "pool/debian-installer" {
+ Packages "dists/trusty/main/debian-installer/binary-amd64/Packages";
+ BinOverride "./indices/override.trusty.main.debian-installer";
+};
+
+Default {
+ Packages {
+ Extensions ".udeb";
+ Compress ". gzip";
+ };
+};
+
+Contents {
+ Compress "gzip";
+};
diff --git a/build/install/install.sh b/build/install/install.sh
new file mode 100755
index 000000000..c63241974
--- /dev/null
+++ b/build/install/install.sh
@@ -0,0 +1,482 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+my_exit() {
+ rc=$?
+
+ cd /tmp
+
+ if [ -n "$TMP_HOSTMOUNT" ]; then
+ if [ -d "$TMP_HOSTMOUNT" ]; then
+ fusermount -u $TMP_HOSTMOUNT
+ rmdir $TMP_HOSTMOUNT
+ fi
+ fi
+
+ if [ -d "$TMP_OLDISO" ]; then
+ fusermount -u $TMP_OLDISO
+ rmdir $TMP_OLDISO
+ fi
+
+ if [ -f "$CONF" ]; then
+ rm $CONF
+ fi
+
+ if [ -d "$TMP_ISOPUPPET" ]; then
+ rm -Rf $TMP_ISOPUPPET
+ fi
+}
+
+get_deb_name() {
+ ar p $1 control.tar.gz | tar xzO ./control | grep "^Package:.* " | sed 's/.* //'
+ if [ $PIPESTATUS -ne 0 ]; then
+ echo "Error in get_deb_name($1)"
+ exit 1
+ fi
+}
+
+get_deb_rev() {
+ ar p $1 control.tar.gz | tar xzO ./control | grep "^Version:.* " | sed 's/.* //'
+ if [ $PIPESTATUS -ne 0 ]; then
+ echo "Error in get_deb_rev($1)"
+ exit 1
+ fi
+}
+
+
+# Added logic for ".orig" files:
+# 1. Is there an .orig file for the new file?
+# 2. If the file is not present in base ISO -> Error!
+# 3. If the file is changed i base ISO -> Error! (need manual rebase)
+# 4. If there is no .orig file, but file is present in base ISO: Error!
+verify_orig_files() {
+ OLDDIR=$1
+ NEWDIR=$2
+
+ pushd $NEWDIR >/dev/null
+ for f in $(find * -type f -name '*.orig')
+ do
+ origfile=$NEWDIR/$f
+ oldfile=$OLDDIR/$(echo $f | sed 's/.orig$//')
+ newfile=$NEWDIR/$(echo $f | sed 's/.orig$//')
+
+ origfile=${newfile}.orig
+ # If no corresponding base file, error
+ if [ ! -f $oldfile ]; then
+ printf "\n\n\n\n"
+ echo "Error: found ${newfile} but no"
+ echo "Error: ${oldfile}"
+ echo "Error: Manual rebase is needed!"
+ printf "\n\n\n\n"
+ exit 1
+ fi
+
+ # If orig file differs from base file, error
+ if ! diff -q $origfile $oldfile > /dev/null; then
+ printf "\n\n\n\n"
+ echo "Error: $origfile differs from"
+ echo "Error: $oldfile!"
+ echo "Error: Manual rebase is needed!"
+ printf "\n\n\n\n"
+ exit 1
+ fi
+
+ done
+
+
+ # Check that there we're not overwriting oldfiles without having a ".orig" copy
+ for f in $(find * -type f ! -name '*.orig')
+ do
+ newfile=$NEWDIR/$(echo $f | sed 's/.orig$//')
+ origfile=${newfile}.orig
+ oldfile=$OLDDIR/$f
+ if [ -f $oldfile ]; then
+ if [ ! -f $origfile ]; then
+ printf "\n\n\n\n"
+ echo "Error: Will overwrite $oldfile, but there is no"
+ echo "Error: $origfile!"
+ echo "Error: You need to create the `basename $origfile`!"
+ printf "\n\n\n\n"
+ exit 1
+ fi
+ fi
+ done
+
+
+ popd >/dev/null
+}
+
+prep_make_live() {
+ DEST=$TMP_HOSTMOUNT
+ REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
+ echo "Live install"
+ ssh-copy-id root@$FUELHOST
+ sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
+
+ if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
+ echo "Error - found backup file for Packages!"
+ exit 1
+ fi
+
+ if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
+ echo "Error - found backup file for Packages.gz!"
+ exit 1
+ fi
+
+ if [ -f $REPO/dists/trusty/Release.backup ]; then
+ echo "Error - found backup file for Release!"
+ exit 1
+ fi
+
+ if [ -d $DEST/etc/puppet.backup ]; then
+ echo "Error - found backup file for Puppet!"
+ exit 1
+ fi
+
+ cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup
+ cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup
+ cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup
+ cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
+}
+
+post_make_live() {
+ if [ -d $TOP/release/puppet/modules ]; then
+ echo "Installing into Puppet:"
+ cd $TOP/release/puppet/modules
+ if [ `ls -1 | wc -l` -gt 0 ]; then
+ for dir in *
+ do
+ echo " $dir"
+ cp -Rp $dir $DEST/etc/puppet/modules
+ done
+ fi
+ fi
+}
+
+make_live() {
+ prep_make_live
+ copy_packages
+ post_make_live
+}
+
+
+prep_make_iso() {
+ DEST=$TOP/newiso
+ REPO=$DEST/ubuntu
+ echo "Preparing ISO..."
+ echo "Unpack of old ISO..."
+ if [ -d newiso ]; then
+ chmod -R 755 newiso
+ rm -rf newiso
+ fi
+ mkdir newiso
+ fusermount -u $TMP_OLDISO 2>/dev/null || cat /dev/null
+ fuseiso -p $ORIGISO $TMP_OLDISO
+ sleep 1
+ cd $TMP_OLDISO
+ find . | cpio -pd $TOP/newiso
+ cd ..
+ fusermount -u $TMP_OLDISO
+ rm -Rf $TMP_OLDISO
+ chmod -R 755 $TOP/newiso
+}
+
+make_iso_image() {
+ echo "Making ISO..."
+ cd $DEST
+ find . -name TRANS.TBL -exec rm {} \;
+ rm -rf rr_moved
+
+ mkisofs --quiet -r -V "$VOLUMEID" -publisher "$PUBLISHER" \
+ -p `git rev-parse --verify HEAD` -J -R -b isolinux/isolinux.bin \
+ -no-emul-boot \
+ -boot-load-size 4 -boot-info-table \
+ --hide-rr-moved \
+ --joliet-long \
+ -x "lost+found" -o $NEWISO .
+
+ isoinfo -d -i $NEWISO
+}
+
+# iso_copy_puppet: Create a new puppet-slave.tgz for the iso
+iso_copy_puppet() {
+ echo "Installing into Puppet..."
+ mkdir -p $TMP_ISOPUPPET/release/puppet
+ cd $TMP_ISOPUPPET/release/puppet
+ tar xzf $DEST/puppet-slave.tgz
+ cd $TOP/release/puppet/modules
+
+ # Remove all .orig files before copying as they now have been verfied
+
+ if [ -d $TOP/release/puppet/modules ]; then
+ if [ `ls -1 | wc -l` -gt 0 ]; then
+ verify_orig_files $TMP_ISOPUPPET/release/puppet $TOP/release/puppet/modules
+ find $TOP/release/puppet/modules -type f -name '*.orig' -exec rm {} \;
+ for dir in $TOP/release/puppet/modules/*
+ do
+ echo " $dir"
+ cp -Rp $dir $TMP_ISOPUPPET/release/puppet
+ done
+ fi
+ fi
+
+ cd $TMP_ISOPUPPET/release/puppet
+ tar czf $DEST/puppet-slave.tgz .
+ cd $TOP
+ rm -Rf $TMP_ISOPUPPET
+}
+
+# iso_modify_image: Add/patch files in the ISO root
+iso_modify_image () {
+ # TODO: Add logic for ".orig" files (hey! make a function!), which would look
+ # something like:
+ # 1. Is there an .orig file?
+ # 2. If the file is not present in origiso -> Error exit
+ # 3. If the file is changed in origiso -> Error exit (need manual rebase)
+ # 4. Otherwise continue, but don't copy orig file (or maybe we should?)
+ # ... and corresponding reverse logic:
+ # 1. If there is no .orig file, but file is present in origiso -> Error exit
+ echo "Modify ISO files (wild copy)..."
+
+ verify_orig_files $DEST $TOP/release/isoroot
+ # Remove all .orig files before copying as they now have been verfied
+ find $TOP/release/isoroot -type f -name '*.orig' -exec rm {} \;
+
+ cd $TOP/release/isoroot
+ cp -Rvp . $DEST
+
+ # Add all Git info files
+ sort $TOP/gitinfo*.txt > $DEST/gitinfo.txt
+ cp $DEST/gitinfo.txt $REPORTFILE
+}
+
+make_iso() {
+ prep_make_iso
+ copy_packages
+ #iso_copy_puppet
+ iso_modify_image
+ make_iso_image
+}
+
+copy_packages() {
+ echo "Copying Debian packages..."
+ cd $TOP/release/packages/ubuntu/pool/debian-installer
+
+ for udeb in `ls -1 | grep '\.udeb$'`
+ do
+ echo " $udeb"
+ cp $udeb $REPO/pool/debian-installer
+ echo "Did not expect a package here, not supported"
+ exit 1
+ done
+
+ cd $TOP/release/packages/ubuntu/pool/main
+ for deb in `ls -1 | grep '\.deb$'`
+ do
+ echo " $deb"
+ cp $deb $REPO/pool/main
+ echo "Did not expect a package here, not supported"
+ exit 1
+ done
+
+ echo "Running Fuel package patch file"
+ pushd $REPO/pool/main > /dev/null
+
+ for line in `cat $TOP/apply_patches | grep -v "^#" | grep -v "^$"`; do
+ echo "Line is $line"
+ echo "Did not expect a line here, not supported"
+ exit 1
+ ref=`echo $line | cut -d '>' -f 1`
+ origpkg=`echo $line| cut -d '>' -f 2`
+ url=`echo $line | cut -d '>' -f 3`
+
+ if [ -z "$origpkg" ]; then
+ echo "Error: No origpkg for patching"
+ exit 1
+ fi
+
+ if [ -z "$url" ]; then
+ echo "Error: No url for patching"
+ exit 1
+ fi
+
+ if [ -z "$ref" ]; then
+ echo "Error: No reference text for patching"
+ exit 1
+ fi
+
+ echo "CM: Patching Fuel package for $ref" | tee -a $REPORTFILE
+ echo "CM: Replacing package $origpkg with $url" | tee -a $REPORTFILE
+ oldrev=`get_deb_rev $origpkg`
+ rm $origpkg
+ wget --quiet $url
+ topkg=`basename $url`
+ echo "CM: MD5 of new package:" | tee -a $REPORTFILE
+ md5sum $topkg | tee -a $REPORTFILE
+
+ patchname=`get_deb_name $topkg`
+ patchrev=`get_deb_rev $topkg`
+ echo "Correcting dependencies towards $patchname rev $patchrev - old rev $oldrev" | tee -a $REPORTFILE
+ $TOP/patch-packages/tools/correct_deps $patchname $oldrev $patchrev | tee -a $REPORTFILE
+ if [ $PIPESTATUS -ne 0 ]; then
+ exit 1
+ fi
+ done
+
+ printf "Done running Fuel patch file\n\n"
+ echo "Running add packages file"
+ for line in `cat $TOP/add_opnfv_packages | grep -v "^#" | grep -v "^$"`; do
+ echo "Line is $line"
+ echo "Did not expect a line here, not supported"
+ exit 1
+ ref=`echo $line | cut -d '>' -f 1`
+ origpkg=`echo $line| cut -d '>' -f 2`
+ url=`echo $line | cut -d '>' -f 3`
+
+ if [ -z "$origpkg" ]; then
+ echo "Error: No origpkg for patching"
+ exit 1
+ fi
+
+ if [ -z "$url" ]; then
+ echo "Error: No url for patching"
+ exit 1
+ fi
+
+ if [ -z "$ref" ]; then
+ echo "Error: No reference text for patching"
+ exit 1
+ fi
+
+ if [ "$origpkg" != "NONE" ]; then
+ echo "CM: Patching added package for $ref" | tee -a $REPORTFILE
+ echo "CM: Replacing package $origpkg with $url" | tee -a $REPORTFILE
+ oldrev=`get_deb_rev $origpkg`
+ rm $origpkg
+ else
+ echo "CM: Adding previoulsy uninstalled package for $ref" tee -a $REPORTFILE
+ fi
+ wget --quiet $url
+ topkg=`basename $url`
+ echo "CM: MD5 of new package:" | tee -a $REPORTFILE
+ md5sum $topkg | tee -a $REPORTFILE
+ if [ "$origpkg" != "NONE" ]; then
+ patchname=`get_deb_name $topkg`
+ patchrev=`get_deb_rev $topkg`
+ echo "Correcting dependencies towards $patchname rev $patchrev - old rev $oldrev" | tee -a $REPORTFILE
+ $TOP/patch-packages/tools/correct_deps $patchname $oldrev $patchrev | tee -a $REPORTFILE
+ if [ $PIPESTATUS -ne 0 ]; then
+ exit 1
+ fi
+ fi
+ done
+ printf "Done running add packages file\n\n"
+
+ popd > /dev/null
+
+ if [ -f $TOP/patch-packages/release/patch-replacements ]; then
+ echo "Applying package patches" | tee -a $REPORTFILE
+ pushd $REPO/pool/main > /dev/null
+ printf "\n\n" | tee -a $REPORTFILE
+ for line in `cat $TOP/patch-packages/release/patch-replacements`
+ do
+ echo "Did not expect a line here, not supported"
+ exit 1
+ frompkg=`echo $line | cut -d ">" -f 1`
+ topkg=`echo $line | cut -d ">" -f 2`
+ echo "CM: Applying patch to $frompkg" | tee -a $REPORTFILE
+ echo "CM: New package rev after patch: $topkg" | tee -a $REPORTFILE
+
+ if [ ! -f $frompkg ]; then
+ echo "Error: Can't find $frompkg in repo"
+ exit 1
+ else
+ oldrev=`get_deb_rev $frompkg`
+ echo "Removing $frompkg from repo"
+ rm $frompkg
+ fi
+
+ if [ ! -f $TOP/patch-packages/release/packages/$topkg ]; then
+ echo "Error: Can't find $topkg in patch release"
+ exit 1
+ else
+ echo "Adding $topkg to repo"
+ cp $TOP/patch-packages/release/packages/$topkg .
+ fi
+
+ patchname=`get_deb_name $topkg`
+ patchrev=`get_deb_rev $topkg`
+ echo "Correcting dependencies towards $patchname rev $patchrev - old rev $oldrev" | tee -a $REPORTFILE
+ $TOP/patch-packages/tools/correct_deps $patchname $oldrev $patchrev | tee -a $REPORTFILE
+ if [ $PIPESTATUS -ne 0 ]; then
+ exit 1
+ fi
+ done
+ popd > /dev/null
+ fi
+
+ echo "Generating metadata..."
+ pushd $REPO > /dev/null
+
+ # The below methods are from 15B
+ APT_REL_CONF="$TOP/install/apt-ftparchive-release.conf"
+ APT_DEB_CONF="$TOP/install/apt-ftparchive-deb.conf"
+ APT_UDEB_CONF="$TOP/install/apt-ftparchive-udeb.conf"
+
+ echo Not running echo apt-ftparchive -c "${APT_REL_CONF}" generate "${APT_DEB_CONF}"
+ echo Not running apt-ftparchive -c "${APT_REL_CONF}" generate "${APT_DEB_CONF}"
+ echo Not running apt-ftparchive generate "${APT_UDEB_CONF}"
+ echo Not running apt-ftparchive generate "${APT_UDEB_CONF}"
+
+ # Fuel also needs this index file
+ # cat dists/trusty/main/binary-amd64/Packages | \
+ # awk '/^Package:/{pkg=$2}
+ # /^Version:/{print pkg ": \"" $2 "\""}' > ubuntu-versions.yaml
+ # cp ubuntu-versions.yaml $DEST
+
+ # apt-ftparchive -c "${APT_REL_CONF}" release dists/trusty/ > dists/trusty/Release
+ # gzip -9cf dists/trusty/Release > dists/trusty/Release.gz
+
+ popd > /dev/null
+
+}
+
+
+#############################################################################
+
+trap my_exit EXIT
+
+CONF=`mktemp /tmp/XXXXXXX`
+MODE=$1
+TOP=`pwd`
+
+if [ $MODE = "iso" ]; then
+ PUBLISHER="OPNFV"
+ TMP_OLDISO=`mktemp -d /tmp/XXXXXXX`
+ TMP_ISOPUPPET=`mktemp -d /tmp/XXXXXXX`
+ ORIGISO=$2
+ NEWISO=$3
+ VOLUMEID="$4_$5"
+ REPORTFILE="${NEWISO}.txt"
+ echo "Opening reportfile at $REPORTFILE"
+ touch $REPORTFILE
+ if [ ! -f $ORIGISO ]; then
+ echo "Can't find original iso at $ORIGISO"
+ rm $CONF
+ exit 1
+ fi
+
+ make_iso
+else
+ echo "Unknown mode: $MODE"
+ exit 1
+fi
diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh
new file mode 100755
index 000000000..a9e74bc39
--- /dev/null
+++ b/build/install/uninstall.sh
@@ -0,0 +1,79 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+my_exit() {
+ cd /tmp
+ if [ -d "$MOUNT" ]; then
+ fusermount -u $MOUNT
+ rmdir $MOUNT
+ fi
+}
+trap my_exit EXIT
+
+echo "Live uninstall is currently disabled as it is not tested"
+exit 1
+
+TOP=`pwd`
+MOUNT=`mktemp -d /tmp/XXXXXXX`
+ssh-copy-id root@10.20.0.2
+sshfs root@10.20.0.2:/ $MOUNT
+
+DEST=$MOUNT
+REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
+
+cd $REPO
+if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
+ echo "Error - didn't find backup file for Packages!"
+ exit 1
+fi
+
+if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
+ echo "Error - didn't find backup file for Packages.gz!"
+ exit 1
+fi
+
+if [ ! -f $REPO/dists/trusty/Release.backup ]; then
+ echo "Error - didn't find backup file for Release!"
+ exit 1
+fi
+
+if [ ! -f $DEST/etc/puppet/manifests/site.pp.backup ]; then
+ echo "Error - didn't find backup file for site.pp!"
+ exit 1
+fi
+
+echo "Removing Debian packages:"
+cd $TOP/release/pool/main
+for deb in *.deb
+do
+ echo " $deb"
+ rm -Rf $REPO/pool/main/$deb
+done
+cd $REPO
+
+echo "Removing Puppet modules:"
+cd $TOP/puppet/modules
+for dir in *
+do
+ echo " $dir"
+ rm -Rf $DEST/etc/puppet/modules/$dir
+done
+cd $REPO
+
+echo "Restoring backups of datafiles"
+
+rm -f $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.gz
+rm -f $REPO/dists/trusty/Release $DEST/etc/puppet/manifests/site.pp
+mv $REPO/dists/trusty/main/binary-amd64/Packages.backup $REPO/dists/trusty/main/binary-amd64/Packages
+mv $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup $REPO/dists/trusty/main/binary-amd64/Packages.gz
+mv $REPO/dists/trusty/Release.backup $REPO/dists/trusty/Release
+mv $DEST/etc/puppet/manifests/site.pp.backup $DEST/etc/puppet/manifests/site.pp
diff --git a/build/patch-packages/Makefile b/build/patch-packages/Makefile
new file mode 100644
index 000000000..339c9e7cf
--- /dev/null
+++ b/build/patch-packages/Makefile
@@ -0,0 +1,26 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+SUBDIRS :=
+SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
+
+.PHONY: $(SUBDIRS) $(SUBCLEAN) clean
+$(SUBDIRS):
+ @mkdir -p release/packages
+ ORIGISO=$(ORIGISO) REVSTATE=$(REVSTATE) $(MAKE) -C $@ -f Makefile release
+
+release: $(SUBDIRS)
+ @echo $(ORIGISO)
+
+clean: $(SUBCLEAN)
+ @rm -Rf release
+
+$(SUBCLEAN): %.clean:
+ $(MAKE) -C $* -f Makefile clean
diff --git a/build/patch-packages/tools/correct_deps b/build/patch-packages/tools/correct_deps
new file mode 100755
index 000000000..cfb7d538f
--- /dev/null
+++ b/build/patch-packages/tools/correct_deps
@@ -0,0 +1,78 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+patch_package () {
+ deb=$1
+ pkgdep=$2
+ newrev=$3
+
+
+ tmpdir=`mktemp -d /tmp/patchXXXXX`
+
+ cp $deb $tmpdir
+ pushd $tmpdir > /dev/null
+
+ mkdir -p repack
+ dpkg -x $deb repack
+
+ mkdir -p repack/DEBIAN
+ dpkg -e $deb repack/DEBIAN
+
+
+ pushd repack/DEBIAN > /dev/null
+
+ echo "Before: `cat control | grep '^Depends:'`"
+ sed -i "s/$pkgdep (\([^ ]*\) [^)]*)/$pkgdep (\1 $newrev)/" control
+ echo "After: `cat control | grep '^Depends:'`"
+ popd > /dev/null
+
+ fakeroot dpkg-deb --build repack
+
+ popd > /dev/null
+
+ cp $tmpdir/repack.deb $deb
+ rm -Rf $tmpdir
+}
+
+# Name of package for which to check dependencies to
+PKGDEP=$1
+# The old revision of the package in question
+OLDREV=$2
+# The new revision of the package in question
+NEWREV=$3
+
+if [ -z "$PKGDEP" ]; then
+ echo "No package dependency name"
+ exit 1
+fi
+
+if [ -z "$OLDREV" ]; then
+ echo "No old rev"
+ exit 1
+fi
+
+if [ -z "$NEWREV" ]; then
+ echo "No new rev"
+ exit 1
+fi
+
+
+for deb in *.deb
+do
+ ar p $deb control.tar.gz | tar xzO ./control | grep -q "^Depends:.* ${PKGDEP} ([^ ]* ${OLDREV})"
+ if [ $? -eq 0 ]; then
+ name=`ar p $deb control.tar.gz | tar xzO ./control | grep "^Package:.* " | sed 's/.* //'`
+ echo "**** Changing dependencies line in $deb ($name) ****"
+ patch_package $deb $PKGDEP $NEWREV
+ fi
+done
+
diff --git a/build/patch-packages/tools/deb_pack b/build/patch-packages/tools/deb_pack
new file mode 100755
index 000000000..f5d42dec3
--- /dev/null
+++ b/build/patch-packages/tools/deb_pack
@@ -0,0 +1,63 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+my_exit() {
+
+ if [ -d "$ISOROOT" ]; then
+ fusermount -u $ISOROOT
+ fi
+}
+
+ME=$(basename $0)
+
+trap my_exit EXIT
+
+REV="$(echo $1 | tr '_' '-')"
+if [ -z "$REV" ]; then
+ echo "$ME: Error - no revision info provided"
+ exit 1
+fi
+
+if [ ! -d package ]; then
+ echo "$ME: Error - package directory does not exist"
+ exit 1
+fi
+
+echo "Stepping revision number to $REV"
+
+
+revision_step ()
+{
+ REV=$1
+
+ sed -i "s/^\(Version:.*$\)/\1-eri$REV/" package/DEBIAN/control
+}
+
+md5sum_gen ()
+{
+ pushd package
+ find * -type f | grep -v "^DEBIAN/" | xargs md5sum | sort > DEBIAN/md5sums
+ popd
+}
+
+revision_step $REV
+md5sum_gen
+fakeroot dpkg-deb --build package
+PKGNAME=`grep "^Package: " package/DEBIAN/control | awk '{ print $2 }'`
+PKGREV=`grep "^Version: " package/DEBIAN/control | awk '{ print $2 }'`
+mv package.deb ${PKGNAME}_${PKGREV}.deb
+
+ORIGPKG=`cat .package`
+
+# Add patch into file read by install.sh
+echo "$ORIGPKG>${PKGNAME}_${PKGREV}.deb" > patch-replacements
+
diff --git a/build/patch-packages/tools/deb_unpack b/build/patch-packages/tools/deb_unpack
new file mode 100755
index 000000000..aaa60b743
--- /dev/null
+++ b/build/patch-packages/tools/deb_unpack
@@ -0,0 +1,58 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+my_exit() {
+
+ if [ -d "$ISOROOT" ]; then
+ fusermount -u $ISOROOT
+ fi
+}
+
+ME=$(basename $0)
+
+trap my_exit EXIT
+
+
+if [ -z "$1" ]; then
+ echo "$ME: Error - No package specified"
+ exit 1
+fi
+
+if [ -z "$2" ]; then
+ echo "$ME: Error - No ISO path specified"
+ exit 1
+fi
+
+DEB=$1
+ORIGISO=$2
+DEST=package
+
+if [ -e $DEST -o -d $DEST ]; then
+ echo "$ME: Error - $DEST already exists"
+ exit 1
+fi
+
+ISOROOT=`mktemp -d /tmp/XXXXXXX`
+fuseiso -p $ORIGISO $ISOROOT
+sleep 1
+
+if [ ! -f $ISOROOT/ubuntu/pool/main/$DEB ];then
+ echo "Could not find package $DEB in source ISO!"
+fi
+
+mkdir -p $DEST
+dpkg -x $ISOROOT/ubuntu/pool/main/$DEB $DEST
+
+mkdir -p $DEST/DEBIAN
+dpkg -e $ISOROOT/ubuntu/pool/main/$DEB $DEST/DEBIAN
+
+echo $DEB > .package \ No newline at end of file
diff --git a/build/patch-packages/tools/udeb_pack b/build/patch-packages/tools/udeb_pack
new file mode 100755
index 000000000..e961a7320
--- /dev/null
+++ b/build/patch-packages/tools/udeb_pack
@@ -0,0 +1,38 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+my_exit() {
+
+ if [ -d "$ISOROOT" ]; then
+ fusermount -u $ISOROOT
+ fi
+}
+
+ME=$(basename $0)
+
+trap my_exit EXIT
+
+if [ ! -d udebPackage ]; then
+ echo "$ME: Error - package directory does not exist"
+ exit 1
+fi
+
+echo "Stepping revision number to $REV"
+
+
+fakeroot dpkg-deb --build -Zgzip udebPackage
+PKGNAME=`grep "^Package: " udebPackage/DEBIAN/control | awk '{ print $2 }'`
+PKGREV=`grep "^Version: " udebPackage/DEBIAN/control | awk '{ print $2 }'`
+ARCH=`grep "^Architecture: " udebPackage/DEBIAN/control | awk '{ print $2 }'`
+mv udebPackage.deb ${PKGNAME}_${PKGREV}_${ARCH}.udeb
+
+ORIGPKG=`cat .udebpackage`
diff --git a/build/patch-packages/tools/udeb_unpack b/build/patch-packages/tools/udeb_unpack
new file mode 100755
index 000000000..ed9cd21aa
--- /dev/null
+++ b/build/patch-packages/tools/udeb_unpack
@@ -0,0 +1,58 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+my_exit() {
+
+ if [ -d "$ISOROOT" ]; then
+ fusermount -u $ISOROOT
+ fi
+}
+
+ME=$(basename $0)
+
+trap my_exit EXIT
+
+
+if [ -z "$1" ]; then
+ echo "$ME: Error - No package specified"
+ exit 1
+fi
+
+if [ -z "$2" ]; then
+ echo "$ME: Error - No ISO path specified"
+ exit 1
+fi
+
+DEB=$1
+ORIGISO=$2
+DEST=udebPackage
+
+if [ -e $DEST -o -d $DEST ]; then
+ echo "$ME: Error - $DEST already exists"
+ exit 1
+fi
+
+ISOROOT=`mktemp -d /tmp/XXXXXXX`
+fuseiso -p $ORIGISO $ISOROOT
+sleep 1
+
+if [ ! -f $ISOROOT/ubuntu/pool/debian-installer/$DEB ];then
+ echo "Could not find package $DEB in source ISO!"
+fi
+
+mkdir -p $DEST
+dpkg -x $ISOROOT/ubuntu/pool/debian-installer/$DEB $DEST
+
+mkdir -p $DEST/DEBIAN
+dpkg -e $ISOROOT/ubuntu/pool/debian-installer/$DEB $DEST/DEBIAN
+
+echo $DEB > .udebpackage
diff --git a/build/patch-packages/tr_example/Makefile b/build/patch-packages/tr_example/Makefile
new file mode 100644
index 000000000..b7cab3590
--- /dev/null
+++ b/build/patch-packages/tr_example/Makefile
@@ -0,0 +1,30 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all:
+
+.PHONY: clean
+clean:
+ @rm -rf package
+ @rm -rf *.deb
+ @rm -rf patch-replacements
+ @rm -rf .package
+
+.PHONY: release
+release:
+ ../tools/deb_unpack python-oslo.messaging_1.3.0-fuel5.1~mira4_all.deb $(ORIGISO)
+ @mkdir -p package/etc
+ @echo "Hello, world" > package/etc/hello.txt
+ ../tools/deb_pack $(REVSTATE)
+ @cp *.deb ../release/packages
+ @cat patch-replacements >> ../release/patch-replacements
diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch
new file mode 100644
index 000000000..d3769adfb
--- /dev/null
+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch
@@ -0,0 +1,83 @@
+From: Fuel OPNFV <fuel@opnfv.org>
+Date: Mon, 13 Jun 2016 22:23:57 +0200
+Subject: OPNFV: Additions to bootstrap_admin_node.sh
+
+---
+diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh
+index 3197c91..e035145 100755
+--- a/iso/bootstrap_admin_node.sh
++++ b/iso/bootstrap_admin_node.sh
+@@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail
+ set +x
+ echo "Done!"
+
++### OPNFV addition BEGIN
++shopt -s nullglob
++for script in /opt/opnfv/bootstrap/pre.d/*.sh
++do
++ echo "Pre script: $script" >> /root/pre.log 2>&1
++ $script >> /root/pre.log 2>&1
++done
++shopt -u nullglob
++### OPNFV addition END
++
++# Enable sshd
++systemctl enable sshd
++systemctl start sshd
++
+ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
+- fuelmenu || fail
++ fuelmenu
+ else
+ # Give user 15 seconds to enter fuelmenu or else continue
+ echo
+@@ -360,9 +374,10 @@ else
+ fi
+ fi
+
++# OPNFV: Disabled to speedup installation in offline env.
+ # Enable online base MOS repos (security, updates) if we run an ISO installation
+-[ -f /etc/fuel_build_id ] && \
+- yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
++#[ -f /etc/fuel_build_id ] && \
++# yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
+
+ if [ ! -f "${ASTUTE_YAML}" ]; then
+ echo ${fuelmenu_fail_message}
+@@ -377,7 +392,5 @@ if [ ! -f /etc/fuel_build_id ]; then
+
+-# Enable sshd
+-systemctl enable sshd
+-systemctl start sshd
++systemctl reload sshd
+
+ # Enable iptables
+ systemctl enable iptables.service
+@@ -532,6 +545,16 @@ systemctl start ntpd
+
+ bash /etc/rc.local
+
++### OPNFV addition BEGIN
++shopt -s nullglob
++for script in /opt/opnfv/bootstrap/post.d/*.sh
++do
++ echo "Post script: $script" >> /root/post.log 2>&1
++ $script >> /root/post.log 2>&1
++done
++shopt -u nullglob
++### OPNFV addition END
++
+ if [ "`get_bootstrap_skip`" = "False" ]; then
+ build_ubuntu_bootstrap bs_status || true
+ else
+@@ -571,8 +571,8 @@
+ fi
+
+ #Check if repo is accessible
+-echo "Checking for access to updates repository..."
+-repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl" && $3 ~ "updates") print $3}' | head -1)
++echo "Checking for access to updates repository/mirrorlist..."
++repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl|mirrors" && $3 ~ "updates") print $3}' | head -1)
+ if urlaccesscheck check "$repourl" ; then
+ UPDATE_ISSUES=0
+ else
diff --git a/build/patch-repos/0020-isolinux.cfg.patch b/build/patch-repos/0020-isolinux.cfg.patch
new file mode 100644
index 000000000..f09be2a7f
--- /dev/null
+++ b/build/patch-repos/0020-isolinux.cfg.patch
@@ -0,0 +1,21 @@
+From: Fuel OPNFV <fuel@opnfv.org>
+Date: Mon, 13 Jun 2016 22:23:57 +0200
+Subject: OPNFV: showmenu=yes in isolinux.cfg
+
+---
+diff --git a/iso/isolinux/isolinux.cfg b/iso/isolinux/isolinux.cfg
+index c6b1ed9..77a4b18 100644
+--- a/iso/isolinux/isolinux.cfg
++++ b/iso/isolinux/isolinux.cfg
+@@ -19,9 +19,9 @@ label nailgun
+ menu label ^1. Fuel Install (Static IP)
+ menu default
+ kernel vmlinuz
+- append initrd=initrd.img net.ifnames=0 biosdevname=0 inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: nameserver=10.20.0.1
++ append initrd=initrd.img net.ifnames=0 biosdevname=0 inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: nameserver=10.20.0.1 showmenu=yes
+
+ label nailgunifname
+ menu label ^2. Fuel Advanced Install (Static IP)
+ kernel vmlinuz
+- append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX
++ append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX showmenu=yes
diff --git a/build/patch-repos/0030-repo-multi-arch-local-mirrors.patch b/build/patch-repos/0030-repo-multi-arch-local-mirrors.patch
new file mode 100644
index 000000000..d40428743
--- /dev/null
+++ b/build/patch-repos/0030-repo-multi-arch-local-mirrors.patch
@@ -0,0 +1,59 @@
+From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
+Date: Thu, 25 Feb 2016 13:31:19 +0100
+Subject: repo mirror: Allow multi-arch local mirrors
+
+This patch allows specifying multiple architectures via UBUNTU_ARCH in
+form of a list of space separated architectures. The first architecture
+in the list is considered primary and will be used for building all the
+deb packages by fuel-main. Additional architectures are added to allow
+targets of other architectures to use the mirror.
+NOTE: this imposes a requirement that all packages built are arch
+independent (which is true so far).
+
+Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ mirror/ubuntu/module.mk | 2 +-
+ sandbox.mk | 2 +-
+ config.mk | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mirror/ubuntu/module.mk b/mirror/ubuntu/module.mk
+index 7a9466e..fe1ada2 100644
+--- a/mirror/ubuntu/module.mk
++++ b/mirror/ubuntu/module.mk
+@@ -81,7 +81,7 @@ $(BUILD_DIR)/mirror/ubuntu/mirror.done:
+ --root=$(MIRROR_MOS_UBUNTU_ROOT) \
+ --dist=$(MIRROR_MOS_UBUNTU_SUITE) \
+ --section=$(subst $(space),$(comma),$(MIRROR_MOS_UBUNTU_SECTION)) \
+- --arch=$(UBUNTU_ARCH) \
++ --arch=$(shell echo $(UBUNTU_ARCH) | tr ' ' ',') \
+ $(LOCAL_MIRROR_UBUNTU)/
+ rm -rf $(LOCAL_MIRROR_UBUNTU)/.temp $(LOCAL_MIRROR_UBUNTU)/project
+ $(ACTION.TOUCH)
+diff --git a/sandbox.mk b/sandbox.mk
+index 4bc3962..5ffddbd 100644
+--- a/sandbox.mk
++++ b/sandbox.mk
+@@ -188,7 +188,7 @@ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering
+ mkdir -p $(SANDBOX_UBUNTU)/usr/sbin
+ cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin
+ echo "Running debootstrap"
+-sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
++sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(word 1,$(UBUNTU_ARCH)) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
+ if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi
+ sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
+ if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi
+diff --git a/config.mk b/config.mk
+index 74ee039..45a3b30 100644
+--- a/config.mk
++++ b/config.mk
+@@ -49,7 +49,7 @@ UBUNTU_MINOR:=04
+ UBUNTU_RELEASE_NUMBER:=$(UBUNTU_MAJOR).$(UBUNTU_MINOR)
+ UBUNTU_KERNEL_FLAVOR?=lts-trusty
+ UBUNTU_NETBOOT_FLAVOR?=netboot
+-UBUNTU_ARCH:=amd64
++UBUNTU_ARCH?=amd64
+ UBUNTU_IMAGE_RELEASE:=$(UBUNTU_MAJOR)$(UBUNTU_MINOR)
+ SEPARATE_IMAGES?=/boot,ext2 /,ext4
+
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/build/patch-repos/build/repos/fuel-library/0001-Reduce-ceilometer-memory-usage.patch b/build/patch-repos/build/repos/fuel-library/0001-Reduce-ceilometer-memory-usage.patch
new file mode 100644
index 000000000..f7fe06884
--- /dev/null
+++ b/build/patch-repos/build/repos/fuel-library/0001-Reduce-ceilometer-memory-usage.patch
@@ -0,0 +1,30 @@
+From 38315ee3945a5444de13918eb29e7771eb9927c7 Mon Sep 17 00:00:00 2001
+From: Michael Polenchuk <mpolenchuk@mirantis.com>
+Date: Thu, 8 Sep 2016 19:25:14 +0300
+Subject: [PATCH 1/1] Reduce ceilometer memory usage
+
+Change-Id: I8b1a97bd710c859a3543d1aed8226313f35f4f10
+---
+ .../manifests/ceilometer/controller.pp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/deployment/puppet/openstack_tasks/manifests/ceilometer/controller.pp b/deployment/puppet/openstack_tasks/manifests/ceilometer/controller.pp
+index 2c63ff0..1dda109 100644
+--- a/deployment/puppet/openstack_tasks/manifests/ceilometer/controller.pp
++++ b/deployment/puppet/openstack_tasks/manifests/ceilometer/controller.pp
+@@ -234,5 +234,12 @@ class openstack_tasks::ceilometer::controller {
+ Ceilometer_config<| title == 'oslo_messaging_rabbit/kombu_compression' |> { value => $kombu_compression }
+ }
+ }
++
++ # Reduce memory usage
++ ceilometer_config {
++ 'DEFAULT/executor_thread_pool_size': value => ceiling($service_workers*0.5);
++ 'notification/pipeline_processing_queues': value => ceiling($service_workers*1.5);
++ 'oslo_messaging_rabbit/rabbit_qos_prefetch_count': value => 5;
++ }
+ }
+ }
+--
+1.7.9.5
+
diff --git a/build/patch-repos/build/repos/fuel-nailgun/0010-Mark-Intel-82599-10-Gigabit-NIC-as-DPDK-capable.patch b/build/patch-repos/build/repos/fuel-nailgun/0010-Mark-Intel-82599-10-Gigabit-NIC-as-DPDK-capable.patch
new file mode 100644
index 000000000..d486f2354
--- /dev/null
+++ b/build/patch-repos/build/repos/fuel-nailgun/0010-Mark-Intel-82599-10-Gigabit-NIC-as-DPDK-capable.patch
@@ -0,0 +1,22 @@
+From: Fuel OPNFV <fuel@opnfv.org>
+Date: Wed, 3 Aug 2016 09:41:21 +0200
+Subject: [PATCH] Mark Intel 82599 10 Gigabit NIC as DPDK capable
+
+This NIC is used on Ericsson POD2 but Fuel doesn't allow to activate
+DPDK on it.
+---
+ nailgun/nailgun/fixtures/openstack.yaml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml
+index 74fa509..d08a4fc 100644
+--- a/nailgun/nailgun/fixtures/openstack.yaml
++++ b/nailgun/nailgun/fixtures/openstack.yaml
+@@ -2215,3 +2215,3 @@
+ "14e4:163f", "14e4:168d", "14e4:16a1", "14e4:16a2", "14e4:16ad",
+- "14e4:16ae", "14e4:163e", "14e4:16a4"
++ "14e4:16ae", "14e4:163e", "14e4:16a4", "8086:10f8"
+ ]
+--
+1.9.1
+
diff --git a/build/repo_info.sh b/build/repo_info.sh
new file mode 100755
index 000000000..347ede7f7
--- /dev/null
+++ b/build/repo_info.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+usage() {
+ cat <<EOF
+Usage: `basename $0` [-r] <path>
+
+ -r
+ Recursively list all repos found starting at <path>
+ -h
+ Display help text
+EOF
+}
+
+repoinfo() {
+ repotop=$(git -C $1 rev-parse --show-toplevel)
+ origin=$(git -C $repotop config --get remote.origin.url)
+ sha1=$(git -C $repotop rev-parse HEAD)
+ echo "$origin: $sha1"
+}
+
+
+if [ $# -eq 2 ]; then
+ case $1 in
+ -r)
+ RECURSE=1
+ shift
+ ;;
+ -h)
+ usage
+ exit 0
+ ;;
+ *)
+ echo "Error, argument $1 not known" >&2
+ usage
+ exit 1
+ esac
+fi
+
+if [ $# -gt 1 ]; then
+ echo "Error, too many arguments" >&2
+ usage
+ exit 1
+fi
+
+abspath=$(readlink -f $1)
+
+if [ -n "$RECURSE" ]; then
+ for dir in $(find $abspath -type d -name .git)
+ do
+ repoinfo $(readlink -f $dir/..)
+ done
+else
+ repoinfo $abspath
+fi
diff --git a/build/select_closest_fuel_mirror.py b/build/select_closest_fuel_mirror.py
new file mode 100755
index 000000000..0fdc69eac
--- /dev/null
+++ b/build/select_closest_fuel_mirror.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Select closest fuel mirror based on latency measured with ping.
+# Failsafe: The us1 mirror
+
+from subprocess import Popen,PIPE
+import re
+from operator import itemgetter
+
+mirrors = [ "us1", "cz1" ]
+FNULL = open('/dev/null', 'w')
+try:
+ re_avg = re.compile(r'.* = [^/]*/([^/]*).*')
+
+ pingtime = {}
+ for mirror in mirrors:
+ fqdn = "mirror.seed-"+mirror+".fuel-infra.org"
+ pingtime[fqdn] = 0
+ pipe = Popen("ping -c 3 " + fqdn + " | tail -1",shell = True, stdout=PIPE, stderr=FNULL)
+ avg = pipe.communicate()[0]
+ pipe.stdout.close()
+ pingtime[fqdn] = float(re_avg.split(avg)[1])
+
+ print sorted(pingtime.items(), key=itemgetter(1))[0][0]
+except:
+ print "mirror.seed-"+mirrors[0]+".fuel-infra.org"
diff --git a/ci/README b/ci/README
new file mode 100644
index 000000000..46698a739
--- /dev/null
+++ b/ci/README
@@ -0,0 +1,101 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+Abstract
+========
+The fuel/ci directory holds all Fuel@OPNFV programatic abstractions for
+the OPNFV community release and continous integration pipeline.
+There are two Fuel@OPNF autonomous scripts fo this, complying to the OPNFV CI pipeline guideline:
+ - build.sh
+ - deploy.sh
+
+USAGE
+=====
+For usage information of the CI/CD scripts, please run:
+./build.sh -h
+./deploy.sh -h
+
+Details on the CI/CD deployment framework
+=========================================
+
+Overview and purpose
+--------------------
+The CI/CD deployment script relies on a configuration structure, providing base
+installer configuration (part of fuel repo: deploy/config), per POD specific
+configuration (part of a separate classified POD configuration repo: securedlab
+, plugin configuration (part of fuel repo: deploy/config/plugins), and
+deployment scenario configuration (part of fuel repo: deploy/scenario).
+
+- The base installer configuration resembles the least common denominator of all
+ HW/POD environment and deployment scenarios (These configurations are
+ normally carried by the the installer projects in this case (fuel@OPNFV).
+- Per POD specific configuration specifies POD unique parameters, the POD
+ parameter possible to alter is governed by the Fuel@OPNFV project.
+- Plugin configuration - providing configuration of a specific plugin.
+ these configurations maintain there own namespace and are normally maintained
+ by collaborative projects building Fuel@OPNFV plugins
+- Deployment scenario configuration - provides a high level, POD/HW environment
+ independent scenario configuration for a specifiv deployment. It defines what
+ features/plugins that shall be deployed - as well needed overrides of the base
+ installer-, POD/HW environment- configurations. Objects allowed to override
+ is governed by the Fuel@OPNFV project.
+
+Executing a deployment
+----------------------
+deploy.sh must be executed locally at the target lab/pod/jumpserver
+A configuration structure must be provided - see the section below.
+It is straight forward to execute a deployment task - as an example:
+sudo deploy.sh -b file:///home/jenkins/config -l LF-1 -p POD-2 -s
+os_odl-l2_ha -i file:///home/jenkins/MyIso.iso
+
+-b and -i arguments should be expressed in URI style (eg: file://...
+or http://.... The resources can thus be local or remote.
+
+Configuration repository structure
+----------------------------------
+The CI deployment engine relies on a configuration directory/file structure
+pointed to by the -b option described above.
+Normally this points to the secure classified OPNFV securedlab repo to which
+only jenkins and andmins have access to, but you may point to any local or
+remote strcture fullfilling the diectory/file structure below.
+The reason that this configuration structure needs to be secure/hidden
+is that there are security sensitive information in the various configuration
+files.
+A local stripped version of this configuration structure with virtual
+deployment configurations also exist under build/config/.
+Following configuration directory and file structure should be adheare to:
+
+TOP
+!
++---- labs
+ !
+ +---- lab-name-1
+ ! !
+ ! +---- pod-name-1
+ ! ! !
+ ! ! +---- fuel
+ ! ! !
+ ! ! +---- config
+ ! ! !
+ ! ! +---- dea-pod-override.yaml
+ ! ! !
+ ! ! +---- dha.yaml
+ ! !
+ ! +---- pod-name-2
+ ! !
+ !
+ +---- lab-name-2
+ ! !
+
+
+Creating a deployment scenario
+------------------------------
+Please find deploy/scenario/README for instructions on how to create a new
+deployment scenario. \ No newline at end of file
diff --git a/ci/build.sh b/ci/build.sh
new file mode 100755
index 000000000..82049cdcd
--- /dev/null
+++ b/ci/build.sh
@@ -0,0 +1,269 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################
+# BEGIN of usage description
+#
+usage ()
+{
+cat | more << EOF
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+`basename $0`: Builds the Fuel@OPNFV stack
+
+usage: `basename $0` [-s spec-file] [-c cache-URI] [-l log-file] [-f flags]
+ [output-directory]
+
+OPTIONS:
+ -s spec-file (NOTE! DEPRECATED!)
+ define the build-spec file, default ../build/config.mk. The script only
+ verifies that the spec-file exists.
+ -c cache base URI
+ specifies the base URI to a build cache to be used/updated, supported
+ methods are http://, ftp:// and file://
+ -l log-file
+ specifies the output log-file (stdout and stderr), if not specified
+ logs are output to console as normal
+ -v
+ version tag to be applied to the build result
+ -r
+ alternative remote access method script/program. curl is default.
+ -f flag[...]
+ build flags:
+ s: Do nothing, succeed
+ f: Do nothing, fail
+ D: Debug mode
+ P: Clear the local cache before building. This flag is only
+ valid if the "-c cache-URI" options has been specified and
+ and the method in the cache-URI is file:// (local cache).
+
+ -h help, prints this help text
+
+ output-directory, specifies the directory for the output artifacts
+ (.iso file). If no output-directory is specified, the current path
+ when calling the script is used.
+
+
+Description:
+
+build.sh builds the opnfv .iso artifact.
+To reduce build time it uses build caches on a local or remote location. A
+cache is rebuilt and uploaded if either of the below conditions are met:
+1) The P(opulate) flag is set and the -c cache-base-URI is provided and set
+ to the method file:// , if -c is
+ not provided the cache will stay local.
+2) If a cache is invalidated by the make system - the exact logic is encoded
+ in the cache.mk of the different parts of the build.
+3) A valid cache does not exist on the specified -c cache-base-URI.
+
+A cache has a blob (binary data) and a meta file in the format of:
+ <SHA1>.blob
+ <SHA1>.meta
+
+Logging is by default to console, but can be directed elsewhere with the -l
+option in which case both stdout and stderr is redirected to that destination.
+
+Built in unit testing of components is enabled by adding the t(est) flag.
+
+Return codes:
+ - 0 Success!
+ - 1-99 Unspecified build error
+ - 100-199 Build system internal error (not build it self)
+ - 101 Build system instance busy
+ - 200 Build failure
+
+Examples:
+ build -c http://opnfv.org/artifactory/fuel/cache \
+ -d ~/jenkins/genesis/fuel/ci/output -f ti
+
+NOTE: At current the build scope is set to the git root of the repository, -d
+ destination locations outside that scope will not work!
+EOF
+}
+#
+# END of usage description
+############################################################################
+
+############################################################################
+# BEGIN of function error_exit
+
+error_exit() {
+ echo "$@" >&2
+ exit 1
+}
+
+#
+# END of function error_exit
+############################################################################
+
+
+############################################################################
+# BEGIN of shorthand variables for internal use
+#
+SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
+BUILD_BASE=$(readlink -e ${SCRIPT_DIR}/../build/)
+RESULT_DIR="${BUILD_BASE}/release"
+BUILD_SPEC="${BUILD_BASE}/config.mk"
+LOCAL_CACHE_ARCH_NAME="${LOCAL_CACHE_ARCH_NAME:-fuel-cache}"
+
+#
+# END of variables to customize
+############################################################################
+
+############################################################################
+# BEGIN of script assigned default variables
+#
+export CACHEBASE="file://$HOME/cache"
+export CACHETRANSPORT="curl --silent"
+CLEAR_CACHE=0
+MAKE_ARGS=""
+
+#
+# END of script assigned variables
+############################################################################
+
+build() {
+ echo "CI build parameters:"
+ echo "SCRIPT_DIR = $SCRIPT_DIR"
+ echo "BUILD_BASE = $BUILD_BASE"
+ echo "RESULT_DIR = $RESULT_DIR"
+ echo "BUILD_SPEC = $BUILD_SPEC"
+ echo "LOCAL_CACHE_ARCH_NAME = $LOCAL_CACHE_ARCH_NAME"
+ echo "CLEAR_CACHE = $CLEAR_CACHE"
+ echo "DEBUG = $DEBUG"
+ echo "OUTPUT_DIR = $OUTPUT_DIR"
+ echo "BUILD_LOG = $BUILD_LOG"
+ echo "MAKE_ARGS = $MAKE_ARGS"
+ echo "CACHEBASE = $CACHEBASE"
+ echo "CACHETRANSPORT = $CACHETRANSPORT"
+
+
+ if [ "$CLEAR_CACHE" -eq 1 ]; then
+ echo $CACHEBASE | grep -q '^file://' $CACHE_BASE
+ if [ $? -ne 0 ]; then
+ error_exit "Can't clear a non-local cache!"
+ else
+ CACHEDIR=$(echo $CACHEBASE | sed 's;file://;;')
+ echo "Clearing local cache at $CACHEDIR..."
+ rm -rvf $CACHEDIR/*
+ fi
+ fi
+
+ echo make ${MAKE_ARGS} cache
+
+ cd ${BUILD_BASE}
+ if make ${MAKE_ARGS} cache; then
+ echo "Copying build result into $OUTPUT_DIR"
+ sort ${BUILD_BASE}/gitinfo*.txt > ${OUTPUT_DIR}/gitinfo.txt
+ cp ${RESULT_DIR}/*.iso ${OUTPUT_DIR}
+ cp ${RESULT_DIR}/*.iso.txt ${OUTPUT_DIR}
+ else
+ error_exit "Build failed"
+ fi
+}
+
+############################################################################
+# BEGIN of main
+#
+while getopts "s:c:l:v:f:r:f:h" OPTION
+do
+ case $OPTION in
+ s)
+ BUILD_SPEC=${OPTARG}
+ if [ ! -f ${BUILD_SPEC} ]; then
+ echo "spec file does not exist: $BUILD_SPEC - exiting ...."
+ exit 100
+ fi
+ ;;
+ c)
+ # This value is used by cache.sh
+ export CACHEBASE=${OPTARG}
+ ;;
+ l)
+ BUILD_LOG=$(readlink -f ${OPTARG})
+ ;;
+ v)
+ MAKE_ARGS+="REVSTATE=${OPTARG}"
+ ;;
+ r)
+ # This value is used by cache.sh
+ export CACHETRANSPORT=${OPTARG}
+ ;;
+ h)
+ usage
+ rc=0
+ exit $rc
+ ;;
+ f)
+ BUILD_FLAGS=${OPTARG}
+ for ((i=0; i<${#BUILD_FLAGS};i++)); do
+ case ${BUILD_FLAGS:$i:1} in
+ s)
+ exit 0
+ ;;
+
+ f)
+ exit 1
+ ;;
+
+ P)
+ CLEAR_CACHE=1
+ ;;
+
+ D)
+ DEBUG=1
+ ;;
+
+ *)
+ error_exit "${BUILD_FLAGS:$i:1} is not a valid build flag - exiting ...."
+ ;;
+ esac
+ done
+ ;;
+
+ *)
+ echo "${OPTION} is not a valid argument"
+ rc=100
+ exit $rc
+ ;;
+ esac
+done
+
+# Get output directory
+shift $[$OPTIND - 1]
+case $# in
+ 0)
+ # No directory on command line
+ OUTPUT_DIR=$(pwd)
+ ;;
+ 1)
+ # Directory on command line
+ OUTPUT_DIR=$(readlink -f $1)
+ ;;
+ *)
+ error_exit "Too many arguments"
+ ;;
+esac
+mkdir -p $OUTPUT_DIR || error_exit "Could not access output directory $OUTPUT_DIR"
+
+
+if [ -n "${BUILD_LOG}" ]; then
+ touch ${BUILD_LOG} || error_exit "Could not write to log file ${BUILD_LOG}"
+ build 2>&1 | tee ${BUILD_LOG}
+else
+ build
+fi
+
+rc=$?
+exit $rc
+
+#
+# END of main
+############################################################################
diff --git a/ci/clean_cache.sh b/ci/clean_cache.sh
new file mode 100755
index 000000000..177fe821b
--- /dev/null
+++ b/ci/clean_cache.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Clean the build cache according to its expiry date. Invoke with the cache
+# directory as the first argument.
+
+if [ -z "$1" ]; then
+ echo "No cache directory specified, exiting..."
+ exit 1
+else
+ CACHEDIR=$1
+ echo "Operating on cache $CACHEDIR"
+fi
+
+NOW=$(date '+%s')
+
+cd $CACHEDIR
+echo "Step 1, cleaning orphaned meta and blob files"
+ls *.meta *.blob | sed 's/\..*//' | sort | uniq -u | xargs -n 1 -I {} sh -c "rm -vf {}.*"
+echo "Step 2, cleaning expired files"
+for cache in $(ls -1 *.meta | sed 's/\..*//')
+do
+ blob=${cache}.blob
+ meta=${cache}.meta
+ expiry=$(grep Expires: $meta | sed 's/Expires: *//')
+ if [ $expiry -le $NOW ]; then
+ echo "$cache expired $(date -d "@$expiry"), removing..."
+ rm -f $blob $meta
+ fi
+done
+
diff --git a/ci/deploy.sh b/ci/deploy.sh
new file mode 100755
index 000000000..8411714eb
--- /dev/null
+++ b/ci/deploy.sh
@@ -0,0 +1,264 @@
+#!/bin/bash
+set -e
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################
+# BEGIN of Exit handlers
+#
+do_exit () {
+ clean
+ echo "Exiting ..."
+}
+#
+# End of Exit handlers
+############################################################################
+
+############################################################################
+# BEGIN of usage description
+#
+usage ()
+{
+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
+ -s deployment-scenario [-S optional Deploy-scenario path URI]
+ [-R optional local relen repo (containing deployment Scenarios]
+
+OPTIONS:
+ -b Base-uri for the stack-configuration structure
+ -B PXE Bridge for booting of Fuel master
+ -d Dry-run
+ -f Deploy on existing Fuel master
+ -e Do not launch environment deployment
+ -F Do only create a Fuel master
+ -h Print this message and exit
+ -H No health check
+ -l Lab-name
+ -L Deployment log path and file name
+ -p Pod-name
+ -s Deploy-scenario short-name/base-file-name
+ -S Storage dir for VM images
+ -T Timeout, in minutes, for the deploy.
+ -i iso url
+
+Description:
+Deploys the Fuel@OPNFV stack on the indicated lab resource
+
+This script provides the Fuel@OPNFV deployment abstraction
+It depends on the OPNFV official configuration directory/file structure
+and provides a fairly simple mechanism to execute a deployment.
+Input parameters to the build script is:
+-b Base URI to the configuration directory (needs to be provided in a URI
+ style, it can be a local resource: file:// or a remote resource http(s)://)
+-B PXE Bridge for booting of Fuel master. It can be specified several times,
+ or as a comma separated list of bridges, or both: -B br1 -B br2,br3
+ One NIC connected to each specified bridge will be created in the Fuel VM,
+ in the same order as provided in the command line. The default is pxebr.
+-d Dry-run - Produces deploy config files (config/dea.yaml and
+ config/dha.yaml), but does not execute deploy
+-f Deploy on existing Fuel master
+-e Do not launch environment deployment
+-F Do only create a Fuel master
+-h Print this message and exit
+-H Do not run fuel built in health-check after successfull deployment
+-l Lab name as defined in the configuration directory, e.g. lf
+-L Deployment log path and name, eg. -L /home/jenkins/logs/job888.log.tar.gz
+-p POD name as defined in the configuration directory, e.g. pod-1
+-s Deployment-scenario, this points to a deployment/test scenario file as
+ defined in the configuration directory:
+ e.g fuel-ocl-heat-ceilometer_scenario_0.0.1.yaml
+ 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
+-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
+ 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
+}
+
+#
+# END of usage description
+############################################################################
+
+############################################################################
+# BEGIN of deployment clean-up
+#
+clean() {
+ echo "Cleaning up deploy tmp directories"
+ rm -rf ${SCRIPT_PATH}/ISO
+}
+#
+# END of deployment clean-up
+############################################################################
+
+############################################################################
+# BEGIN of shorthand variables for internal use
+#
+SCRIPT_PATH=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
+DEPLOY_DIR=$(cd ${SCRIPT_PATH}/../deploy; pwd)
+PXE_BRIDGE=''
+NO_HEALTH_CHECK=''
+USE_EXISTING_FUEL=''
+FUEL_CREATION_ONLY=''
+NO_DEPLOY_ENVIRONMENT=''
+STORAGE_DIR=''
+DRY_RUN=0
+if ! [ -z $DEPLOY_TIMEOUT ]; then
+ DEPLOY_TIMEOUT="-dt $DEPLOY_TIMEOUT"
+else
+ DEPLOY_TIMEOUT=""
+fi
+#
+# END of variables to customize
+############################################################################
+
+############################################################################
+# BEGIN of main
+#
+while getopts "b:B:dfFHl:L:p:s:S:T:i:he" OPTION
+do
+ case $OPTION in
+ b)
+ BASE_CONFIG_URI=${OPTARG}
+ if [[ ! $BASE_CONFIG_URI == file://* ]] && \
+ [[ ! $BASE_CONFIG_URI == http://* ]] && \
+ [[ ! $BASE_CONFIG_URI == https://* ]] && \
+ [[ ! $BASE_CONFIG_URI == ftp://* ]]; then
+ echo "-b $BASE_CONFIG_URI - Not given in URI style"
+ usage
+ exit 1
+ fi
+ ;;
+ B)
+ for bridge in ${OPTARG//,/ }; do
+ PXE_BRIDGE+=" -b $bridge"
+ done
+ ;;
+ d)
+ DRY_RUN=1
+ ;;
+ f)
+ USE_EXISTING_FUEL='-nf'
+ ;;
+ F)
+ FUEL_CREATION_ONLY='-fo'
+ ;;
+ e)
+ NO_DEPLOY_ENVIRONMENT='-nde'
+ ;;
+ H)
+ NO_HEALTH_CHECK='-nh'
+ ;;
+ l)
+ TARGET_LAB=${OPTARG}
+ ;;
+ L)
+ DEPLOY_LOG="-log ${OPTARG}"
+ ;;
+ p)
+ TARGET_POD=${OPTARG}
+ ;;
+ s)
+ DEPLOY_SCENARIO=${OPTARG}
+ ;;
+ S)
+ if [[ ${OPTARG} ]]; then
+ STORAGE_DIR="-s ${OPTARG}"
+ fi
+ ;;
+ T)
+ DEPLOY_TIMEOUT="-dt ${OPTARG}"
+ ;;
+ i)
+ ISO=${OPTARG}
+ if [[ ! $ISO == file://* ]] && \
+ [[ ! $ISO == http://* ]] && \
+ [[ ! $ISO == https://* ]] && \
+ [[ ! $ISO == ftp://* ]]; then
+ echo "-i $ISO - Not given in URI style"
+ usage
+ exit 1
+ fi
+ ;;
+ h)
+ usage
+ exit 0
+ ;;
+ *)
+ echo "${OPTION} is not a valid argument"
+ echo "Arguments not according to new argument style"
+ echo "Trying old-style compatibility mode"
+ pushd ${DEPLOY_DIR} > /dev/null
+ python deploy.py "$@"
+ popd > /dev/null
+ exit 0
+ ;;
+ 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
+ echo "Arguments not according to new argument style"
+ echo "Trying old-style compatibility mode"
+ pushd ${DEPLOY_DIR} > /dev/null
+ python deploy.py "$@"
+ popd > /dev/null
+ exit 0
+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
+# Prepare the deploy config files based on lab/pod information, deployment
+# scenario, etc.
+
+echo "python deploy-config.py -dha ${BASE_CONFIG_URI}/labs/${TARGET_LAB}/${TARGET_POD}/fuel/config/dha.yaml -deab file://${DEPLOY_DIR}/config/dea_base.yaml -deao ${BASE_CONFIG_URI}/labs/${TARGET_LAB}/${TARGET_POD}/fuel/config/dea-pod-override.yaml -scenario-base-uri file://${DEPLOY_DIR}/scenario -scenario ${DEPLOY_SCENARIO} -plugins file://${DEPLOY_DIR}/config/plugins -output ${SCRIPT_PATH}/config"
+
+python deploy-config.py -dha ${BASE_CONFIG_URI}/labs/${TARGET_LAB}/${TARGET_POD}/fuel/config/dha.yaml -deab file://${DEPLOY_DIR}/config/dea_base.yaml -deao ${BASE_CONFIG_URI}/labs/${TARGET_LAB}/${TARGET_POD}/fuel/config/dea-pod-override.yaml -scenario-base-uri file://${DEPLOY_DIR}/scenario -scenario ${DEPLOY_SCENARIO} -plugins file://${DEPLOY_DIR}/config/plugins -output ${SCRIPT_PATH}/config
+
+if [ $DRY_RUN -eq 0 ]; then
+ # Download iso if it doesn't already exists locally
+ if [[ $ISO == file://* ]]; then
+ ISO=${ISO#file://}
+ else
+ mkdir -p ${SCRIPT_PATH}/ISO
+ curl -o ${SCRIPT_PATH}/ISO/image.iso $ISO
+ 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
+fi
+popd > /dev/null
+
+#
+# END of main
+############################################################################
diff --git a/deploy/README b/deploy/README
new file mode 100644
index 000000000..ee6bc3156
--- /dev/null
+++ b/deploy/README
@@ -0,0 +1,171 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+======== PREREQUISITES ========
+
+the following dependencies and python modules are required to be installed:
+
+- for Ubuntu:
+
+sudo apt-get update
+sudo apt-get install -y libvirt-bin qemu-kvm python-pip fuseiso mkisofs \
+genisoimage ipmitool
+sudo apt-get install -y python-dev libz-dev libxml2-dev libxslt-dev libyaml-dev
+sudo pip install pyyaml netaddr paramiko lxml scp pycrypto ecdsa amt
+
+During libvirt install the user is added to the libvirtd group, so you have to
+logout then login back again
+
+
+======== PREPARE and RUN the OPNFV Autodeployment ========
+
+
+--- Step.1 Prepare the DEA and DHA configuration files and the OPNFV ISO file
+
+Make sure that you are using the right DEA - Deployment Environment Adapter and
+DHA - Deployment Hardware Adapter configuration files, the ones provided are only templates
+you will have to modify them according to your needs
+
+- If wou wish to deploy OPNFV cloud environment on top of KVM/Libvirt
+ virtualization use as example the following configuration files:
+
+ => templates/virtual_environment/conf/ha
+ dea.yaml
+ dha.yaml
+
+
+- If you wish to deploy OPNFV cloud environment on hardware
+ use as example the following configuration files:
+
+ => templates/hardware_environment/conf/ericsson_montreal_lab/pod1/ha
+ dea.yaml
+ dha.yaml
+
+ => templates/hardware_environment/conf/linux_foundation_lab/pod1/ha
+ dea.yaml
+ dha.yaml
+
+ => templates/hardware_environment/conf/linux_foundation_lab/pod2/ha
+ dea.yaml
+ dha.yaml
+
+
+--- Step.2 Run Autodeployment ---
+
+usage: python ./deploy.py [-h] [-nf] [-nh] [-fo] [-co] [-c] [-iso [ISO_FILE]]
+ [-dea [DEA_FILE]] [-dha [DHA_FILE]] [-s STORAGE_DIR]
+ [-b PXE_BRIDGE] [-p FUEL_PLUGINS_DIR]
+ [-pc FUEL_PLUGINS_CONF_DIR] [-np]
+ [-dt DEPLOY_TIMEOUT] [-nde]
+
+optional arguments:
+ -h, --help show this help message and exit
+ -nf Do not install Fuel Master (and Node VMs when using
+ libvirt)
+ -nh Don't run health check after deployment
+ -fo Install Fuel Master only (and Node VMs when using
+ libvirt)
+ -co Cleanup VMs and Virtual Networks according to what is
+ defined in DHA
+ -c Cleanup after deploy
+ -iso [ISO_FILE] ISO File [default: OPNFV.iso]
+ -dea [DEA_FILE] Deployment Environment Adapter: dea.yaml
+ -dha [DHA_FILE] Deployment Hardware Adapter: dha.yaml
+ -s STORAGE_DIR Storage Directory [default: images]
+ -b PXE_BRIDGE Linux Bridge for booting up the Fuel Master VM
+ [default: pxebr]
+ -p FUEL_PLUGINS_DIR Fuel Plugins directory
+ -pc FUEL_PLUGINS_CONF_DIR
+ Fuel Plugins Configuration directory
+ -np Do not install Fuel Plugins
+ -dt DEPLOY_TIMEOUT Deployment timeout (in minutes) [default: 240]
+ -nde Do not launch environment deployment
+ -log [LOG_FILE] Deployment log path and file name
+
+* EXAMPLES:
+
+- Install Fuel Master and deploy OPNFV Cloud from scratch on Hardware Environment:
+
+ sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr -log ~/Deployment-888.log.tar.gz
+
+
+- Install Fuel Master and deploy OPNFV Cloud from scratch on Virtual Environment:
+
+ sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images -log ~/Deployment-888.log.tar.gz
+
+
+- Deploy OPNFV Cloud on an already active Environment where Fuel Master VM is running so no need to install Fuel again:
+
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -log ~/Deployment-888.log.tar.gz
+
+ => with plugin installation
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -log ~/Deployment-888.log.tar.gz
+
+ => with cleanup after deployment is finished
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -c -log ~/Deployment-888.log.tar.gz
+
+ => no healthcheck after deployment is completed
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -nh -log ~/Deployment-888.log.tar.gz
+
+
+- Install Fuel Master only (and Node VMs when using virtual environment):
+
+ => for virtual environment:
+ sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images -log ~/Deployment-888.log.tar.gz
+
+ => for hardware environment:
+ sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr -log ~/Deployment-888.log.tar.gz
+
+
+- Cleanup a running OPNFV environment:
+
+ sudo python deploy.py -co -dha ~/CONF/virtual/dha.yaml
+
+
+* WARNINGS:
+
+=> If optional argument -s <storage_dir> is not specified, Autodeployment will use
+"<current_working_dir>/images" as default, and it will create it, if it hasn't been created before
+
+=> If optional argument -b <pxe_bridge> is not specified, Autodeployment will use "pxebr" as default,
+if the bridge does not exist, the application will terminate with an error message
+
+=> If argument -iso [ISO_FILE] is not specified, Autodeployment will use "<current_working_dir>/OPNFV.iso"
+as default, if the iso file does not exist, the application will terminate with an error message
+
+=> If argument -dea [DEA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dea.yaml"
+as default, if DEA file does not exist, the application will terminate with an error message
+
+=> If argument -dha [DHA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dha.yaml"
+as default, if DHA file does not exist, the application will terminate with an error message
+
+=> Optional argument -b PXE_BRIDGE is not required for Autodeployment in virtual environment,
+ even if it is specified it will not be used at all because virtual environment is using a different virtual network setup
+
+=> If optional argument -p FUEL_PLUGINS_DIR is not specified, no external plugins will be installed in Fuel
+
+
+--- Networking considerations ---
+
+For Virtual Environment:
+
+There are some NAT, IPTABLE conflicts on the edge of libvirt bridging and Fuel Master
+according to http://wiki.libvirt.org/page/Networking
+netfilter on the bridges should be disabled
+
+Add these lines to /etc/sysctl.conf
+
+cat >> /etc/sysctl.conf <<EOF
+net.bridge.bridge-nf-call-ip6tables = 0
+net.bridge.bridge-nf-call-iptables = 0
+net.bridge.bridge-nf-call-arptables = 0
+EOF
+
+and then reload configuration:
+sysctl -p /etc/sysctl.conf
diff --git a/deploy/README.templater b/deploy/README.templater
new file mode 100644
index 000000000..b5d52ab9d
--- /dev/null
+++ b/deploy/README.templater
@@ -0,0 +1,371 @@
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+======== TEMPLATING SUPPORT IN YAML CONFIGURATION FILES ========
+
+deploy/templater.py makes it possible to use templates to generate configuration
+files. It takes 2 input YAML files and an output file as arguments. One being
+the dictionary (called the base file), which is used to look up values in; the
+other file is the template, where the substitution will take place. Templater
+will write the result to an output file, specified as the 3rd argument.
+
+
+======== SYNTAX OF TEMPLATE FILES ========
+
+A template file can contain any valid YAML data and template variables, whose
+syntax is described below:
+
+1. Single value references
+
+ %{title}
+
+ %{environment/net_segment_type}
+
+ Either a root element, or a path can be specified.
+
+2. YAML sections
+
+ %{nodes}
+
+ %{network/networking_parameters}
+
+ Either a root element, or a path can be specified.
+
+3. Interface lookup for network
+
+ %{interface(storage)}
+
+ Specify a network type as argument to interface().
+
+4. Interface lookup for network and role
+
+ %{interface(public,compute)}
+
+ Specify a network type and a role as arguments to interface().
+
+5. File inclusion
+
+ %{include(templates/interfaces.yaml)}
+
+ Filename with absolute or relative path.
+
+
+======== EXAMPLES ========
+
+Base YAML file (excerpt):
+
+title: Deployment Environment Adapter (DEA)
+version: 1.1
+created: Wed Mar 30 08:16:04 2016
+environment:
+ name: vCity
+ net_segment_type: tun
+wanted_release: Liberty on Ubuntu 14.04
+nodes:
+- id: 1
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ transformations: transformations_1
+- id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ transformations: transformations_1
+- id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ transformations: transformations_1
+- id: 4
+ interfaces: interfaces_2
+ role: controller,mongo
+ transformations: transformations_2
+- id: 5
+ interfaces: interfaces_2
+ role: controller,mongo
+ transformations: transformations_2
+- id: 6
+ interfaces: interfaces_2
+ role: controller,mongo
+ transformations: transformations_2
+interfaces_1:
+ ens3:
+ - fuelweb_admin
+ - management
+ ens4:
+ - storage
+ ens5:
+ - private
+ ens6:
+ - public
+interfaces_2:
+ ens3:
+ - fuelweb_admin
+ - management
+ ens4:
+ - storage
+ - private
+ - public
+network:
+ networks:
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ cidr: 172.16.0.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.16.0.2
+ - 172.16.0.126
+ map_priority: 1
+ name: public
+ notation: ip_ranges
+ render_addr_mask: public
+ render_type: null
+ use_gateway: true
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.1.0/24
+ configurable: true
+ map_priority: 2
+ name: storage
+ notation: cidr
+ render_addr_mask: storage
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 102
+ name: storage
+ vlan_start: 102
+
+
+--- Example 1 ---
+
+Template file:
+
+deployment-scenario-metadata:
+ title: %{title}
+ version: 0.1
+dea-override-config:
+ environment:
+ net_segment_type: %{environment/net_segment_type}
+ nodes:
+ %{nodes}
+
+
+Result:
+
+deployment-scenario-metadata:
+ title: Deployment Environment Adapter (DEA)
+ version: 0.1
+dea-override-config:
+ environment:
+ net_segment_type: tun
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ transformations: transformations_1
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ transformations: transformations_1
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ transformations: transformations_1
+ - id: 4
+ interfaces: interfaces_2
+ role: controller,mongo
+ transformations: transformations_2
+ - id: 5
+ interfaces: interfaces_2
+ role: controller,mongo
+ transformations: transformations_2
+ - id: 6
+ interfaces: interfaces_2
+ role: controller,mongo
+ transformations: transformations_2
+
+
+--- Example 2 ---
+
+Template file:
+
+dea-override-config:
+ network:
+ networks:
+ %{network/networks}
+
+
+Result:
+
+dea-override-config:
+ network:
+ networks:
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ cidr: 172.16.0.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.16.0.2
+ - 172.16.0.126
+ map_priority: 1
+ name: public
+ notation: ip_ranges
+ render_addr_mask: public
+ render_type: null
+ use_gateway: true
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.1.0/24
+ configurable: true
+ map_priority: 2
+ name: storage
+ notation: cidr
+ render_addr_mask: storage
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 102
+ name: storage
+ vlan_start: 102
+
+
+--- Example 3 ---
+
+Template file:
+
+storage_if: %{interface(storage)}
+compute_private_if: %{interface(private,compute)}
+# Management interface of a mongo node
+mongo_mgmt_if: %{interface(management,mongo)}
+controller_private_if: %{interface(private,controller)}
+
+
+Result:
+
+storage_if: ens4
+compute_private_if: ens5
+# Management interface of a mongo node
+mongo_mgmt_if: ens3
+controller_private_if: ens4
+
+
+--- Example 4 ---
+
+Template file:
+
+version: 1.1
+created: Mon Jun 13 19:39:35 2016
+comment: None
+%{include(environment.yaml)}
+
+
+environment.yaml:
+
+environment:
+ name: F9-NOSDN-NOFEATURE-VXLAN-BAREMETAL
+ net_segment_type: tun
+
+
+Result:
+
+version: 1.1
+created: Mon Jun 13 19:39:35 2016
+comment: None
+environment:
+ name: F9-NOSDN-NOFEATURE-VXLAN-BAREMETAL
+ net_segment_type: tun
+
+
+--- Example 5 ---
+
+Template file (except):
+
+settings:
+ editable:
+ access:
+ email:
+ description: Email address for Administrator
+ label: Email
+ regex:
+ error: Invalid email
+ source: ^\S+@\S+$
+ type: text
+ value: admin@localhost
+ weight: 40
+# ...
+# lines omitted for brevity
+ %{include(templates/cgroups.yaml)}
+
+
+cgroups.yaml:
+
+ cgroups:
+ metadata:
+ always_editable: true
+ group: general
+ label: Cgroups conguration for services
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 90
+
+
+Result:
+
+settings:
+ editable:
+ access:
+ email:
+ description: Email address for Administrator
+ label: Email
+ regex:
+ error: Invalid email
+ source: ^\S+@\S+$
+ type: text
+ value: admin@localhost
+ weight: 40
+# ...
+# again, lines omitted for brevity
+ cgroups:
+ metadata:
+ always_editable: true
+ group: general
+ label: Cgroups conguration for services
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 90
+
diff --git a/deploy/__init__.py b/deploy/__init__.py
new file mode 100644
index 000000000..fb73157f9
--- /dev/null
+++ b/deploy/__init__.py
@@ -0,0 +1,8 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
diff --git a/deploy/cloud/configure_environment.py b/deploy/cloud/configure_environment.py
new file mode 100644
index 000000000..0fbf225c6
--- /dev/null
+++ b/deploy/cloud/configure_environment.py
@@ -0,0 +1,73 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from configure_settings import ConfigureSettings
+from configure_network import ConfigureNetwork
+from configure_nodes import ConfigureNodes
+
+from common import (
+ E,
+ exec_cmd,
+ parse,
+ err,
+ log,
+ delete,
+ create_dir_if_not_exists,
+)
+
+
+class ConfigureEnvironment(object):
+
+ def __init__(self, dea, yaml_config_dir, release_id, node_id_roles_dict):
+ self.env_id = None
+ self.dea = dea
+ self.yaml_config_dir = yaml_config_dir
+ self.release_id = release_id
+ self.node_id_roles_dict = node_id_roles_dict
+ self.required_networks = []
+
+ def env_exists(self, env_name):
+ env_list = parse(exec_cmd('fuel env --list'))
+ for env in env_list:
+ if env[E['name']] == env_name and env[E['status']] == 'new':
+ self.env_id = env[E['id']]
+ return True
+ return False
+
+ def configure_environment(self):
+ log('Configure environment')
+ delete(self.yaml_config_dir)
+ create_dir_if_not_exists(self.yaml_config_dir)
+ env_name = self.dea.get_env_name()
+ env_net_segment_type = self.dea.get_env_net_segment_type()
+ log('Creating environment %s release %s net-segment-type %s'
+ % (env_name, self.release_id, env_net_segment_type))
+ exec_cmd('fuel env create --name "%s" --release %s --net-segment-type %s'
+ % (env_name, self.release_id, env_net_segment_type))
+
+ if not self.env_exists(env_name):
+ err('Failed to create environment %s' % env_name)
+ self.config_settings()
+ self.config_network()
+ self.config_nodes()
+
+ def config_settings(self):
+ settings = ConfigureSettings(self.yaml_config_dir, self.env_id,
+ self.dea)
+ settings.config_settings()
+
+ def config_network(self):
+ network = ConfigureNetwork(self.yaml_config_dir, self.env_id, self.dea)
+ network.config_network()
+
+ def config_nodes(self):
+ nodes = ConfigureNodes(self.yaml_config_dir, self.env_id,
+ self.node_id_roles_dict, self.dea)
+ nodes.config_nodes()
diff --git a/deploy/cloud/configure_network.py b/deploy/cloud/configure_network.py
new file mode 100644
index 000000000..b3ff9e9e0
--- /dev/null
+++ b/deploy/cloud/configure_network.py
@@ -0,0 +1,69 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+
+from common import (
+ exec_cmd,
+ check_file_exists,
+ log,
+ backup,
+)
+
+
+class ConfigureNetwork(object):
+
+ def __init__(self, yaml_config_dir, env_id, dea):
+ self.yaml_config_dir = yaml_config_dir
+ self.env_id = env_id
+ self.dea = dea
+ self.required_networks = []
+
+ def download_network_config(self):
+ log('Download network config for environment %s' % self.env_id)
+ exec_cmd('fuel network --env %s --download --dir %s'
+ % (self.env_id, self.yaml_config_dir))
+
+ def upload_network_config(self):
+ log('Upload network config for environment %s' % self.env_id)
+ exec_cmd('fuel network --env %s --upload --dir %s'
+ % (self.env_id, self.yaml_config_dir))
+
+ def config_network(self):
+ log('Configure network')
+ self.download_network_config()
+ self.modify_network_config()
+ self.upload_network_config()
+
+ def modify_network_config(self):
+ log('Modify network config for environment %s' % self.env_id)
+ network_yaml = ('%s/network_%s.yaml'
+ % (self.yaml_config_dir, self.env_id))
+ check_file_exists(network_yaml)
+ backup(network_yaml)
+
+ network_config = self.dea.get_property('network')
+
+ with io.open(network_yaml) as stream:
+ network = yaml.load(stream)
+
+ net_names = self.dea.get_network_names()
+ net_id = {}
+ for net in network['networks']:
+ if net['name'] in net_names:
+ net_id[net['name']] = {'id': net['id'],
+ 'group_id': net['group_id']}
+
+ for network in network_config['networks']:
+ network.update(net_id[network['name']])
+
+ with io.open(network_yaml, 'w') as stream:
+ yaml.dump(network_config, stream, default_flow_style=False)
diff --git a/deploy/cloud/configure_nodes.py b/deploy/cloud/configure_nodes.py
new file mode 100644
index 000000000..ea50307b1
--- /dev/null
+++ b/deploy/cloud/configure_nodes.py
@@ -0,0 +1,202 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+import copy
+import glob
+import io
+
+import six
+import yaml
+
+from common import (
+ exec_cmd,
+ check_file_exists,
+ log,
+ backup,
+)
+
+
+class ConfigureNodes(object):
+
+ def __init__(self, yaml_config_dir, env_id, node_id_roles_dict, dea):
+ self.yaml_config_dir = yaml_config_dir
+ self.env_id = env_id
+ self.node_id_roles_dict = node_id_roles_dict
+ self.dea = dea
+
+ def config_nodes(self):
+ log('Configure nodes')
+
+ # Super dirty fix since Fuel 7 requires user defined roles to be
+ # assigned before anything else (BUG fixed in Fuel 8)!
+ for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ if "opendaylight" in roles_blade[0] or "onos" in roles_blade[0] or "contrail" in roles_blade[0]:
+ exec_cmd('fuel node set --node-id %s --role %s --env %s'
+ % (node_id, roles_blade[0], self.env_id))
+
+ for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ if "opendaylight" not in roles_blade[0] and "onos" not in roles_blade[0] and "contrail" not in roles_blade[0]:
+ exec_cmd('fuel node set --node-id %s --role %s --env %s'
+ % (node_id, roles_blade[0], self.env_id))
+
+ for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ # Modify node attributes
+ self.download_attributes(node_id)
+ self.modify_node_attributes(node_id, roles_blade)
+ self.upload_attributes(node_id)
+ # Modify interfaces configuration
+ self.download_interface_config(node_id)
+ self.modify_node_interface(node_id, roles_blade)
+ self.upload_interface_config(node_id)
+
+ # Currently not used, we use default deployment facts
+ # which are generated by fuel based on type segmentation
+ # and network to nic assignment
+ #
+ # Download our modified deployment configuration, which includes our
+ # changes to network topology etc.
+ #self.download_deployment_config()
+ #for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ # self.modify_node_network_schemes(node_id, roles_blade)
+ #self.upload_deployment_config()
+
+ def modify_node_network_schemes(self, node_id, roles_blade):
+ log('Modify network transformations for node %s' % node_id)
+ type = self.dea.get_node_property(roles_blade[1], 'transformations')
+ transformations = self.dea.get_property(type)
+ deployment_dir = '%s/deployment_%s' % (
+ self.yaml_config_dir, self.env_id)
+ backup(deployment_dir)
+ node_file = ('%s/%s.yaml' % (deployment_dir, node_id))
+ with io.open(node_file) as stream:
+ node = yaml.load(stream)
+
+ node['network_scheme'].update(transformations)
+
+ with io.open(node_file, 'w') as stream:
+ yaml.dump(node, stream, default_flow_style=False)
+
+ def download_deployment_config(self):
+ log('Download deployment config for environment %s' % self.env_id)
+ exec_cmd('fuel deployment --env %s --default --dir %s'
+ % (self.env_id, self.yaml_config_dir))
+
+ def upload_deployment_config(self):
+ log('Upload deployment config for environment %s' % self.env_id)
+ exec_cmd('fuel deployment --env %s --upload --dir %s'
+ % (self.env_id, self.yaml_config_dir))
+
+ def download_interface_config(self, node_id):
+ log('Download interface config for node %s' % node_id)
+ exec_cmd('fuel node --env %s --node %s --network --download '
+ '--dir %s' % (self.env_id, node_id, self.yaml_config_dir))
+
+ def upload_interface_config(self, node_id):
+ log('Upload interface config for node %s' % node_id)
+ exec_cmd('fuel node --env %s --node %s --network --upload '
+ '--dir %s' % (self.env_id, node_id, self.yaml_config_dir))
+
+ def download_attributes(self, node_id):
+ log('Download attributes for node %s' % node_id)
+ exec_cmd('fuel node --env %s --node %s --attributes --download '
+ '--dir %s' % (self.env_id, node_id, self.yaml_config_dir))
+
+ def upload_attributes(self, node_id):
+ log('Upload attributes for node %s' % node_id)
+ exec_cmd('fuel node --env %s --node %s --attributes --upload '
+ '--dir %s' % (self.env_id, node_id, self.yaml_config_dir))
+
+ def modify_node_attributes(self, node_id, roles_blade):
+ log('Modify attributes for node {0}'.format(node_id))
+ dea_key = self.dea.get_node_property(roles_blade[1], 'attributes')
+ if not dea_key:
+ # Node attributes are not overridden. Nothing to do.
+ return
+ new_attributes = self.dea.get_property(dea_key)
+ attributes_yaml = ('%s/node_%s/attributes.yaml'
+ % (self.yaml_config_dir, node_id))
+ check_file_exists(attributes_yaml)
+ backup('%s/node_%s' % (self.yaml_config_dir, node_id))
+
+ with open(attributes_yaml) as stream:
+ attributes = yaml.load(stream)
+ result_attributes = self._merge_dicts(attributes, new_attributes)
+
+ with open(attributes_yaml, 'w') as stream:
+ yaml.dump(result_attributes, stream, default_flow_style=False)
+
+ # interface configuration can
+ # looks like this:
+ #
+ # interfaces_dpdk:
+ # ens3:
+ # - fuelweb_admin
+ # ens4:
+ # - storage
+ # - management
+ # ens5:
+ # - interface_properties:
+ # dpdk:
+ # enabled: true
+ # - private
+ # ens6:
+ # - public
+ def modify_node_interface(self, node_id, roles_blade):
+ log('Modify interface config for node %s' % node_id)
+ interface_yaml = ('%s/node_%s/interfaces.yaml'
+ % (self.yaml_config_dir, node_id))
+ check_file_exists(interface_yaml)
+ backup('%s/node_%s' % (self.yaml_config_dir, node_id))
+
+ with io.open(interface_yaml) as stream:
+ interfaces = yaml.load(stream)
+
+ net_name_id = {}
+ for interface in interfaces:
+ for network in interface['assigned_networks']:
+ net_name_id[network['name']] = network['id']
+
+ type = self.dea.get_node_property(roles_blade[1], 'interfaces')
+ interface_config = self.dea.get_property(type)
+
+ for interface in interfaces:
+ interface['assigned_networks'] = []
+ if interface['name'] in interface_config:
+ for prop in interface_config[interface['name']]:
+ net = {}
+ #net name
+ if isinstance(prop, six.string_types):
+ net['id'] = net_name_id[prop]
+ net['name'] = prop
+ interface['assigned_networks'].append(net)
+ #network properties
+ elif isinstance(prop, dict):
+ if not 'interface_properties' in prop:
+ log('Interface configuration contain unknow dict: %s' % prop)
+ continue
+ interface['interface_properties'] = \
+ self._merge_dicts(interface.get('interface_properties', {}),
+ prop.get('interface_properties', {}))
+
+ with io.open(interface_yaml, 'w') as stream:
+ yaml.dump(interfaces, stream, default_flow_style=False)
+
+ def _merge_dicts(self, dict1, dict2):
+ """Recursively merge dictionaries."""
+ result = copy.deepcopy(dict1)
+ for k, v in six.iteritems(dict2):
+ if isinstance(result.get(k), list) and isinstance(v, list):
+ result[k].extend(v)
+ continue
+ if isinstance(result.get(k), dict) and isinstance(v, dict):
+ result[k] = self._merge_dicts(result[k], v)
+ continue
+ result[k] = copy.deepcopy(v)
+ return result
+
diff --git a/deploy/cloud/configure_settings.py b/deploy/cloud/configure_settings.py
new file mode 100644
index 000000000..b60a60fd1
--- /dev/null
+++ b/deploy/cloud/configure_settings.py
@@ -0,0 +1,75 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+
+from common import (
+ exec_cmd,
+ check_file_exists,
+ log,
+ backup,
+)
+
+
+class ConfigureSettings(object):
+
+ def __init__(self, yaml_config_dir, env_id, dea):
+ self.yaml_config_dir = yaml_config_dir
+ self.env_id = env_id
+ self.dea = dea
+
+ def download_settings(self):
+ log('Download settings for environment %s' % self.env_id)
+ exec_cmd('fuel settings --env %s --download --dir %s'
+ % (self.env_id, self.yaml_config_dir))
+
+ def upload_settings(self):
+ log('Upload settings for environment %s' % self.env_id)
+ exec_cmd('fuel settings --env %s --upload --dir %s'
+ % (self.env_id, self.yaml_config_dir))
+
+ def config_settings(self):
+ log('Configure settings')
+ self.download_settings()
+ self.modify_settings()
+ self.upload_settings()
+
+ def modify_settings(self):
+ log('Modify settings for environment %s' % self.env_id)
+ settings_yaml = ('%s/settings_%s.yaml'
+ % (self.yaml_config_dir, self.env_id))
+ check_file_exists(settings_yaml)
+
+ with io.open(settings_yaml, 'r') as stream:
+ orig_dea = yaml.load(stream)
+
+ backup(settings_yaml)
+ settings = self.dea.get_property('settings')
+ # Copy fuel defined plugin_id's to user defined settings
+ # From Fuel 8.0 chosen_id was added because it is now
+ # possible to install many version of the same plugin
+ # but we will install only one version
+ for plugin in orig_dea['editable']:
+ if 'metadata' in orig_dea['editable'][plugin]:
+ if 'plugin_id' in orig_dea['editable'][plugin]['metadata']:
+ if not plugin in settings['editable']:
+ settings['editable'][plugin] = orig_dea['editable'][plugin]
+ else:
+ settings['editable'][plugin]["metadata"]["plugin_id"] = orig_dea['editable'][plugin]["metadata"]["plugin_id"]
+ elif 'chosen_id' in orig_dea['editable'][plugin]['metadata']:
+ if not plugin in settings['editable']:
+ settings['editable'][plugin] = orig_dea['editable'][plugin]
+ else:
+ 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']
+
+ with io.open(settings_yaml, 'w') as stream:
+ yaml.dump(settings, stream, default_flow_style=False)
diff --git a/deploy/cloud/deploy.py b/deploy/cloud/deploy.py
new file mode 100644
index 000000000..e00934bd9
--- /dev/null
+++ b/deploy/cloud/deploy.py
@@ -0,0 +1,112 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+
+from dea import DeploymentEnvironmentAdapter
+from configure_environment import ConfigureEnvironment
+from deployment import Deployment
+
+from common import (
+ R,
+ exec_cmd,
+ parse,
+ check_file_exists,
+ commafy,
+ ArgParser,
+ log,
+)
+
+YAML_CONF_DIR = '/var/lib/opnfv'
+
+
+class Deploy(object):
+
+ def __init__(self, dea_file, no_health_check, deploy_timeout,
+ no_deploy_environment):
+ self.dea = DeploymentEnvironmentAdapter(dea_file)
+ self.no_health_check = no_health_check
+ self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
+ self.macs_per_blade = {}
+ self.blades = self.dea.get_node_ids()
+ self.blade_node_dict = self.dea.get_blade_node_map()
+ self.node_roles_dict = {}
+ self.env_id = None
+ self.wanted_release = self.dea.get_property('wanted_release')
+
+ def assign_roles_to_cluster_node_ids(self):
+ self.node_roles_dict = {}
+ for blade, node in self.blade_node_dict.iteritems():
+ if self.dea.get_node_roles(blade):
+ roles = commafy(self.dea.get_node_roles(blade))
+ self.node_roles_dict[node] = (roles, blade)
+
+ def configure_environment(self):
+ release_list = parse(exec_cmd('fuel release -l'))
+ for release in release_list:
+ if release[R['name']] == self.wanted_release:
+ break
+ config_env = ConfigureEnvironment(self.dea, YAML_CONF_DIR,
+ release[R['id']],
+ self.node_roles_dict)
+ config_env.configure_environment()
+ self.env_id = config_env.env_id
+
+ def deploy_cloud(self):
+ dep = Deployment(self.dea, YAML_CONF_DIR, self.env_id,
+ self.node_roles_dict, self.no_health_check,
+ self.deploy_timeout)
+ if not self.no_deploy_environment:
+ dep.deploy()
+ else:
+ log('Configuration is done. Deployment is not launched.')
+
+ def deploy(self):
+
+ self.assign_roles_to_cluster_node_ids()
+
+ self.configure_environment()
+
+ self.deploy_cloud()
+
+
+def parse_arguments():
+ parser = ArgParser(prog='python %s' % __file__)
+ parser.add_argument('-nh', dest='no_health_check', action='store_true',
+ default=False,
+ help='Don\'t run health check after deployment')
+ parser.add_argument('-dt', dest='deploy_timeout', action='store',
+ default=240, help='Deployment timeout (in minutes) '
+ '[default: 240]')
+ parser.add_argument('-nde', dest='no_deploy_environment',
+ action='store_true', default=False,
+ help=('Do not launch environment deployment'))
+ parser.add_argument('dea_file', action='store',
+ help='Deployment Environment Adapter: dea.yaml')
+
+ args = parser.parse_args()
+ check_file_exists(args.dea_file)
+
+ kwargs = {'dea_file': args.dea_file,
+ 'no_health_check': args.no_health_check,
+ 'deploy_timeout': args.deploy_timeout,
+ 'no_deploy_environment': args.no_deploy_environment}
+ return kwargs
+
+
+def main():
+ kwargs = parse_arguments()
+ deploy = Deploy(**kwargs)
+ deploy.deploy()
+
+if __name__ == '__main__':
+ main()
diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py
new file mode 100644
index 000000000..ecccc241f
--- /dev/null
+++ b/deploy/cloud/deployment.py
@@ -0,0 +1,232 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+import time
+import re
+import json
+
+from common import (
+ N,
+ E,
+ exec_cmd,
+ run_proc,
+ run_proc_wait_terminated,
+ run_proc_kill,
+ parse,
+ err,
+ log,
+ delete,
+)
+
+SEARCH_TEXT = '(err)'
+LOG_FILE = '/var/log/puppet.log'
+GREP_LINES_OF_LEADING_CONTEXT = 100
+GREP_LINES_OF_TRAILING_CONTEXT = 100
+LIST_OF_CHAR_TO_BE_ESCAPED = ['[', ']', '"']
+
+
+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):
+ self.dea = dea
+ self.yaml_config_dir = yaml_config_dir
+ self.env_id = env_id
+ self.node_id_roles_dict = node_id_roles_dict
+ self.no_health_check = no_health_check
+ self.deploy_timeout = deploy_timeout
+ 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 = []
+ cmd = ('ssh -q node-%s grep \'"%s"\' %s'
+ % (node_id, SEARCH_TEXT, LOG_FILE))
+ results, _ = exec_cmd(cmd, False)
+ for result in results.splitlines():
+ log_msg = ''
+
+ sub_cmd = '"%s" %s' % (result, LOG_FILE)
+ for c in LIST_OF_CHAR_TO_BE_ESCAPED:
+ sub_cmd = sub_cmd.replace(c, '\%s' % c)
+ grep_cmd = ('grep -B%s %s'
+ % (GREP_LINES_OF_LEADING_CONTEXT, sub_cmd))
+ cmd = ('ssh -q node-%s "%s"' % (node_id, grep_cmd))
+
+ details, _ = exec_cmd(cmd, False)
+ details_list = details.splitlines()
+
+ found_prev_log = False
+ for i in range(len(details_list) - 2, -1, -1):
+ if self.pattern.match(details_list[i]):
+ found_prev_log = True
+ break
+ if found_prev_log:
+ log_msg += '\n'.join(details_list[i:-1]) + '\n'
+
+ grep_cmd = ('grep -A%s %s'
+ % (GREP_LINES_OF_TRAILING_CONTEXT, sub_cmd))
+ cmd = ('ssh -q node-%s "%s"' % (node_id, grep_cmd))
+
+ details, _ = exec_cmd(cmd, False)
+ details_list = details.splitlines()
+
+ found_next_log = False
+ for i in range(1, len(details_list)):
+ if self.pattern.match(details_list[i]):
+ found_next_log = True
+ break
+ if found_next_log:
+ log_msg += '\n'.join(details_list[:i])
+ else:
+ log_msg += details
+
+ if log_msg:
+ log_list.append(log_msg)
+
+ if log_list:
+ role = ('controller' if 'controller' in roles_blade[0]
+ else 'compute host')
+ log('_' * 40 + 'Errors in node-%s %s' % (node_id, role)
+ + '_' * 40)
+ for log_msg in log_list:
+ print(log_msg + '\n')
+
+ def run_deploy(self):
+ SLEEP_TIME = 60
+ abort_after = 60 * int(self.deploy_timeout)
+ start = time.time()
+
+ log('Starting deployment of environment %s' % self.env_id)
+ deploy_id = None
+ ready = False
+ 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)
+ 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)
+ 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')
+ exec_cmd('rm -f /var/log/remote/fuel-snapshot-*', False)
+ exec_cmd('rm -f /root/deploy-*', False)
+ log('Generating Fuel deploy snap-shot')
+ if exec_cmd('fuel snapshot < /dev/null &> snapshot.log', False)[1] <> 0:
+ log('Could not create a Fuel snapshot')
+ else:
+ exec_cmd('mv /root/fuel-snapshot* /var/log/remote/', False)
+
+ log('Collecting all Fuel Snapshot & deploy log files')
+ 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 = []
+ for node in node_list:
+ if node[N['status']] != 'ready':
+ failed_nodes.append((node[N['id']], node[N['status']]))
+
+ if failed_nodes:
+ summary = ''
+ for node, status in failed_nodes:
+ 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)
+ log(r)
+ if 'failure' in r:
+ err('Healthcheck failed!', self.collect_logs)
+
+ def deploy(self):
+ self.run_deploy()
+ self.verify_node_status()
+ if not self.no_health_check:
+ self.health_check()
+ self.collect_logs()
diff --git a/deploy/common.py b/deploy/common.py
new file mode 100644
index 000000000..51b70fe46
--- /dev/null
+++ b/deploy/common.py
@@ -0,0 +1,202 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import subprocess
+import sys
+import os
+import logging
+import argparse
+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}
+E = {'id': 0, 'status': 1, 'name': 2, 'release_id': 3, 'pending_release_id': 4}
+R = {'id': 0, 'name': 1, 'state': 2, 'operating_system': 3, 'version': 4}
+RO = {'name': 0, 'conflicts': 1}
+CWD = os.getcwd()
+LOG = logging.getLogger(__name__)
+LOG.setLevel(logging.DEBUG)
+formatter = logging.Formatter('%(message)s')
+out_handler = logging.StreamHandler(sys.stdout)
+out_handler.setFormatter(formatter)
+LOG.addHandler(out_handler)
+LOGFILE = 'autodeploy.log'
+if os.path.isfile(LOGFILE):
+ os.remove(LOGFILE)
+out_handler = logging.FileHandler(LOGFILE, mode='w')
+out_handler.setFormatter(formatter)
+LOG.addHandler(out_handler)
+os.chmod(LOGFILE, 0664)
+
+
+def mask_arguments(cmd, mask_args, mask_str):
+ 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
+ if pos == 0 or pos >= len(cmd_line):
+ continue
+ cmd_line[pos] = mask_str
+ return ' '.join(cmd_line)
+
+
+def exec_cmd(cmd, check=True, attempts=1, delay=5, verbose=False, mask_args=[], mask_str='*****'):
+ masked_cmd = mask_arguments(cmd, mask_args, mask_str)
+
+ # a negative value means forever
+ while attempts != 0:
+ attempts = attempts - 1
+ process = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ shell=True)
+ (response, stderr) = process.communicate()
+ return_code = process.returncode
+ if return_code == 0 or attempts == 0:
+ break
+ time.sleep(delay)
+ if verbose:
+ log('%d attempts left: %s' % (attempts, masked_cmd))
+
+ response = response.strip()
+ if check:
+ if return_code > 0:
+ stderr = stderr.strip()
+ print("Failed command: " + str(masked_cmd))
+ print("Command returned response: " + str(stderr))
+ print("Command return code: " + str(return_code))
+ raise Exception(stderr)
+ else:
+ print("Command: " + str(masked_cmd))
+ print(str(response))
+ return response
+ return response, return_code
+
+
+def run_proc(cmd):
+ process = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ shell=True)
+ return process
+
+
+def run_proc_wait_terminated(process):
+ response = process.communicate()[0].strip()
+ return_code = process.returncode
+ return response, return_code
+
+
+def run_proc_kill(process):
+ response = process.kill()
+ return response
+
+
+def parse(printout):
+ parsed_list = []
+ lines = printout.splitlines()
+ for l in lines[2:]:
+ parsed = [e.strip() for e in l.split('|')]
+ parsed_list.append(parsed)
+ return parsed_list
+
+
+def clean(lines):
+ parsed_list = []
+ parsed = []
+ for l in lines.strip().splitlines():
+ parsed = []
+ cluttered = [e.strip() for e in l.split(' ')]
+ for p in cluttered:
+ if p:
+ parsed.append(p)
+ parsed_list.append(parsed)
+ return parsed if len(parsed_list) == 1 else parsed_list
+
+
+def err(message, fun = None, *args):
+ LOG.error('%s\n' % message)
+ if fun:
+ fun(*args)
+ sys.exit(1)
+
+
+def warn(message):
+ LOG.warning('%s\n' % message)
+
+
+def check_file_exists(file_path):
+ if not os.path.dirname(file_path):
+ file_path = '%s/%s' % (CWD, file_path)
+ if not os.access(file_path, os.R_OK):
+ err('ERROR: File %s not found\n' % file_path)
+
+
+def check_dir_exists(dir_path):
+ if not os.path.dirname(dir_path):
+ dir_path = '%s/%s' % (CWD, dir_path)
+ if not os.path.isdir(dir_path):
+ err('ERROR: Directory %s not found\n' % dir_path)
+
+
+def create_dir_if_not_exists(dir_path):
+ if not os.path.isdir(dir_path):
+ log('Creating directory %s' % dir_path)
+ os.makedirs(dir_path)
+
+
+def delete(f):
+ if os.path.isfile(f):
+ log('Deleting file %s' % f)
+ os.remove(f)
+ elif os.path.isdir(f):
+ log('Deleting directory %s' % f)
+ shutil.rmtree(f)
+
+
+def commafy(comma_separated_list):
+ l = [c.strip() for c in comma_separated_list.split(',')]
+ return ','.join(l)
+
+
+def check_if_root():
+ uid = os.getuid()
+ if uid != 0:
+ err('You need be root to run this application')
+
+
+def log(message):
+ LOG.debug('%s\n' % message)
+
+
+class ArgParser(argparse.ArgumentParser):
+
+ def error(self, message):
+ sys.stderr.write('ERROR: %s\n' % message)
+ self.print_help()
+ sys.exit(2)
+
+
+def backup(path):
+ src = path
+ dst = path + '_orig'
+ delete(dst)
+ try:
+ shutil.copytree(src, dst)
+ except OSError as e:
+ if e.errno == errno.ENOTDIR:
+ shutil.copy(src, dst)
+ else:
+ raise
diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml
new file mode 100644
index 000000000..c1a0606bc
--- /dev/null
+++ b/deploy/config/dea_base.yaml
@@ -0,0 +1,801 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+dea-base-config-metadata:
+ title: 'Deployment Environment Adapter Base configuration'
+ # DEA API version supported
+ version: '0.4'
+ created: 'Fri Jun 10 2016'
+ comment: 'Rebased for Fuel 9'
+environment:
+ net_segment_type: tun
+fuel:
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+wanted_release: Mitaka on Ubuntu 14.04
+settings:
+ editable:
+ access:
+ email:
+ description: Email address for Administrator
+ label: Email
+ regex:
+ error: Invalid email
+ source: ^\S+@\S+$
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ group: general
+ label: OpenStack Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 20
+ tenant:
+ description: Tenant (project) name for Administrator
+ label: Tenant
+ regex:
+ error: Invalid tenant name
+ source: ^(?!services$)(?!nova$)(?!glance$)(?!keystone$)(?!neutron$)(?!cinder$)(?!swift$)(?!ceph$)(?!ironic$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 30
+ user:
+ description: Username for Administrator
+ label: Username
+ regex:
+ error: Invalid username
+ source: ^(?!services$)(?!nova$)(?!glance$)(?!keystone$)(?!neutron$)(?!cinder$)(?!swift$)(?!ceph$)(?!ironic$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer and Aodh components will be installed
+ label: Install Ceilometer and Aodh
+ type: checkbox
+ value: true
+ weight: 60
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 50
+ ironic:
+ description: If selected, Ironic component will be installed
+ label: Install Ironic
+ restrictions:
+ - cluster:net_provider != 'neutron' or networking_parameters:segmentation_type != 'vlan': Ironic
+ requires Neutron with VLAN segmentation.
+ - settings:storage.images_ceph.value == true and settings:storage.objects_ceph.value == false: Ironic
+ requires Swift or RadosGW for Glance images.
+ type: checkbox
+ value: false
+ weight: 80
+ metadata:
+ group: openstack_services
+ label: Additional Components
+ weight: 10
+ mongo:
+ description: If selected, You can use external Mongo DB as ceilometer backend
+ label: Use external Mongo DB
+ restrictions:
+ - settings:additional_components.ceilometer.value == false: External Mongo
+ aims to be an external backend for Ceilometer. Without Ceilometer enabled,
+ External Mongo is useless and should not be installed.
+ type: checkbox
+ value: false
+ weight: 70
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ type: checkbox
+ value: false
+ weight: 20
+ murano-cfapi:
+ description: If selected, Murano service broker will be installed
+ label: Install Murano service broker for Cloud Foundry
+ restrictions:
+ - condition: settings:additional_components.murano.value == false
+ message: Murano should be enabled
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ type: checkbox
+ value: false
+ weight: 30
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ cgroups:
+ metadata:
+ always_editable: true
+ group: general
+ label: Cgroups conguration for services
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 90
+ common:
+ auth_key:
+ group: security
+ type: hidden
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ group: network
+ label: Auto assign floating IP
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ group: logging
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ libvirt_type:
+ group: compute
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ weight: 30
+ metadata:
+ label: Common
+ weight: 10
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ group: compute
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 30
+ propagate_task_deploy:
+ type: hidden
+ value: false
+ weight: 12
+ puppet_debug:
+ description: Debug puppet logging mode provides more information, but requires
+ more disk space.
+ group: logging
+ label: Puppet debug logging
+ type: checkbox
+ value: true
+ weight: 20
+ resume_guests_state_on_host_boot:
+ description: Whether to resume previous guests state when the host reboots.
+ If enabled, this option causes guests assigned to the host to resume their
+ previous state. If the guest was running a restart will be attempted when
+ nova-compute starts. If the guest was not running previously, a restart
+ will not be attempted.
+ group: compute
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 50
+ task_deploy:
+ type: hidden
+ value: true
+ weight: 11
+ use_cow_images:
+ description: For most cases you will want qcow format. If it's disabled, raw
+ image format will be used to run VMs. OpenStack with raw format currently
+ does not support snapshotting.
+ group: storage
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 60
+ use_vcenter:
+ type: hidden
+ value: false
+ weight: 30
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ group: general
+ label: Corosync
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 50
+ port:
+ description: ''
+ label: Port
+ type: text
+ value: '12000'
+ weight: 20
+ verified:
+ description: Set True only if multicast is configured correctly on router.
+ label: Need to pass network verification.
+ type: checkbox
+ value: false
+ weight: 10
+ external_mongo:
+ hosts_ip:
+ description: IP Addresses of MongoDB. Use comma to split IPs
+ label: MongoDB hosts IP
+ regex:
+ error: Invalid hosts ip sequence
+ source: ^(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),)*((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
+ type: text
+ value: ''
+ weight: 30
+ metadata:
+ group: openstack_services
+ label: External MongoDB
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.mongo.value == false
+ message: Ceilometer and MongoDB are not enabled on the Additional Components
+ section
+ weight: 30
+ mongo_db_name:
+ description: Mongo database name
+ label: Database name
+ regex:
+ error: Invalid database name
+ source: ^\w+$
+ type: text
+ value: ceilometer
+ weight: 30
+ mongo_password:
+ description: Mongo database password
+ label: Password
+ regex:
+ error: Password contains spaces
+ source: ^\S*$
+ type: password
+ value: ceilometer
+ weight: 30
+ mongo_replset:
+ description: Name for Mongo replication set
+ label: Replset
+ type: text
+ value: ''
+ weight: 30
+ mongo_user:
+ description: Mongo database username
+ label: Username
+ regex:
+ error: Empty username
+ source: ^\w+$
+ type: text
+ value: ceilometer
+ weight: 30
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90 nomodeset
+ metadata:
+ group: general
+ label: Kernel parameters
+ weight: 60
+ murano_settings:
+ metadata:
+ group: openstack_services
+ label: Murano Settings
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.murano.value == false
+ message: Murano is not enabled on the Additional Components section
+ weight: 20
+ murano_glance_artifacts_plugin:
+ description: If selected glance artifact repository will be enabled
+ label: Enable glance artifact repository
+ type: checkbox
+ value: true
+ weight: 40
+ murano_repo_url:
+ description: ''
+ label: Murano Repository URL
+ type: text
+ value: http://storage.apps.openstack.org/
+ weight: 10
+ neutron_advanced_configuration:
+ metadata:
+ group: network
+ label: Neutron Advanced Configuration
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 20
+ neutron_dvr:
+ description: Enable Distributed Virtual Routers in Neutron
+ label: Neutron DVR
+ restrictions:
+ - ? networking_parameters:segmentation_type != 'vlan' and settings:neutron_advanced_configuration.neutron_l2_pop.value
+ == false
+ : DVR requires L2 population to be enabled.
+ type: checkbox
+ value: false
+ weight: 20
+ neutron_l2_pop:
+ description: Enable L2 population mechanism in Neutron
+ label: Neutron L2 population
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: checkbox
+ value: false
+ weight: 10
+ neutron_l3_ha:
+ description: 'Enable High Availability features for Virtual Routers in Neutron
+
+ Requires at least 2 Controller nodes to function properly
+
+ '
+ label: Neutron L3 HA
+ restrictions:
+ - condition: settings:neutron_advanced_configuration.neutron_dvr.value ==
+ true
+ message: Neutron DVR must be disabled in order to use Neutron L3 HA
+ type: checkbox
+ value: false
+ weight: 30
+ neutron_qos:
+ description: Enable Neutron QoS advanced service plug-in
+ label: Neutron QoS
+ type: checkbox
+ value: false
+ weight: 40
+ operator_user:
+ authkeys:
+ description: Public SSH keys to include to operator user's authorized keys,
+ one per line.
+ label: Authorized SSH keys
+ type: textarea
+ value: ''
+ weight: 80
+ homedir:
+ description: Home directory for operator user
+ label: Home directory
+ regex:
+ error: Invalid path
+ source: ^/\S
+ type: text
+ value: /home/fueladmin
+ weight: 70
+ metadata:
+ group: general
+ label: Operating System Access
+ weight: 15
+ name:
+ description: Username for operator user
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: fueladmin
+ weight: 50
+ password:
+ description: Password for operator user
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: mCKyMCwhzrt7d6E8WQzxg5WS
+ weight: 60
+ sudo:
+ description: Sudoers configuration directives for operator user, one per line.
+ label: Sudoers configuration
+ type: textarea
+ value: 'ALL=(ALL) NOPASSWD: ALL'
+ weight: 90
+ provision:
+ metadata:
+ group: general
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: 'false'
+ weight: 80
+ method:
+ type: hidden
+ value: image
+ packages:
+ label: Initial packages
+ type: textarea
+ value: 'acl
+
+ anacron
+
+ bash-completion
+
+ bridge-utils
+
+ bsdmainutils
+
+ build-essential
+
+ cloud-init
+
+ curl
+
+ daemonize
+
+ debconf-utils
+
+ gdisk
+
+ grub-pc
+
+ hpsa-dkms
+
+ hwloc
+
+ i40e-dkms
+
+ linux-firmware
+
+ linux-firmware-nonfree
+
+ linux-headers-generic-lts-trusty
+
+ linux-image-generic-lts-trusty
+
+ lvm2
+
+ mcollective
+
+ mdadm
+
+ multipath-tools
+
+ multipath-tools-boot
+
+ nailgun-agent
+
+ nailgun-mcagents
+
+ network-checker
+
+ ntp
+
+ openssh-client
+
+ openssh-server
+
+ puppet
+
+ python-amqp
+
+ ruby-augeas
+
+ ruby-ipaddress
+
+ ruby-json
+
+ ruby-netaddr
+
+ ruby-openstack
+
+ ruby-shadow
+
+ ruby-stomp
+
+ telnet
+
+ ubuntu-minimal
+
+ ubuntu-standard
+
+ uuid-runtime
+
+ vim
+
+ virt-what
+
+ vlan
+
+ '
+ weight: 10
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: true
+ weight: 10
+ metadata:
+ group: network
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 10
+ public_ssl:
+ cert_data:
+ description: Certificate and private key data, concatenated into a single
+ file
+ label: Certificate
+ restrictions:
+ - action: hide
+ condition: (settings:public_ssl.cert_source.value != 'user_uploaded') or
+ (settings:public_ssl.horizon.value == false and settings:public_ssl.services.value
+ == false)
+ type: file
+ value: ''
+ weight: 40
+ cert_source:
+ description: From where we'll get certificate and private key
+ label: Select source for certificate
+ restrictions:
+ - action: hide
+ condition: settings:public_ssl.horizon.value == false and settings:public_ssl.services.value
+ == false
+ type: radio
+ value: self_signed
+ values:
+ - data: self_signed
+ description: Generate private key and certificate that will be signed by
+ this key
+ label: Self-signed
+ - data: user_uploaded
+ description: Use pre-generated key and certificate
+ label: I have my own keypair with certificate
+ weight: 30
+ horizon:
+ description: Secure access to Horizon enabling HTTPS instead of HTTP
+ label: HTTPS for Horizon
+ restrictions:
+ - settings:public_ssl.services.value == false: TLS for OpenStack public endpoints
+ should be enabled
+ type: checkbox
+ value: false
+ weight: 20
+ hostname:
+ description: Your DNS entries should point to this name. Self-signed certificates
+ also will use this hostname
+ label: DNS hostname for public TLS endpoints
+ restrictions:
+ - action: hide
+ condition: settings:public_ssl.horizon.value == false and settings:public_ssl.services.value
+ == false
+ type: text
+ value: public.fuel.local
+ weight: 50
+ metadata:
+ group: security
+ label: Public TLS
+ weight: 110
+ services:
+ description: Enable TLS termination on HAProxy for OpenStack services
+ label: TLS for OpenStack public endpoints
+ type: checkbox
+ value: false
+ weight: 10
+ repo_setup:
+ metadata:
+ always_editable: true
+ group: general
+ label: Repositories
+ weight: 50
+ repos:
+ description: 'Please note: the first repository will be considered the operating
+ system mirror that will be used during node provisioning.
+
+ To create a local repository mirror on the Fuel master node, please follow
+ the instructions provided by running "fuel-createmirror --help" on the Fuel
+ master node.
+
+ Please make sure your Fuel master node has Internet access to the repository
+ before attempting to create a mirror.
+
+ '
+ extra_priority: null
+ type: custom_repo_configuration
+ value:
+ - name: ubuntu
+ priority: null
+ section: main universe multiverse
+ suite: trusty
+ type: deb
+ 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://10.20.0.2:8080/mirrors/ubuntu/
+ - name: ubuntu-security
+ priority: null
+ section: main universe multiverse
+ suite: trusty-security
+ type: deb
+ 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: Auxiliary
+ priority: 1150
+ section: main restricted
+ suite: auxiliary
+ type: deb
+ uri: http://10.20.0.2:8080/mitaka-9.0/ubuntu/auxiliary
+ service_user:
+ homedir:
+ type: hidden
+ value: /var/lib/fuel
+ metadata:
+ group: general
+ label: Service user account
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ name:
+ type: hidden
+ value: fuel
+ password:
+ type: hidden
+ value: sCTOC4CkNSTLuNKUQDNUV1Bp
+ root_password:
+ type: hidden
+ value: r00tme
+ sudo:
+ type: hidden
+ value: 'ALL=(ALL) NOPASSWD: ALL'
+ storage:
+ admin_key:
+ type: hidden
+ value: AQDir1pXAAAAABAAm8r2rR0FuVsV8LRo6u9GgQ==
+ bootstrap_osd_key:
+ type: hidden
+ value: AQDir1pXAAAAABAAK5E2MNhWdIpOBzjXJTVqcg==
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works
+ best if Ceph is enabled for volumes and images, too. Enables live migration
+ of all types of Ceph backed VMs (without this option, live migration will
+ only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: false
+ weight: 75
+ fsid:
+ type: hidden
+ value: 7a5db523-ae79-489d-b5d1-7a31fdaba6ef
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images.
+ If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could
+ be selected.
+ type: checkbox
+ value: false
+ weight: 30
+ images_vcenter:
+ description: Configures Glance to use the vCenter/ESXi backend to store images.
+ If enabled, this option will prevent Swift from installing.
+ label: VMware vCenter/ESXi datastore for images (Glance)
+ restrictions:
+ - action: hide
+ condition: settings:common.use_vcenter.value != true
+ - condition: settings:storage.images_ceph.value == true
+ message: Only one Glance backend could be selected.
+ type: checkbox
+ value: false
+ weight: 35
+ metadata:
+ group: storage
+ label: Storage Backends
+ weight: 60
+ mon_key:
+ type: hidden
+ value: AQDir1pXAAAAABAAp92Dw8/kmDdhMvpgaPMKiQ==
+ objects_ceph:
+ description: Configures RadosGW front end for Ceph RBD. This exposes S3 and
+ Swift API Interfaces. If enabled, this option will prevent Swift from installing.
+ label: Ceph RadosGW for objects (Swift API)
+ type: checkbox
+ value: false
+ weight: 80
+ osd_pool_size:
+ description: Configures the default number of object replicas in Ceph. This
+ number must be equal to or lower than the number of deployed 'Ceph OSD'
+ nodes.
+ label: Ceph object replication factor
+ regex:
+ error: Invalid number
+ source: ^[1-9]\d*$
+ type: text
+ value: '3'
+ weight: 85
+ radosgw_key:
+ type: hidden
+ value: AQDir1pXAAAAABAAUH+qP9FohG5wGr/+oQ2rFw==
+ volumes_block_device:
+ description: High performance block device storage. It is recommended to have
+ at least one Cinder Block Device
+ label: Cinder Block device driver
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: false
+ weight: 15
+ volumes_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.value == true or settings:storage.volumes_block_device.value
+ == true
+ type: checkbox
+ value: true
+ weight: 20
+ volumes_lvm:
+ description: It is recommended to have at least one Cinder node.
+ label: Cinder LVM over iSCSI for volumes
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: false
+ weight: 10
+workloads_collector:
+ enabled:
+ type: hidden
+ value: true
+ metadata:
+ group: general
+ label: Workloads Collector User
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ password:
+ type: password
+ value: JWMZX9JjUK1g4AsC7tHvpXvm
+ tenant:
+ type: text
+ value: services
+ user:
+ type: text
+ value: fuel_stats_user
diff --git a/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml
new file mode 100644
index 000000000..32b2cfb22
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml
@@ -0,0 +1,255 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+dea-pod-override-config-metadata:
+ title: 'Deployment Environment Adapter POD override for Development Pipeline - Ericsson ELX version'
+ version: '0.3'
+ created: 'Fri Jun 10 2016'
+ comment: 'Rebased for Fuel 9'
+environment:
+ name: opnfv_virt
+interfaces_1:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+interfaces_dpdk:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ - interface_properties:
+ dpdk:
+ enabled: true
+ ens6:
+ - public
+interfaces_vlan:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.20.0.254
+ dhcp_pool_start: 10.20.0.3
+ ipaddress: 10.20.0.2
+ netmask: 255.255.255.0
+ ssh_network: 10.20.0.0/24
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 8.8.8.8, 8.8.4.4
+ HOSTNAME: fuel
+ NTP1: 0.ubuntu.pool.ntp.org
+ NTP2: 1.ubuntu.pool.ntp.org
+ NTP3: 2.ubuntu.pool.ntp.org
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ configuration_template: null
+ dns_nameservers:
+ - 8.8.8.8
+ - 8.8.4.4
+ floating_name: admin_floating_net
+ floating_ranges:
+ - - 172.16.0.130
+ - 172.16.0.254
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ internal_name: admin_internal_net
+ net_l23_provider: ovs
+ segmentation_type: tun
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.1.0/24
+ configurable: true
+ map_priority: 2
+ name: storage
+ notation: cidr
+ render_addr_mask: storage
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 102
+ name: storage
+ vlan_start: 102
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.253
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: ip_ranges
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: management
+ vlan_start: null
+ - cidr: 192.168.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.1
+ - 192.168.2.254
+ meta:
+ cidr: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: null
+ render_type: cidr
+ seg_type: tun
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 103
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ cidr: 172.16.0.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.16.0.2
+ - 172.16.0.126
+ map_priority: 1
+ name: public
+ notation: ip_ranges
+ render_addr_mask: public
+ render_type: null
+ use_gateway: true
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 10.20.0.0/24
+ gateway: 10.20.0.2
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.0.254
+ meta:
+ configurable: false
+ map_priority: 0
+ notation: ip_ranges
+ render_addr_mask: null
+ render_type: null
+ unmovable: true
+ use_gateway: true
+ name: fuelweb_admin
+ vlan_start: null
+settings:
+ editable:
+ external_dns:
+ dns_list:
+ description: List of upstream DNS servers
+ label: DNS list
+ max: 3
+ regex:
+ error: Invalid IP address
+ source: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
+ type: text_list
+ value:
+ - 8.8.8.8
+ - 8.8.4.4
+ weight: 10
+ metadata:
+ group: network
+ label: Host OS DNS Servers
+ weight: 30
+ external_ntp:
+ metadata:
+ group: network
+ label: Host OS NTP Servers
+ weight: 40
+ ntp_list:
+ description: List of upstream NTP servers
+ label: NTP server list
+ regex:
+ error: Invalid NTP server
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text_list
+ value:
+ - 0.ubuntu.pool.ntp.org
+ - 1.ubuntu.pool.ntp.org
+ - 2.ubuntu.pool.ntp.org
+ weight: 10
+ syslog:
+ metadata:
+ enabled: false
+ group: logging
+ label: Syslog
+ toggleable: true
+ weight: 50
+ syslog_port:
+ description: Remote syslog port
+ label: Port
+ regex:
+ error: Invalid syslog port
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '514'
+ weight: 20
+ syslog_server:
+ description: Remote syslog hostname
+ label: Hostname
+ regex:
+ error: Invalid hostname
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text
+ value: ''
+ weight: 10
+ syslog_transport:
+ label: Syslog transport protocol
+ type: radio
+ value: tcp
+ values:
+ - data: udp
+ description: ''
+ label: UDP
+ - data: tcp
+ description: ''
+ label: TCP
+ weight: 30
+
diff --git a/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml
new file mode 100644
index 000000000..0374c5d29
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml
@@ -0,0 +1,109 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+dha-pod-config-metadata:
+ title: Deployment Hardware Adapter (DHA) for fuel development pipeline - default version
+ version: 0.0.3
+ created: Feb 1 2016
+ comment: Default Fuel8 version
+
+# Adapter to use for this definition
+adapter: libvirt
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+- id: 2
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 3
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 4
+ libvirtName: compute3
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 5
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+virtNetConfDir: templates/virtual_environment/networks
+
+disks:
+ fuel: 100G
+ controller: 100G
+ compute: 100G
+
+# Here the infrastructure VMs can be defined.
+# The entries are not mandatory! If it is left empty
+# the default defined in deploy/templates will
+# be used.
+define_vms:
+ fuel:
+ vcpu:
+ value: 2
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 8388608
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 8388608
+ devices:
+ interface:
+ # With attribute_equlas someone can define which
+ # interface type is meant
+ attribute_equlas:
+ type: network
+ # This will overwrite the type of the model of
+ # the interface
+ model:
+ attribute:
+ type: virtio
+ controller:
+ vcpu:
+ value: 4
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 10485760
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 10485760
+ devices:
+ interface:
+ attribute_equlas:
+ type: network
+ model:
+ attribute:
+ type: e1000
+ compute:
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 6291456
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 6291456
+ devices:
+ interface:
+ attribute_equlas:
+ type: network
+ model:
+ attribute:
+ type: e1000
diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml
new file mode 100644
index 000000000..cb80e3855
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml
@@ -0,0 +1,252 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+dea-pod-override-config-metadata:
+ title: 'Deployment Environment Adapter POD override for Development Pipeline - Ericsson ELX version'
+ version: '0.3'
+ created: 'Fri Jun 10 2016'
+ comment: 'Rebased for Fuel 9'
+environment:
+ name: opnfv_virt
+interfaces_1:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+interfaces_dpdk:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ - interface_properties:
+ dpdk:
+ enabled: true
+ ens6:
+ - public
+interfaces_vlan:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.20.0.254
+ dhcp_pool_start: 10.20.0.3
+ ipaddress: 10.20.0.2
+ netmask: 255.255.255.0
+ ssh_network: 10.20.0.0/24
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 147.214.6.234
+ HOSTNAME: fuel
+ NTP1: time1.ericsson.se
+ NTP2: time2.ericsson.se
+ NTP3: time2.ericsson.se
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ configuration_template: null
+ dns_nameservers:
+ - 147.214.6.234
+ floating_name: admin_floating_net
+ floating_ranges:
+ - - 172.16.0.130
+ - 172.16.0.254
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ internal_name: admin_internal_net
+ net_l23_provider: ovs
+ segmentation_type: tun
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.1.0/24
+ configurable: true
+ map_priority: 2
+ name: storage
+ notation: cidr
+ render_addr_mask: storage
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 102
+ name: storage
+ vlan_start: 102
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.253
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: ip_ranges
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: management
+ vlan_start: null
+ - cidr: 192.168.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.1
+ - 192.168.2.254
+ meta:
+ cidr: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: null
+ render_type: cidr
+ seg_type: tun
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 103
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ cidr: 172.16.0.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.16.0.2
+ - 172.16.0.126
+ map_priority: 1
+ name: public
+ notation: ip_ranges
+ render_addr_mask: public
+ render_type: null
+ use_gateway: true
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 10.20.0.0/24
+ gateway: 10.20.0.2
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.0.254
+ meta:
+ configurable: false
+ map_priority: 0
+ notation: ip_ranges
+ render_addr_mask: null
+ render_type: null
+ unmovable: true
+ use_gateway: true
+ name: fuelweb_admin
+ vlan_start: null
+settings:
+ editable:
+ external_dns:
+ dns_list:
+ description: List of upstream DNS servers
+ label: DNS list
+ max: 3
+ regex:
+ error: Invalid IP address
+ source: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
+ type: text_list
+ value:
+ - 147.214.6.234
+ weight: 10
+ metadata:
+ group: network
+ label: Host OS DNS Servers
+ weight: 30
+ external_ntp:
+ metadata:
+ group: network
+ label: Host OS NTP Servers
+ weight: 40
+ ntp_list:
+ description: List of upstream NTP servers
+ label: NTP server list
+ regex:
+ error: Invalid NTP server
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text_list
+ value:
+ - time1.ericsson.se
+ - time2.ericsson.se
+ weight: 10
+ syslog:
+ metadata:
+ enabled: false
+ group: logging
+ label: Syslog
+ toggleable: true
+ weight: 50
+ syslog_port:
+ description: Remote syslog port
+ label: Port
+ regex:
+ error: Invalid syslog port
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '514'
+ weight: 20
+ syslog_server:
+ description: Remote syslog hostname
+ label: Hostname
+ regex:
+ error: Invalid hostname
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text
+ value: ''
+ weight: 10
+ syslog_transport:
+ label: Syslog transport protocol
+ type: radio
+ value: tcp
+ values:
+ - data: udp
+ description: ''
+ label: UDP
+ - data: tcp
+ description: ''
+ label: TCP
+ weight: 30
+
diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml
new file mode 100644
index 000000000..c2352f924
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml
@@ -0,0 +1,110 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+dha-pod-config-metadata:
+ title: Deployment Hardware Adapter (DHA) for fuel development pipeline - Ericsson ELX version
+ version: 0.0.3
+ created: Feb 2 2016
+ comment: ELX Fuel 9 version
+
+# Adapter to use for this definition
+adapter: libvirt
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+- id: 2
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 3
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 4
+ libvirtName: compute3
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 5
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+virtNetConfDir: templates/virtual_environment/networks
+
+disks:
+ fuel: 100G
+ controller: 100G
+ compute: 100G
+
+# Here the infrastructure VMs can be defined.
+# The entries are not mandatory! If it is left empty
+# the default defined in deploy/templates will
+# be used.
+define_vms:
+ fuel:
+ vcpu:
+ value: 2
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 8388608
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 8388608
+ devices:
+ interface:
+ # With attribute_equlas someone can define which
+ # interface type is meant
+ attribute_equlas:
+ type: network
+ # This will overwrite the type of the model of
+ # the interface
+ model:
+ attribute:
+ type: virtio
+ controller:
+ vcpu:
+ value: 4
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 10485760
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 10485760
+ devices:
+ interface:
+ attribute_equlas:
+ type: network
+ model:
+ attribute:
+ type: e1000
+ compute:
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 6291456
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 6291456
+ devices:
+ interface:
+ attribute_equlas:
+ type: network
+ model:
+ attribute:
+ type: e1000
+
diff --git a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml
new file mode 100644
index 000000000..92cc0e616
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml
@@ -0,0 +1,253 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+dea-pod-override-config-metadata:
+ title: 'Deployment Environment Adapter POD override for Development Pipeline - Huawei-China version'
+ version: '0.3'
+ created: 'Jun 14 2016'
+ comment: 'Rebased for Fuel 9'
+environment:
+ name: opnfv_virt
+interfaces_1:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+interfaces_dpdk:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ - interface_properties:
+ dpdk:
+ enabled: true
+ ens6:
+ - public
+interfaces_vlan:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.20.0.254
+ dhcp_pool_start: 10.20.0.3
+ ipaddress: 10.20.0.2
+ netmask: 255.255.255.0
+ ssh_network: 10.20.0.0/24
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 114.114.114.114
+ HOSTNAME: fuel
+ NTP1: 0.fuel.pool.ntp.org
+ NTP2: 1.fuel.pool.ntp.org
+ NTP3: 2.fuel.pool.ntp.org
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ configuration_template: null
+ dns_nameservers:
+ - 114.114.114.114
+ floating_name: admin_floating_net
+ floating_ranges:
+ - - 172.16.0.130
+ - 172.16.0.254
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ internal_name: admin_internal_net
+ net_l23_provider: ovs
+ segmentation_type: tun
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.1.0/24
+ configurable: true
+ map_priority: 2
+ name: storage
+ notation: cidr
+ render_addr_mask: storage
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 102
+ name: storage
+ vlan_start: 102
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.253
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: ip_ranges
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: management
+ vlan_start: null
+ - cidr: 192.168.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.1
+ - 192.168.2.254
+ meta:
+ cidr: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: null
+ render_type: cidr
+ seg_type: tun
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 103
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ cidr: 172.16.0.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.16.0.2
+ - 172.16.0.126
+ map_priority: 1
+ name: public
+ notation: ip_ranges
+ render_addr_mask: public
+ render_type: null
+ use_gateway: true
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 10.20.0.0/24
+ gateway: 10.20.0.2
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.0.254
+ meta:
+ configurable: false
+ map_priority: 0
+ notation: ip_ranges
+ render_addr_mask: null
+ render_type: null
+ unmovable: true
+ use_gateway: true
+ name: fuelweb_admin
+ vlan_start: null
+settings:
+ editable:
+ external_dns:
+ dns_list:
+ description: List of upstream DNS servers
+ label: DNS list
+ max: 3
+ regex:
+ error: Invalid IP address
+ source: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
+ type: text_list
+ value:
+ - 114.114.114.114
+ weight: 10
+ metadata:
+ group: network
+ label: Host OS DNS Servers
+ weight: 30
+ external_ntp:
+ metadata:
+ group: network
+ label: Host OS NTP Servers
+ weight: 40
+ ntp_list:
+ description: List of upstream NTP servers
+ label: NTP server list
+ regex:
+ error: Invalid NTP server
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text_list
+ value:
+ - 0.fuel.pool.ntp.org
+ - 1.fuel.pool.ntp.org
+ - 2.fuel.pool.ntp.org
+ weight: 10
+ syslog:
+ metadata:
+ enabled: false
+ group: logging
+ label: Syslog
+ toggleable: true
+ weight: 50
+ syslog_port:
+ description: Remote syslog port
+ label: Port
+ regex:
+ error: Invalid syslog port
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '514'
+ weight: 20
+ syslog_server:
+ description: Remote syslog hostname
+ label: Hostname
+ regex:
+ error: Invalid hostname
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text
+ value: ''
+ weight: 10
+ syslog_transport:
+ label: Syslog transport protocol
+ type: radio
+ value: tcp
+ values:
+ - data: udp
+ description: ''
+ label: UDP
+ - data: tcp
+ description: ''
+ label: TCP
+ weight: 30
+
diff --git a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml
new file mode 100644
index 000000000..d8f904362
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+dha-pod-config-metadata:
+ title: Deployment Hardware Adapter (DHA) for fuel development pipeline - default version
+ version: 0.0.4
+ created: Jun 14 2016
+ comment: Huawei-Ch Fuel9 version
+
+# Adapter to use for this definition
+adapter: libvirt
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+- id: 2
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 3
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 4
+ libvirtName: compute3
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 5
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+virtNetConfDir: templates/virtual_environment/networks
+
+disks:
+ fuel: 100G
+ controller: 100G
+ compute: 100G
diff --git a/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml
new file mode 100644
index 000000000..ed7c63fac
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml
@@ -0,0 +1,251 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+dea-pod-override-config-metadata:
+ title: 'Deployment Environment Adapter POD override for Development Pipeline - Intel Santa Clara, CA, USA version'
+ version: '0.1'
+ created: 'Wed Sept 7 2016'
+ comment: 'For Fuel 9'
+environment:
+ name: opnfv_virt
+interfaces_1:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+interfaces_dpdk:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ - interface_properties:
+ dpdk:
+ enabled: true
+ ens6:
+ - public
+interfaces_vlan:
+ ens3:
+ - fuelweb_admin
+ - storage
+ ens4:
+ - management
+ ens5:
+ - private
+ ens6:
+ - public
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.20.0.254
+ dhcp_pool_start: 10.20.0.3
+ ipaddress: 10.20.0.2
+ netmask: 255.255.255.0
+ ssh_network: 10.20.0.0/24
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 10.248.2.1
+ HOSTNAME: fuel
+ NTP1: 10.20.0.1
+ NTP2: null
+ NTP3: null
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ configuration_template: null
+ dns_nameservers:
+ - 10.248.2.1
+ floating_name: admin_floating_net
+ floating_ranges:
+ - - 172.16.0.130
+ - 172.16.0.254
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ internal_name: admin_internal_net
+ net_l23_provider: ovs
+ segmentation_type: tun
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.1.0/24
+ configurable: true
+ map_priority: 2
+ name: storage
+ notation: cidr
+ render_addr_mask: storage
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 102
+ name: storage
+ vlan_start: 102
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.253
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: ip_ranges
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: management
+ vlan_start: null
+ - cidr: 192.168.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.1
+ - 192.168.2.254
+ meta:
+ cidr: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: null
+ render_type: cidr
+ seg_type: tun
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 103
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ cidr: 172.16.0.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.16.0.2
+ - 172.16.0.126
+ map_priority: 1
+ name: public
+ notation: ip_ranges
+ render_addr_mask: public
+ render_type: null
+ use_gateway: true
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 10.20.0.0/24
+ gateway: 10.20.0.2
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.0.254
+ meta:
+ configurable: false
+ map_priority: 0
+ notation: ip_ranges
+ render_addr_mask: null
+ render_type: null
+ unmovable: true
+ use_gateway: true
+ name: fuelweb_admin
+ vlan_start: null
+settings:
+ editable:
+ external_dns:
+ dns_list:
+ description: List of upstream DNS servers
+ label: DNS list
+ max: 3
+ regex:
+ error: Invalid IP address
+ source: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
+ type: text_list
+ value:
+ - 147.214.6.234
+ weight: 10
+ metadata:
+ group: network
+ label: Host OS DNS Servers
+ weight: 30
+ external_ntp:
+ metadata:
+ group: network
+ label: Host OS NTP Servers
+ weight: 40
+ ntp_list:
+ description: List of upstream NTP servers
+ label: NTP server list
+ regex:
+ error: Invalid NTP server
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text_list
+ value:
+ - 10.20.0.1
+ weight: 10
+ syslog:
+ metadata:
+ enabled: false
+ group: logging
+ label: Syslog
+ toggleable: true
+ weight: 50
+ syslog_port:
+ description: Remote syslog port
+ label: Port
+ regex:
+ error: Invalid syslog port
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '514'
+ weight: 20
+ syslog_server:
+ description: Remote syslog hostname
+ label: Hostname
+ regex:
+ error: Invalid hostname
+ source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$
+ type: text
+ value: ''
+ weight: 10
+ syslog_transport:
+ label: Syslog transport protocol
+ type: radio
+ value: tcp
+ values:
+ - data: udp
+ description: ''
+ label: UDP
+ - data: tcp
+ description: ''
+ label: TCP
+ weight: 30
+
diff --git a/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml
new file mode 100644
index 000000000..837293950
--- /dev/null
+++ b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml
@@ -0,0 +1,110 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+dha-pod-config-metadata:
+ title: Deployment Hardware Adapter (DHA) for fuel development pipeline - Intel Santa Clara, CA. USA version
+ version: 0.0.1
+ created: Sept 7 2016
+ comment: Intel Santa Clara, CA, USA Fuel 9 version
+
+# Adapter to use for this definition
+adapter: libvirt
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+- id: 2
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 3
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 4
+ libvirtName: compute3
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+- id: 5
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+virtNetConfDir: templates/virtual_environment/networks
+
+disks:
+ fuel: 100G
+ controller: 100G
+ compute: 100G
+
+# Here the infrastructure VMs can be defined.
+# The entries are not mandatory! If it is left empty
+# the default defined in deploy/templates will
+# be used.
+define_vms:
+ fuel:
+ vcpu:
+ value: 2
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 8388608
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 8388608
+ devices:
+ interface:
+ # With attribute_equlas someone can define which
+ # interface type is meant
+ attribute_equlas:
+ type: network
+ # This will overwrite the type of the model of
+ # the interface
+ model:
+ attribute:
+ type: virtio
+ controller:
+ vcpu:
+ value: 4
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 10485760
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 10485760
+ devices:
+ interface:
+ attribute_equlas:
+ type: network
+ model:
+ attribute:
+ type: e1000
+ compute:
+ memory:
+ attribute_equlas:
+ unit: KiB
+ value: 6291456
+ currentMemory:
+ attribute_equlas:
+ unit: KiB
+ value: 6291456
+ devices:
+ interface:
+ attribute_equlas:
+ type: network
+ model:
+ attribute:
+ type: e1000
+
diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml
new file mode 100644
index 000000000..94f17c126
--- /dev/null
+++ b/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml
@@ -0,0 +1,22 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: BGPVPN fuel Plugin configuration template
+ version: 0.1
+ created: Wed Jan 13 2016
+ comment: None
+
+bgpvpn:
+ metadata:
+ enabled: true
+ restrictions:
+ - "cluster:net_provider != 'neutron'": "Only neutron is supported by BGPVPN-plugin"
+ label: "BGPVPN plugin"
+ weight: 90
diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml
new file mode 100644
index 000000000..f7ab89b37
--- /dev/null
+++ b/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml
@@ -0,0 +1,31 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+plugin-config-metadata:
+ title: BGPVPN fuel Plugin configuration template
+ version: 0.2
+ created: Fri Feb 05 2016
+ comment: None
+
+bgpvpn:
+ metadata:
+ class: plugin
+ default: false
+ enabled: false
+ label: BGPVPN plugin
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ enabled: true
+ label: BGPVPN plugin
+ plugin_version: 0.8.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by BGPVPN-plugin
+ weight: 90
+ weight: 70
diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml
new file mode 100644
index 000000000..aeea9e450
--- /dev/null
+++ b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml
@@ -0,0 +1,30 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+plugin-config-metadata:
+ title: BGPVPN fuel Plugin configuration template
+ version: 0.3
+ created: 08-Mar-16
+ comment: None
+
+bgpvpn:
+ metadata:
+ class: plugin
+ default: false
+ enabled: true
+ label: BGPVPN plugin
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ label: BGPVPN plugin
+ plugin_version: 0.8.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by BGPVPN-plugin
+ weight: 90
+ weight: 70
diff --git a/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml b/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml
new file mode 100644
index 000000000..1aa1259ca
--- /dev/null
+++ b/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml
@@ -0,0 +1,30 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+plugin-config-metadata:
+ title: BGPVPN fuel Plugin configuration template
+ version: 0.9.0
+ created: 29.06.2016
+ comment: None
+
+bgpvpn:
+ metadata:
+ class: plugin
+ default: false
+ enabled: true
+ label: BGPVPN plugin
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ label: BGPVPN plugin
+ plugin_version: 0.9.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by BGPVPN-plugin
+ weight: 90
+ weight: 70
diff --git a/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml b/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml
new file mode 100644
index 000000000..170424edb
--- /dev/null
+++ b/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml
@@ -0,0 +1,27 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NFV QEMU-KVM fuel Plugin configuration template
+ version: 0.1
+ created: Wed Jan 6 2016
+ comment: None
+
+fuel-plugin-qemu:
+ metadata:
+ enabled: true
+ label: fuel-plugin-qemu
+ # plugin_id: Assigned during installation
+ toggleable: true
+ weight: 70
+ use_kvm:
+ label: 'EXPERIMENTAL: KVM enhancements for NFV'
+ type: checkbox
+ value: true
+ weight: 20
diff --git a/deploy/config/plugins/fuel-nfvkvm_0.0.2.yaml b/deploy/config/plugins/fuel-nfvkvm_0.0.2.yaml
new file mode 100644
index 000000000..842e1e10d
--- /dev/null
+++ b/deploy/config/plugins/fuel-nfvkvm_0.0.2.yaml
@@ -0,0 +1,34 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NFV QEMU-KVM fuel Plugin configuration template
+ version: 0.2
+ created: Tue Feb 9 2016
+ comment: None
+
+fuel-plugin-qemu:
+ metadata:
+ #chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: fuel-plugin-qemu
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ #plugin_id: 1 Assigned during installation
+ plugin_version: 0.5.2
+ use_kvm:
+ label: 'EXPERIMENTAL: KVM enhancements for NFV'
+ type: checkbox
+ value: true
+ weight: 20
+ weight: 70
diff --git a/deploy/config/plugins/fuel-nfvkvm_0.9.0.yaml b/deploy/config/plugins/fuel-nfvkvm_0.9.0.yaml
new file mode 100644
index 000000000..85f3221f7
--- /dev/null
+++ b/deploy/config/plugins/fuel-nfvkvm_0.9.0.yaml
@@ -0,0 +1,34 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NFV KVM fuel Plugin configuration template
+ version: 0.9.0
+ created: 27.07.2016
+ comment: None
+
+fuel-plugin-kvm:
+ metadata:
+ #chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: fuel-plugin-kvm
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ #plugin_id: 1 Assigned during installation
+ plugin_version: 0.9.0
+ use_kvm:
+ label: 'EXPERIMENTAL: KVM enhancements for NFV'
+ type: checkbox
+ value: true
+ weight: 20
+ weight: 70
diff --git a/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml b/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml
new file mode 100644
index 000000000..fdaba2a21
--- /dev/null
+++ b/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml
@@ -0,0 +1,28 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NFV OVS fuel Plugin configuration template
+ version: 0.1
+ created: Wed Jan 6 2016
+ comment: None
+
+fuel-plugin-ovsnfv:
+ fuel-plugin-ovsnfv_text:
+ description: Description for text field
+ label: Text field
+ type: text
+ value: Set default value
+ weight: 25
+ metadata:
+ enabled: true
+ label: Userspace OVS support
+ # plugin_id: Assigned during installation
+ toggleable: true
+ weight: 70
diff --git a/deploy/config/plugins/fuel-nfvovs_0.0.2.yaml b/deploy/config/plugins/fuel-nfvovs_0.0.2.yaml
new file mode 100644
index 000000000..902938211
--- /dev/null
+++ b/deploy/config/plugins/fuel-nfvovs_0.0.2.yaml
@@ -0,0 +1,35 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NFV OVS fuel Plugin configuration template
+ version: 0.2
+ created: Mon Feb 15 2016
+ comment: Rebased for new plugin arch
+
+fuel-plugin-ovsnfv:
+ metadata:
+ #chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: Userspace OVS support
+ toggleable: true
+ versions:
+ - fuel-plugin-ovsnfv_text:
+ description: Specify compute node interface to which OVS-DPDK binds
+ label: NIC for DPDK
+ type: text
+ value: ens1f1
+ weight: 25
+ metadata:
+ always_editable: false
+ #plugin_id: Assigned during installation
+ plugin_version: 0.0.1
+ weight: 70
diff --git a/deploy/config/plugins/fuel-nshovs_0.0.1.yaml b/deploy/config/plugins/fuel-nshovs_0.0.1.yaml
new file mode 100644
index 000000000..ec3ac38a9
--- /dev/null
+++ b/deploy/config/plugins/fuel-nshovs_0.0.1.yaml
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NSHOVS fuel Plugin configuration template
+ version: 0.1
+ created: Wed Feb 17 2016
+ comment: None
+
+fuel-plugin-ovs:
+ metadata:
+ #chosen_id: Choosen at install time
+ class: plugin
+ default: false
+ enabled: true
+ label: Openvswitch with NSH support
+ toggleable: true
+ versions:
+ - dpdk-bind-nic:
+ label: Network device
+ type: text
+ value: eth2
+ weight: 40
+ metadata:
+ always_editable: false
+ #plugin_id: Choosen at install time
+ plugin_version: 0.5.2
+ use_dpdk:
+ label: Use dpdk
+ type: checkbox
+ value: false
+ weight: 20
+ use_dppd:
+ label: Use dppd
+ type: checkbox
+ value: false
+ weight: 20
+ weight: 70
diff --git a/deploy/config/plugins/fuel-nshovs_0.9.0.yaml b/deploy/config/plugins/fuel-nshovs_0.9.0.yaml
new file mode 100644
index 000000000..b5caae039
--- /dev/null
+++ b/deploy/config/plugins/fuel-nshovs_0.9.0.yaml
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: NSHOVS fuel Plugin configuration template
+ version: 0.2
+ created: Jun 30 2016
+ comment: None
+
+fuel-plugin-ovs:
+ metadata:
+ #chosen_id: Choosen at install time
+ class: plugin
+ default: false
+ enabled: true
+ label: Openvswitch with NSH support
+ toggleable: true
+ versions:
+ - install_dpdk:
+ type: "checkbox"
+ weight: 20
+ value: false
+ label: "Install DPDK"
+ install_nsh:
+ type: "checkbox"
+ weight: 20
+ value: false
+ label: "Install NSH"
+ metadata:
+ plugin_version: 0.9.0
+ weight: 70
diff --git a/deploy/config/plugins/fuel-odl_0.0.1.yaml b/deploy/config/plugins/fuel-odl_0.0.1.yaml
new file mode 100644
index 000000000..53c510557
--- /dev/null
+++ b/deploy/config/plugins/fuel-odl_0.0.1.yaml
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: OpenDaylight fuel Plugin configuration template
+ version: 0.1
+ created: Mon Dec 28 2015
+ comment: None
+
+opendaylight:
+ metadata:
+ # chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: OpenDaylight plugin
+ toggleable: true
+ versions:
+ - enable_gbp:
+ label: GBP features
+ type: checkbox
+ value: false
+ weight: 14
+ enable_l3_odl:
+ label: Use ODL to manage L3 traffic
+ restrictions:
+ - networking_parameters:segmentation_type == 'vlan': Use tunneling segmentation
+ type.
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ type: checkbox
+ value: true
+ weight: 12
+ enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: false
+ weight: 13
+ metadata:
+ always_editable: false
+ odl_features:
+ default:
+ - config
+ - standard
+ - region
+ - package
+ - kar
+ - ssh
+ - management
+ gbp:
+ - odl-groupbasedpolicy-base
+ - odl-groupbasedpolicy-ofoverlay
+ ovs:
+ - odl-ovsdb-openstack
+ - odl-restconf-all
+ - odl-aaa-authn
+ - odl-dlux-all
+ sfc:
+ - odl-sfc-core
+ - odl-sfc-sb-rest
+ - odl-sfc-ui
+ - odl-sfc-netconf
+ - odl-sfc-ovs
+ - odl-sfcofl2
+ - odl-sfc-test-consumer
+ vpn:
+ - odl-vpnservice-api
+ - odl-vpnservice-impl
+ - odl-vpnservice-impl-rest
+ - odl-vpnservice-impl-ui
+ - odl-vpnservice-core
+ # plugin_id: Assigned during installation
+ plugin_version: 0.8.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ rest_api_port:
+ description: Port on which ODL REST API will be available.
+ label: Port number
+ regex:
+ error: Invalid port number
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '8282'
+ weight: 40
+ weight: 70
diff --git a/deploy/config/plugins/fuel-odl_0.0.2.yaml b/deploy/config/plugins/fuel-odl_0.0.2.yaml
new file mode 100644
index 000000000..bd2ef5bb2
--- /dev/null
+++ b/deploy/config/plugins/fuel-odl_0.0.2.yaml
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: OpenDaylight fuel Plugin configuration template
+ version: 0.2
+ created: Tue Jan 26 2016
+ comment: Rebased to Fuel8 and BE ODL plugin
+opendaylight:
+ metadata:
+ # chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: OpenDaylight plugin
+ toggleable: true
+ versions:
+ - enable_gbp:
+ label: GBP features
+ type: checkbox
+ value: false
+ weight: 14
+ enable_l3_odl:
+ label: Use ODL to manage L3 traffic
+ restrictions:
+ - networking_parameters:segmentation_type == 'vlan': Use tunneling segmentation
+ type.
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ type: checkbox
+ value: false
+ weight: 12
+ enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: false
+ weight: 13
+ metadata:
+ always_editable: false
+ odl_features:
+ default:
+ - config
+ - standard
+ - region
+ - package
+ - kar
+ - ssh
+ - management
+ gbp:
+ - odl-groupbasedpolicy-base
+ - odl-groupbasedpolicy-ofoverlay
+ ovs:
+ - odl-ovsdb-openstack
+ - odl-restconf-all
+ - odl-aaa-authn
+ - odl-dlux-all
+ sfc:
+ - odl-sfc-core
+ - odl-sfc-sb-rest
+ - odl-sfc-ui
+ - odl-sfc-netconf
+ - odl-sfc-ovs
+ - odl-sfcofl2
+ - odl-sfc-test-consumer
+ vpn:
+ - odl-vpnservice-api
+ - odl-vpnservice-impl
+ - odl-vpnservice-impl-rest
+ - odl-vpnservice-impl-ui
+ - odl-vpnservice-core
+ - odl-vpnservice-openstack
+ # plugin_id: Assigned during installation
+ plugin_version: 0.8.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ rest_api_port:
+ description: Port on which ODL REST API will be available.
+ label: Port number
+ regex:
+ error: Invalid port number
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '8282'
+ weight: 40
+ weight: 70
diff --git a/deploy/config/plugins/fuel-odl_0.0.3.yaml b/deploy/config/plugins/fuel-odl_0.0.3.yaml
new file mode 100644
index 000000000..5c0078dbf
--- /dev/null
+++ b/deploy/config/plugins/fuel-odl_0.0.3.yaml
@@ -0,0 +1,117 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: OpenDaylight fuel Plugin configuration template
+ version: 0.3
+ created: 04.03.2016
+ comment: Added bgpvpn feature
+opendaylight:
+ metadata:
+ # chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: OpenDaylight plugin
+ toggleable: true
+ versions:
+ - enable_gbp:
+ label: GBP features
+ type: checkbox
+ value: false
+ weight: 14
+ enable_l3_odl:
+ label: Use ODL to manage L3 traffic
+ restrictions:
+ - networking_parameters:segmentation_type == 'vlan': Use tunneling segmentation
+ type.
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ type: checkbox
+ value: false
+ weight: 12
+ enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: false
+ weight: 13
+ enable_bgpvpn:
+ weight: 13
+ type: "checkbox"
+ value: false
+ label: "BGPVPN extensions"
+ description:
+ >
+ This enables the bgpvpn extension of neutron togethere with the
+ corresponding sdnvpn features in odl. This feature will disable
+ the standart ovsdb feature from ODL.
+ restrictions:
+ - condition: "settings:bgpvpn == null or settings:bgpvpn.metadata.enabled == false"
+ strict: false
+ message: "BGPVPN (fuel-plugin-bgpvpn) plugin must be installed and enabled."
+ - networking_parameters:segmentation_type == 'vlan': This feature works only with segmentation_type != vlan
+ - condition: "settings:fuel-plugin-ovs == null or settings:fuel-plugin-ovs.metadata.enabled == false"
+ strict: false
+ message: "Openvswitch with NSH support (fuel-plugin-ovs) must be installed and enabled."
+ bgpvpn_gateway:
+ weight: 13
+ type: "text"
+ value: "0.0.0.0"
+ description: "Define the default gateway for BGPVPN"
+ label: "Default Gateway"
+ restrictions:
+ - settings:opendaylight.enable_bgpvpn.value == false: Only needed if BGPVPN is enabled.
+ regex:
+ source: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
+ error: 'Invalid ip number'
+ metadata:
+ always_editable: false
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ odl_features:
+ default:
+ - config
+ - standard
+ - region
+ - package
+ - kar
+ - ssh
+ - management
+ odl-default:
+ - odl-restconf-all
+ - odl-aaa-authn
+ - odl-dlux-all
+ gbp:
+ - odl-groupbasedpolicy-neutronmapper
+ - odl-groupbasedpolicy-ofoverlay
+ ovs:
+ - odl-ovsdb-openstack
+ sfc:
+ - odl-sfc-model
+ - odl-sfc-provider
+ - odl-sfc-provider-rest
+ - odl-sfc-sb-rest
+ - odl-sfc-ui
+ - odl-sfc-netconf
+ - odl-sfc-ovs
+ - odl-sfcofl2
+ vpn:
+ - odl-vpnservice-openstack
+ # plugin_id: Assigned during installation
+ plugin_version: 0.8.1
+ rest_api_port:
+ value: '8282'
+ label: 'Port number'
+ description: 'Port on which ODL REST API will be available.'
+ weight: 40
+ type: "text"
+ regex:
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ error: 'Invalid port number'
+ weight: 70
diff --git a/deploy/config/plugins/fuel-odl_0.9.0.yaml b/deploy/config/plugins/fuel-odl_0.9.0.yaml
new file mode 100644
index 000000000..6caf4834f
--- /dev/null
+++ b/deploy/config/plugins/fuel-odl_0.9.0.yaml
@@ -0,0 +1,143 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: OpenDaylight fuel Plugin configuration template
+ version: 0.4
+ created: 30.06.2016
+ comment: Add new field for boron version
+opendaylight:
+ metadata:
+ #chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: OpenDaylight plugin
+ toggleable: true
+ versions:
+ - bgpvpn_gateway:
+ description: Define the default gateway for BGPVPN
+ label: Default Gateway
+ regex:
+ error: Invalid ip number
+ source: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
+ restrictions:
+ - settings:opendaylight.enable_bgpvpn.value == false: Only needed if BGPVPN
+ is enabled.
+ type: text
+ value: 0.0.0.0
+ weight: 50
+ enable_bgpvpn:
+ description: 'This enables the bgpvpn extension of neutron togethere with
+ the corresponding sdnvpn features in odl. This feature will disable the
+ standart ovsdb feature from ODL.
+
+ '
+ label: BGPVPN extensions
+ restrictions:
+ - condition: settings:bgpvpn == null or settings:bgpvpn.metadata.enabled
+ == false
+ message: BGPVPN (fuel-plugin-bgpvpn) plugin must be installed and enabled.
+ strict: false
+ - networking_parameters:segmentation_type == 'vlan': This feature works
+ only with segmentation_type != vlan
+ type: checkbox
+ value: false
+ weight: 40
+ enable_l3_odl:
+ label: Use ODL to manage L3 traffic
+ restrictions:
+ - networking_parameters:segmentation_type == 'vlan': Use tunneling segmentation
+ type.
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: false
+ weight: 20
+ sfc_class:
+ description: 'Classifier determines what traffic needs to be chained based
+ on policy based on yang model. The OpenDayLight actually supports the
+ OVSDB NetVirt and the GBP classifier in case of SFC.
+
+ '
+ label: Classifier used by SFC
+ restrictions:
+ - action: hide
+ condition: settings:opendaylight.enable_sfc.value == false
+ type: select
+ value: ncr
+ values:
+ - data: ncr
+ label: NetVirt
+ - data: gcr
+ label: GBP
+ weight: 21
+ metadata:
+ default_credentials:
+ password: admin
+ user: admin
+ hot_pluggable: false
+ jetty_port: 8181
+ odl_features:
+ default:
+ - config
+ - standard
+ - region
+ - package
+ - kar
+ - ssh
+ - management
+ gcr:
+ - odl-groupbasedpolicy-ovssfc
+ ncr:
+ - odl-ovsdb-sfc
+ - odl-ovsdb-sfc-rest
+ odl-default:
+ - odl-restconf-all
+ - odl-aaa-authn
+ - odl-dlux-all
+ ovs:
+ - odl-ovsdb-openstack
+ sfc:
+ - odl-sfc-model
+ - odl-sfc-provider
+ - odl-sfc-provider-rest
+ - odl-sfc-ovs
+ - odl-sfc-openflow-renderer
+ vpn:
+ - odl-vpnservice-openstack
+ odl_deb: opendaylight
+ experimental_odl_deb: opendaylight-boron
+ use_experimental_odl:
+ - enable_sfc
+ #plugin_id: Assigned during installation
+ plugin_version: 0.9.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ odl_v2:
+ description: V2 version is considered as experimental
+ label: Use V2 ML2 driver
+ type: checkbox
+ value: true
+ weight: 60
+ rest_api_port:
+ description: Port on which ODL REST API will be available.
+ label: Port number
+ regex:
+ error: Invalid port number
+ source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ type: text
+ value: '8282'
+ weight: 70
+ weight: 70
diff --git a/deploy/config/plugins/fuel-onos_0.0.1.yaml b/deploy/config/plugins/fuel-onos_0.0.1.yaml
new file mode 100644
index 000000000..54ecdc0dc
--- /dev/null
+++ b/deploy/config/plugins/fuel-onos_0.0.1.yaml
@@ -0,0 +1,33 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: ONOS fuel Plugin configuration template
+ version: 0.1
+ created: Wed Jan 7 2016
+ comment: None
+
+onos:
+ metadata:
+ enabled: true
+ label: onos plugin
+ # plugin_id: Assigned during installation
+ restrictions:
+ - cluster:net_provider != 'neutron': Neutron only
+ toggleable: true
+ weight: 70
+ public_eth:
+ description: Please note that onos needs an independent eth for public
+ network when interfaces of nodes are configured, or L3 traffic to
+ internet will fail!
+ Defualt is eth3.
+ label: Public Ethernet Port
+ type: text
+ value: eth3
+ weight: 20
diff --git a/deploy/config/plugins/fuel-onos_0.0.2.yaml b/deploy/config/plugins/fuel-onos_0.0.2.yaml
new file mode 100644
index 000000000..1d0b54d04
--- /dev/null
+++ b/deploy/config/plugins/fuel-onos_0.0.2.yaml
@@ -0,0 +1,33 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: ONOS fuel Plugin configuration template
+ version: 0.2
+ created: Fre Jan 29 2016
+ comment: None
+
+onos:
+ metadata:
+ # chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: onos plugin
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ # plugin_id: Assigned during installation
+ plugin_version: 0.8.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Neutron only
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ weight: 70
diff --git a/deploy/config/plugins/fuel-onos_0.0.3.yaml b/deploy/config/plugins/fuel-onos_0.0.3.yaml
new file mode 100644
index 000000000..16f753144
--- /dev/null
+++ b/deploy/config/plugins/fuel-onos_0.0.3.yaml
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+plugin-config-metadata:
+ title: ONOS fuel Plugin configuration template
+ version: 0.3
+ created: Wed Jun 8 2016
+ comment: add sfc feature
+
+onos:
+ metadata:
+ # chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: onos plugin
+ toggleable: true
+ versions:
+ - enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: true
+ weight: 13
+ metadata:
+ hot_pluggable: false
+ # plugin_id: Assigned during installation
+ plugin_version: 0.9.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Neutron only
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ weight: 70
diff --git a/deploy/dea.py b/deploy/dea.py
new file mode 100644
index 000000000..1ac048e06
--- /dev/null
+++ b/deploy/dea.py
@@ -0,0 +1,105 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+import netaddr
+
+
+class DeploymentEnvironmentAdapter(object):
+
+ def __init__(self, yaml_path):
+ self.dea_struct = None
+ self.parse_yaml(yaml_path)
+ self.network_names = []
+ self.collect_network_names()
+
+ def modify_ip(self, ip_addr, index, val):
+ ip_str = str(netaddr.IPAddress(ip_addr))
+ decimal_list = map(int, ip_str.split('.'))
+ decimal_list[index] = val
+ return '.'.join(map(str, decimal_list))
+
+ def parse_yaml(self, yaml_path):
+ with io.open(yaml_path) as yaml_file:
+ self.dea_struct = yaml.load(yaml_file)
+
+ def get_env_name(self):
+ return self.get_property('environment')['name']
+
+ def get_env_net_segment_type(self):
+ return self.get_property('environment')['net_segment_type']
+
+ def get_fuel_config(self):
+ return self.dea_struct['fuel']
+
+ def get_fuel_ip(self):
+ fuel_conf = self.get_fuel_config()
+ return fuel_conf['ADMIN_NETWORK']['ipaddress']
+
+ def get_fuel_netmask(self):
+ fuel_conf = self.get_fuel_config()
+ return fuel_conf['ADMIN_NETWORK']['netmask']
+
+ def get_fuel_gateway(self):
+ ip = self.get_fuel_ip()
+ return self.modify_ip(ip, 3, 1)
+
+ def get_fuel_hostname(self):
+ fuel_conf = self.get_fuel_config()
+ return fuel_conf['HOSTNAME']
+
+ def get_fuel_dns(self):
+ fuel_conf = self.get_fuel_config()
+ return fuel_conf['DNS_UPSTREAM']
+
+ def get_node_property(self, node_id, property_name):
+ for node in self.dea_struct['nodes']:
+ if node['id'] == node_id and property_name in node:
+ return node[property_name]
+
+ def get_node_roles(self, node_id):
+ return self.get_node_property(node_id, 'role')
+
+ def get_node_main_role(self, node_id, fuel_node_id):
+ if node_id == fuel_node_id:
+ return 'fuel'
+ roles = self.get_node_roles(node_id)
+ return 'controller' if 'controller' in roles else 'compute'
+
+ def get_node_ids(self):
+ node_ids = []
+ for node in self.dea_struct['nodes']:
+ node_ids.append(node['id'])
+ return node_ids
+
+ def get_property(self, property_name):
+ return self.dea_struct[property_name]
+
+ def collect_network_names(self):
+ self.network_names = []
+ for network in self.dea_struct['network']['networks']:
+ self.network_names.append(network['name'])
+
+ def get_network_names(self):
+ return self.network_names
+
+ def get_dns_list(self):
+ settings = self.get_property('settings')
+ dns_list = settings['editable']['external_dns']['dns_list']['value']
+ return [d.strip() for d in dns_list.split(',')]
+
+ def get_ntp_list(self):
+ settings = self.get_property('settings')
+ ntp_list = settings['editable']['external_ntp']['ntp_list']['value']
+ return [n.strip() for n in ntp_list.split(',')]
+
+ def get_blade_node_map(self):
+ return self.dea_struct['blade_node_map']
diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
new file mode 100644
index 000000000..2a09aa351
--- /dev/null
+++ b/deploy/deploy-config.py
@@ -0,0 +1,467 @@
+#!/usr/bin/python
+###############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+###############################################################################
+# Description
+# This script constructs the final deployment dea.yaml and dha.yaml files
+# The dea.yaml get's constructed from (in reverse priority):
+# 1) dea-base
+# 2) dea-pod-override
+# 3) deployment-scenario dea-override-config section
+#
+# The dha.yaml get's constructed from (in reverse priority):
+# 1) pod dha
+# 2) deployment-scenario dha-override-config section
+###############################################################################
+
+
+import os
+import yaml
+import sys
+import urllib2
+import calendar
+import time
+import collections
+import hashlib
+
+from functools import reduce
+from operator import or_
+from common import (
+ log,
+ exec_cmd,
+ err,
+ warn,
+ check_file_exists,
+ create_dir_if_not_exists,
+ delete,
+ check_if_root,
+ ArgParser,
+)
+
+
+def parse_arguments():
+ parser = ArgParser(prog='python %s' % __file__)
+ parser.add_argument('-dha', dest='dha_uri', action='store',
+ default=False,
+ help='dha configuration file FQDN URI',
+ required=True)
+ parser.add_argument('-deab', dest='dea_base_uri', action='store',
+ default=False,
+ help='dea base configuration FQDN URI',
+ required=True)
+ parser.add_argument('-deao', dest='dea_pod_override_uri',
+ action='store',
+ default=False,
+ help='dea POD override configuration FQDN URI',
+ required=True)
+ parser.add_argument('-scenario-base-uri',
+ dest='scenario_base_uri',
+ action='store',
+ default=False,
+ help='Deployment scenario base directory URI',
+ required=True)
+ parser.add_argument('-scenario', dest='scenario', action='store',
+ default=False,
+ help=('Deployment scenario short-name (priority), '
+ 'or base file name (in the absense of a '
+ 'shortname defenition)'),
+ required=True)
+
+ parser.add_argument('-plugins', dest='plugins_uri', action='store',
+ default=False,
+ help='Plugin configurations directory URI',
+ required=True)
+ parser.add_argument('-output', dest='output_path', action='store',
+ default=False,
+ help='Local path for resulting output configuration files',
+ required=True)
+ args = parser.parse_args()
+ kwargs = {'dha_uri': args.dha_uri,
+ 'dea_base_uri': args.dea_base_uri,
+ 'dea_pod_override_uri': args.dea_pod_override_uri,
+ 'scenario_base_uri': args.scenario_base_uri,
+ 'scenario': args.scenario,
+ 'plugins_uri': args.plugins_uri,
+ 'output_path': args.output_path}
+ return kwargs
+
+
+def warning(msg):
+ red = '\033[0;31m'
+ NC = '\033[0m'
+ print('%(red)s WARNING: %(msg)s %(NC)s' % {'red': red,
+ 'msg': msg,
+ 'NC': NC})
+
+
+def setup_yaml():
+ represent_dict_order = lambda self, data: self.represent_mapping('tag:yaml.org,2002:map', data.items())
+ yaml.add_representer(collections.OrderedDict, represent_dict_order)
+
+
+def sha_uri(uri):
+ response = urllib2.urlopen(uri)
+ data = response.read()
+ sha1 = hashlib.sha1()
+ sha1.update(data)
+ return sha1.hexdigest()
+
+
+def merge_fuel_plugin_version_list(list1, list2):
+ final_list = []
+ # When the plugin version in not there in list1 it will
+ # not be copied
+ for e_l1 in list1:
+ plugin_version = e_l1.get('metadata', {}).get('plugin_version')
+ plugin_version_found = False
+ for e_l2 in list2:
+ if plugin_version == e_l2.get('metadata', {}).get('plugin_version'):
+ final_list.append(dict(merge_dicts(e_l1, e_l2)))
+ plugin_version_found = True
+ if not plugin_version_found:
+ final_list.append(e_l1)
+ return final_list
+
+
+def merge_networks(list_1, list_2):
+ new_nets = {x.get('name'): x for x in 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:
+ if isinstance(dict1[k], dict) and isinstance(dict2[k], dict):
+ yield (k, dict(merge_dicts(dict1[k], dict2[k])))
+ continue
+ if isinstance(dict1[k], list) and isinstance(dict2[k], list):
+ if k == 'versions':
+ yield (k,
+ merge_fuel_plugin_version_list(dict1[k], dict2[k]))
+ continue
+ if k == 'networks':
+ yield (k,
+ merge_networks(dict1[k], dict2[k]))
+ continue
+
+ # If one of the values is not a dict nor a list,
+ # you can't continue merging it.
+ # Value from second dict overrides one in first if exists.
+ if k in dict2:
+ yield (k, dict2[k])
+ else:
+ yield (k, dict1[k])
+
+
+def get_node_ifaces_and_trans(nodes, nid):
+ for node in nodes:
+ if node['id'] == nid:
+ if 'transformations' in node and 'interfaces' in node:
+ return (node['interfaces'], node['transformations'])
+ else:
+ return None
+
+ return None
+
+
+class DeployConfig(object):
+ def __init__(self):
+ self.kwargs = parse_arguments()
+ self.dea_conf = dict()
+ self.dea_metadata = dict()
+ self.dea_pod_ovr_metadata = dict()
+ self.dea_pod_ovr_nodes = None
+ self.scenario_metadata = dict()
+ self.modules = []
+ self.module_uris = []
+ self.module_titles = []
+ self.module_versions = []
+ self.module_createds = []
+ self.module_shas = []
+ self.module_comments = []
+ self.dha_pod_conf = dict()
+ self.dha_metadata = dict()
+
+ def process_dea_base(self):
+ # Generate final dea.yaml by merging following config files/fragments in reverse priority order:
+ # "dea-base", "dea-pod-override", "deplyment-scenario/module-config-override"
+ # and "deployment-scenario/dea-override"
+ print('Generating final dea.yaml configuration....')
+
+ # Fetch dea-base, extract and purge meta-data
+ print('Parsing dea-base from: ' + self.kwargs["dea_base_uri"] + "....")
+ response = urllib2.urlopen(self.kwargs["dea_base_uri"])
+ dea_conf = yaml.load(response.read())
+
+ dea_metadata = dict()
+ dea_metadata['title'] = dea_conf['dea-base-config-metadata']['title']
+ dea_metadata['version'] = dea_conf['dea-base-config-metadata']['version']
+ dea_metadata['created'] = dea_conf['dea-base-config-metadata']['created']
+ dea_metadata['sha'] = sha_uri(self.kwargs["dea_base_uri"])
+ dea_metadata['comment'] = dea_conf['dea-base-config-metadata']['comment']
+ self.dea_metadata = dea_metadata
+ dea_conf.pop('dea-base-config-metadata')
+ self.dea_conf = dea_conf
+
+ def process_dea_pod_override(self):
+ # Fetch dea-pod-override, extract and purge meta-data, merge with previous dea data structure
+ print('Parsing the dea-pod-override from: ' + self.kwargs["dea_pod_override_uri"] + "....")
+ response = urllib2.urlopen(self.kwargs["dea_pod_override_uri"])
+ dea_pod_override_conf = yaml.load(response.read())
+
+ if dea_pod_override_conf:
+ metadata = dict()
+ metadata['title'] = dea_pod_override_conf['dea-pod-override-config-metadata']['title']
+ metadata['version'] = dea_pod_override_conf['dea-pod-override-config-metadata']['version']
+ metadata['created'] = dea_pod_override_conf['dea-pod-override-config-metadata']['created']
+ metadata['sha'] = sha_uri(self.kwargs["dea_pod_override_uri"])
+ metadata['comment'] = dea_pod_override_conf['dea-pod-override-config-metadata']['comment']
+ self.dea_pod_ovr_metadata = metadata
+
+ print('Merging dea-base and dea-pod-override configuration ....')
+ dea_pod_override_conf.pop('dea-pod-override-config-metadata')
+
+ # Copy the list of original nodes, which holds info on their transformations
+ if 'nodes' in dea_pod_override_conf:
+ self.dea_pod_ovr_nodes = list(dea_pod_override_conf['nodes'])
+ if dea_pod_override_conf:
+ self.dea_conf = dict(merge_dicts(self.dea_conf, dea_pod_override_conf))
+
+ def get_scenario_uri(self):
+ response = urllib2.urlopen(self.kwargs["scenario_base_uri"] + "/scenario.yaml")
+ scenario_short_translation_conf = yaml.load(response.read())
+ if self.kwargs["scenario"] in scenario_short_translation_conf:
+ scenario_uri = (self.kwargs["scenario_base_uri"]
+ + "/"
+ + scenario_short_translation_conf[self.kwargs["scenario"]]['configfile'])
+ else:
+ scenario_uri = self.kwargs["scenario_base_uri"] + "/" + self.kwargs["scenario"]
+
+ return scenario_uri
+
+ def get_scenario_config(self):
+ self.scenario_metadata['uri'] = self.get_scenario_uri()
+ response = urllib2.urlopen(self.scenario_metadata['uri'])
+ return yaml.load(response.read())
+
+ def process_modules(self):
+ scenario_conf = self.get_scenario_config()
+ if scenario_conf["stack-extensions"]:
+ for module in scenario_conf["stack-extensions"]:
+ print('Loading configuration for module: '
+ + module["module"]
+ + ' and merging it to final dea.yaml configuration....')
+ response = urllib2.urlopen(self.kwargs["plugins_uri"]
+ + '/'
+ + module["module-config-name"]
+ + '_'
+ + module["module-config-version"]
+ + '.yaml')
+ module_conf = yaml.load(response.read())
+ self.modules.append(module["module"])
+ self.module_uris.append(self.kwargs["plugins_uri"]
+ + '/'
+ + module["module-config-name"]
+ + '_'
+ + module["module-config-version"]
+ + '.yaml')
+ self.module_titles.append(str(module_conf['plugin-config-metadata']['title']))
+ self.module_versions.append(str(module_conf['plugin-config-metadata']['version']))
+ self.module_createds.append(str(module_conf['plugin-config-metadata']['created']))
+ self.module_shas.append(sha_uri(self.kwargs["plugins_uri"]
+ + '/'
+ + module["module-config-name"]
+ + '_'
+ + module["module-config-version"]
+ + '.yaml'))
+ self.module_comments.append(str(module_conf['plugin-config-metadata']['comment']))
+ module_conf.pop('plugin-config-metadata')
+ self.dea_conf['settings']['editable'].update(module_conf)
+
+ scenario_module_override_conf = module.get('module-config-override')
+ if scenario_module_override_conf:
+ dea_scenario_module_override_conf = {}
+ dea_scenario_module_override_conf['settings'] = {}
+ dea_scenario_module_override_conf['settings']['editable'] = {}
+ dea_scenario_module_override_conf['settings']['editable'][module["module"]] = scenario_module_override_conf
+ self.dea_conf = dict(merge_dicts(self.dea_conf, dea_scenario_module_override_conf))
+
+ def process_scenario_config(self):
+ # Fetch deployment-scenario, extract and purge meta-data, merge deployment-scenario/
+ # dea-override-configith previous dea data structure
+ print('Parsing deployment-scenario from: ' + self.kwargs["scenario"] + "....")
+
+ scenario_conf = self.get_scenario_config()
+
+ metadata = dict()
+ if scenario_conf:
+ metadata['title'] = scenario_conf['deployment-scenario-metadata']['title']
+ metadata['version'] = scenario_conf['deployment-scenario-metadata']['version']
+ metadata['created'] = scenario_conf['deployment-scenario-metadata']['created']
+ metadata['sha'] = sha_uri(self.scenario_metadata['uri'])
+ metadata['comment'] = scenario_conf['deployment-scenario-metadata']['comment']
+ self.scenario_metadata = metadata
+ scenario_conf.pop('deployment-scenario-metadata')
+ else:
+ print("Deployment scenario file not found or is empty")
+ print("Cannot continue, exiting ....")
+ sys.exit(1)
+
+ dea_scenario_override_conf = scenario_conf["dea-override-config"]
+ if dea_scenario_override_conf:
+ print('Merging dea-base-, dea-pod-override- and deployment-scenario '
+ 'configuration into final dea.yaml configuration....')
+ self.dea_conf = dict(merge_dicts(self.dea_conf, dea_scenario_override_conf))
+
+ self.process_modules()
+
+ # Fetch plugin-configuration configuration files, extract and purge meta-data,
+ # merge/append with previous dea data structure, override plugin-configuration with
+ # deploy-scenario/module-config-override
+
+ if self.dea_pod_ovr_nodes:
+ for node in self.dea_conf['nodes']:
+ data = get_node_ifaces_and_trans(self.dea_pod_ovr_nodes, node['id'])
+ if data:
+ print("Honoring original interfaces and transformations for "
+ "node %d to %s, %s" % (node['id'], data[0], data[1]))
+ node['interfaces'] = data[0]
+ node['transformations'] = data[1]
+
+ def dump_dea_config(self):
+ # Dump final dea.yaml including configuration management meta-data to argument provided
+ # directory
+ path = self.kwargs["output_path"]
+ if not os.path.exists(path):
+ os.makedirs(path)
+ print('Dumping final dea.yaml to ' + path + '/dea.yaml....')
+ with open(path + '/dea.yaml', "w") as f:
+ f.write("\n".join([("title: DEA.yaml file automatically generated from the "
+ 'configuration files stated in the "configuration-files" '
+ "fragment below"),
+ "version: " + str(calendar.timegm(time.gmtime())),
+ "created: " + time.strftime("%d/%m/%Y %H:%M:%S"),
+ "comment: none\n"]))
+
+ f.write("\n".join(["configuration-files:",
+ " dea-base:",
+ " uri: " + self.kwargs["dea_base_uri"],
+ " title: " + self.dea_metadata['title'],
+ " version: " + self.dea_metadata['version'],
+ " created: " + self.dea_metadata['created'],
+ " sha1: " + sha_uri(self.kwargs["dea_base_uri"]),
+ " comment: " + self.dea_metadata['comment'] + "\n"]))
+
+ f.write("\n".join([" pod-override:",
+ " uri: " + self.kwargs["dea_pod_override_uri"],
+ " title: " + self.dea_pod_ovr_metadata['title'],
+ " version: " + self.dea_pod_ovr_metadata['version'],
+ " created: " + self.dea_pod_ovr_metadata['created'],
+ " sha1: " + self.dea_pod_ovr_metadata['sha'],
+ " comment: " + self.dea_pod_ovr_metadata['comment'] + "\n"]))
+
+ f.write("\n".join([" deployment-scenario:",
+ " uri: " + self.scenario_metadata['uri'],
+ " title: " + self.scenario_metadata['title'],
+ " version: " + self.scenario_metadata['version'],
+ " created: " + self.scenario_metadata['created'],
+ " sha1: " + self.scenario_metadata['sha'],
+ " comment: " + self.scenario_metadata['comment'] + "\n"]))
+
+ f.write(" plugin-modules:\n")
+ for k, _ in enumerate(self.modules):
+ f.write("\n".join([" - module: " + self.modules[k],
+ " uri: " + self.module_uris[k],
+ " title: " + self.module_titles[k],
+ " version: " + self.module_versions[k],
+ " created: " + self.module_createds[k],
+ " sha-1: " + self.module_shas[k],
+ " comment: " + self.module_comments[k] + "\n"]))
+
+ yaml.dump(self.dea_conf, f, default_flow_style=False)
+
+ def process_dha_pod_config(self):
+ # Load POD dha and override it with "deployment-scenario/dha-override-config" section
+ print('Generating final dha.yaml configuration....')
+ print('Parsing dha-pod yaml configuration....')
+ response = urllib2.urlopen(self.kwargs["dha_uri"])
+ dha_pod_conf = yaml.load(response.read())
+
+ dha_metadata = dict()
+ dha_metadata['title'] = dha_pod_conf['dha-pod-config-metadata']['title']
+ dha_metadata['version'] = dha_pod_conf['dha-pod-config-metadata']['version']
+ dha_metadata['created'] = dha_pod_conf['dha-pod-config-metadata']['created']
+ dha_metadata['sha'] = sha_uri(self.kwargs["dha_uri"])
+ dha_metadata['comment'] = dha_pod_conf['dha-pod-config-metadata']['comment']
+ self.dha_metadata = dha_metadata
+ dha_pod_conf.pop('dha-pod-config-metadata')
+ self.dha_pod_conf = dha_pod_conf
+
+ scenario_conf = self.get_scenario_config()
+ dha_scenario_override_conf = scenario_conf["dha-override-config"]
+ # Only virtual deploy scenarios can override dha.yaml since there
+ # is no way to programatically override a physical environment:
+ # wireing, IPMI set-up, etc.
+ # For Physical environments, dha.yaml overrides will be silently ignored
+ if dha_scenario_override_conf and (dha_pod_conf['adapter'] == 'libvirt'
+ or dha_pod_conf['adapter'] == 'esxi'
+ or dha_pod_conf['adapter'] == 'vbox'):
+ print('Merging dha-pod and deployment-scenario override information to final dha.yaml configuration....')
+ self.dha_pod_conf = dict(merge_dicts(self.dha_pod_conf, dha_scenario_override_conf))
+
+ def dump_dha_config(self):
+ # Dump final dha.yaml to argument provided directory
+ path = self.kwargs["output_path"]
+ print('Dumping final dha.yaml to ' + path + '/dha.yaml....')
+ with open(path + '/dha.yaml', "w") as f:
+ f.write("\n".join([("title: DHA.yaml file automatically generated from "
+ "the configuration files stated in the "
+ '"configuration-files" fragment below'),
+ "version: " + str(calendar.timegm(time.gmtime())),
+ "created: " + time.strftime("%d/%m/%Y %H:%M:%S"),
+ "comment: none\n"]))
+
+ f.write("configuration-files:\n")
+
+ f.write("\n".join([" dha-pod-configuration:",
+ " uri: " + self.kwargs["dha_uri"],
+ " title: " + self.dha_metadata['title'],
+ " version: " + self.dha_metadata['version'],
+ " created: " + self.dha_metadata['created'],
+ " sha-1: " + self.dha_metadata['sha'],
+ " comment: " + self.dha_metadata['comment'] + "\n"]))
+
+ f.write("\n".join([" deployment-scenario:",
+ " uri: " + self.scenario_metadata['uri'],
+ " title: " + self.scenario_metadata['title'],
+ " version: " + self.scenario_metadata['version'],
+ " created: " + self.scenario_metadata['created'],
+ " sha-1: " + self.scenario_metadata['sha'],
+ " comment: " + self.scenario_metadata['comment'] + "\n"]))
+
+ yaml.dump(self.dha_pod_conf, f, default_flow_style=False)
+
+
+def main():
+ setup_yaml()
+
+ deploy_config = DeployConfig()
+ deploy_config.process_dea_base()
+ deploy_config.process_dea_pod_override()
+ deploy_config.process_scenario_config()
+ deploy_config.dump_dea_config()
+
+ deploy_config.process_dha_pod_config()
+ deploy_config.dump_dha_config()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/deploy/deploy.py b/deploy/deploy.py
new file mode 100755
index 000000000..f491929e0
--- /dev/null
+++ b/deploy/deploy.py
@@ -0,0 +1,423 @@
+#!/usr/bin/python
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import os
+import io
+import re
+import sys
+import yaml
+import errno
+import signal
+import netaddr
+
+from dea import DeploymentEnvironmentAdapter
+from dha import DeploymentHardwareAdapter
+from install_fuel_master import InstallFuelMaster
+from deploy_env import CloudDeploy
+from execution_environment import ExecutionEnvironment
+
+from common import (
+ log,
+ exec_cmd,
+ err,
+ warn,
+ check_file_exists,
+ check_dir_exists,
+ create_dir_if_not_exists,
+ delete,
+ check_if_root,
+ ArgParser,
+)
+
+FUEL_VM = 'fuel'
+PATCH_DIR = 'fuel_patch'
+WORK_DIR = '~/deploy'
+CWD = os.getcwd()
+MOUNT_STATE_VAR = 'AUTODEPLOY_ISO_MOUNTED'
+
+
+class cd:
+
+ def __init__(self, new_path):
+ self.new_path = os.path.expanduser(new_path)
+
+ def __enter__(self):
+ self.saved_path = CWD
+ os.chdir(self.new_path)
+
+ def __exit__(self, etype, value, traceback):
+ os.chdir(self.saved_path)
+
+
+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):
+ self.no_fuel = no_fuel
+ self.fuel_only = fuel_only
+ self.no_health_check = no_health_check
+ self.cleanup_only = cleanup_only
+ self.cleanup = cleanup
+ self.storage_dir = storage_dir
+ self.pxe_bridge = pxe_bridge
+ self.iso_file = iso_file
+ self.dea_file = dea_file
+ self.dha_file = dha_file
+ self.fuel_plugins_dir = fuel_plugins_dir
+ self.fuel_plugins_conf_dir = fuel_plugins_conf_dir
+ self.no_plugins = no_plugins
+ self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
+ self.deploy_log = deploy_log
+ self.dea = (DeploymentEnvironmentAdapter(dea_file)
+ if not cleanup_only else None)
+ self.dha = DeploymentHardwareAdapter(dha_file)
+ self.fuel_conf = {}
+ self.fuel_node_id = self.dha.get_fuel_node_id()
+ self.fuel_username, self.fuel_password = self.dha.get_fuel_access()
+ self.tmp_dir = None
+
+ def modify_ip(self, ip_addr, index, val):
+ ip_str = str(netaddr.IPAddress(ip_addr))
+ decimal_list = map(int, ip_str.split('.'))
+ decimal_list[index] = val
+ return '.'.join(map(str, decimal_list))
+
+ def collect_fuel_info(self):
+ self.fuel_conf['ip'] = self.dea.get_fuel_ip()
+ self.fuel_conf['gw'] = self.dea.get_fuel_gateway()
+ self.fuel_conf['dns1'] = self.dea.get_fuel_dns()
+ self.fuel_conf['netmask'] = self.dea.get_fuel_netmask()
+ self.fuel_conf['hostname'] = self.dea.get_fuel_hostname()
+ self.fuel_conf['showmenu'] = 'yes'
+
+ def install_fuel_master(self):
+ log('Install Fuel Master')
+ new_iso = ('%s/deploy-%s'
+ % (self.tmp_dir, os.path.basename(self.iso_file)))
+ self.patch_iso(new_iso)
+ self.iso_file = new_iso
+ self.install_iso()
+
+ def delete_old_fuel_env(self):
+ log('Delete old Fuel Master environments if present')
+ try:
+ old_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,
+ self.no_deploy_environment, self.deploy_log)
+ with old_dep.ssh:
+ old_dep.check_previous_installation()
+ except Exception as e:
+ log('Could not delete old env: %s' % str(e))
+
+ def install_iso(self):
+ fuel = InstallFuelMaster(self.dea_file, self.dha_file,
+ self.fuel_conf['ip'], self.fuel_username,
+ self.fuel_password, self.fuel_node_id,
+ self.iso_file, WORK_DIR,
+ self.fuel_plugins_dir, self.no_plugins)
+ fuel.install()
+
+ def patch_iso(self, new_iso):
+ tmp_orig_dir = '%s/origiso' % self.tmp_dir
+ tmp_new_dir = '%s/newiso' % self.tmp_dir
+ try:
+ self.copy(tmp_orig_dir, tmp_new_dir)
+ self.patch(tmp_new_dir, new_iso)
+ except Exception as e:
+ exec_cmd('fusermount -u %s' % tmp_orig_dir, False)
+ os.environ.pop(MOUNT_STATE_VAR, None)
+ delete(self.tmp_dir)
+ err(e)
+
+ def copy(self, tmp_orig_dir, tmp_new_dir):
+ log('Copying...')
+ os.makedirs(tmp_orig_dir)
+ os.makedirs(tmp_new_dir)
+ exec_cmd('fuseiso %s %s' % (self.iso_file, tmp_orig_dir))
+ os.environ[MOUNT_STATE_VAR] = tmp_orig_dir
+ with cd(tmp_orig_dir):
+ exec_cmd('find . | cpio -pd %s' % tmp_new_dir)
+ exec_cmd('fusermount -u %s' % tmp_orig_dir)
+ os.environ.pop(MOUNT_STATE_VAR, None)
+ delete(tmp_orig_dir)
+ exec_cmd('chmod -R 755 %s' % tmp_new_dir)
+
+ def patch(self, tmp_new_dir, new_iso):
+ log('Patching...')
+ patch_dir = '%s/%s' % (CWD, PATCH_DIR)
+ ks_path = '%s/ks.cfg.patch' % patch_dir
+
+ with cd(tmp_new_dir):
+ exec_cmd('cat %s | patch -p0' % ks_path)
+ delete('.rr_moved')
+ isolinux = 'isolinux/isolinux.cfg'
+ log('isolinux.cfg before: %s'
+ % exec_cmd('grep ip= %s' % isolinux))
+ self.update_fuel_isolinux(isolinux)
+ log('isolinux.cfg after: %s'
+ % exec_cmd('grep ip= %s' % isolinux))
+
+ iso_label = self.parse_iso_volume_label(self.iso_file)
+ log('Volume label: %s' % iso_label)
+
+ iso_linux_bin = 'isolinux/isolinux.bin'
+ exec_cmd('mkisofs -quiet -r -J -R -b %s '
+ '-no-emul-boot -boot-load-size 4 '
+ '-boot-info-table -hide-rr-moved '
+ '-joliet-long '
+ '-x "lost+found:" -V %s -o %s .'
+ % (iso_linux_bin, iso_label, new_iso))
+
+ delete(tmp_new_dir)
+
+ def update_fuel_isolinux(self, file):
+ with io.open(file) as f:
+ data = f.read()
+ for key, val in self.fuel_conf.iteritems():
+ # skip replacing these keys, as the format is different
+ if key in ['ip', 'gw', 'netmask', 'hostname']:
+ continue
+
+ pattern = r'%s=[^ ]\S+' % key
+ replace = '%s=%s' % (key, val)
+ data = re.sub(pattern, replace, data)
+
+ # process networking parameters
+ ip = ':'.join([self.fuel_conf['ip'],
+ '',
+ self.fuel_conf['gw'],
+ self.fuel_conf['netmask'],
+ self.fuel_conf['hostname'],
+ 'eth0:off:::'])
+
+ data = re.sub(r'ip=[^ ]\S+', 'ip=%s' % ip, data)
+
+ with io.open(file, 'w') as f:
+ f.write(data)
+
+ def parse_iso_volume_label(self, iso_filename):
+ label_line = exec_cmd('isoinfo -d -i %s | grep -i "Volume id: "' % iso_filename)
+ # cut leading text: 'Volume id: '
+ return label_line[11:]
+
+ def deploy_env(self):
+ 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,
+ self.no_deploy_environment, self.deploy_log)
+ return dep.deploy()
+
+ def setup_execution_environment(self):
+ exec_env = ExecutionEnvironment(self.storage_dir, self.pxe_bridge,
+ self.dha_file, self.dea)
+ exec_env.setup_environment()
+
+ def cleanup_execution_environment(self):
+ exec_env = ExecutionEnvironment(self.storage_dir, self.pxe_bridge,
+ self.dha_file, self.dea)
+ exec_env.cleanup_environment()
+
+ def create_tmp_dir(self):
+ self.tmp_dir = '%s/fueltmp' % CWD
+ delete(self.tmp_dir)
+ create_dir_if_not_exists(self.tmp_dir)
+
+ def deploy(self):
+ self.collect_fuel_info()
+ if not self.no_fuel:
+ self.delete_old_fuel_env()
+ self.setup_execution_environment()
+ self.create_tmp_dir()
+ self.install_fuel_master()
+ if not self.fuel_only:
+ return self.deploy_env()
+ # Exit status
+ return 0
+
+ def run(self):
+ check_if_root()
+ if self.cleanup_only:
+ self.cleanup_execution_environment()
+ else:
+ deploy_success = self.deploy()
+ if self.cleanup:
+ self.cleanup_execution_environment()
+ return deploy_success
+ # Exit status
+ return 0
+
+
+def check_bridge(pxe_bridge, dha_path):
+ # Assume that bridges on remote nodes exists, we could ssh but
+ # the remote user might not have a login shell.
+ if os.environ.get('LIBVIRT_DEFAULT_URI'):
+ return
+
+ with io.open(dha_path) as yaml_file:
+ dha_struct = yaml.load(yaml_file)
+ if dha_struct['adapter'] != 'libvirt':
+ log('Using Linux Bridge %s for booting up the Fuel Master VM'
+ % pxe_bridge)
+ r = exec_cmd('ip link show %s' % pxe_bridge)
+ if pxe_bridge in r and 'state DOWN' in r:
+ err('Linux Bridge {0} is not Active, bring'
+ ' it UP first: [ip link set dev {0} up]'.format(pxe_bridge))
+
+
+def check_fuel_plugins_dir(dir):
+ msg = None
+ if not dir:
+ msg = 'Fuel Plugins Directory not specified!'
+ elif not os.path.isdir(dir):
+ msg = 'Fuel Plugins Directory does not exist!'
+ elif not os.listdir(dir):
+ msg = 'Fuel Plugins Directory is empty!'
+ if msg:
+ warn('%s No external plugins will be installed!' % msg)
+
+
+def parse_arguments():
+ parser = ArgParser(prog='python %s' % __file__)
+ parser.add_argument('-nf', dest='no_fuel', action='store_true',
+ default=False,
+ help='Do not install Fuel Master (and Node VMs when '
+ 'using libvirt)')
+ parser.add_argument('-nh', dest='no_health_check', action='store_true',
+ default=False,
+ help='Don\'t run health check after deployment')
+ parser.add_argument('-fo', dest='fuel_only', action='store_true',
+ default=False,
+ help='Install Fuel Master only (and Node VMs when '
+ 'using libvirt)')
+ parser.add_argument('-co', dest='cleanup_only', action='store_true',
+ default=False,
+ help='Cleanup VMs and Virtual Networks according to '
+ 'what is defined in DHA')
+ parser.add_argument('-c', dest='cleanup', action='store_true',
+ default=False,
+ help='Cleanup after deploy')
+ if {'-iso', '-dea', '-dha', '-h'}.intersection(sys.argv):
+ parser.add_argument('-iso', dest='iso_file', action='store', nargs='?',
+ default='%s/OPNFV.iso' % CWD,
+ help='ISO File [default: OPNFV.iso]')
+ parser.add_argument('-dea', dest='dea_file', action='store', nargs='?',
+ default='%s/dea.yaml' % CWD,
+ help='Deployment Environment Adapter: dea.yaml')
+ parser.add_argument('-dha', dest='dha_file', action='store', nargs='?',
+ default='%s/dha.yaml' % CWD,
+ help='Deployment Hardware Adapter: dha.yaml')
+ else:
+ parser.add_argument('iso_file', action='store', nargs='?',
+ default='%s/OPNFV.iso' % CWD,
+ help='ISO File [default: OPNFV.iso]')
+ parser.add_argument('dea_file', action='store', nargs='?',
+ default='%s/dea.yaml' % CWD,
+ help='Deployment Environment Adapter: dea.yaml')
+ parser.add_argument('dha_file', action='store', nargs='?',
+ default='%s/dha.yaml' % CWD,
+ help='Deployment Hardware Adapter: dha.yaml')
+ parser.add_argument('-s', dest='storage_dir', action='store',
+ default='%s/images' % CWD,
+ help='Storage Directory [default: images]')
+ parser.add_argument('-b', dest='pxe_bridge', action='append',
+ default=[],
+ help='Linux Bridge for booting up the Fuel Master VM '
+ '[default: pxebr]')
+ parser.add_argument('-p', dest='fuel_plugins_dir', action='store',
+ help='Fuel Plugins directory')
+ parser.add_argument('-pc', dest='fuel_plugins_conf_dir', action='store',
+ 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('-dt', dest='deploy_timeout', action='store',
+ default=240, help='Deployment timeout (in minutes) '
+ '[default: 240]')
+ parser.add_argument('-nde', dest='no_deploy_environment',
+ action='store_true', default=False,
+ help=('Do not launch environment deployment'))
+ parser.add_argument('-log', dest='deploy_log',
+ action='store', default='../ci/.',
+ help=('Path and name of the deployment log archive'))
+
+ args = parser.parse_args()
+ log(args)
+
+ if not args.pxe_bridge:
+ args.pxe_bridge = ['pxebr']
+
+ check_file_exists(args.dha_file)
+
+ check_dir_exists(os.path.dirname(args.deploy_log))
+
+ if not args.cleanup_only:
+ check_file_exists(args.dea_file)
+ check_fuel_plugins_dir(args.fuel_plugins_dir)
+
+ iso_abs_path = os.path.abspath(args.iso_file)
+ if not args.no_fuel and not args.cleanup_only:
+ log('Using OPNFV ISO file: %s' % iso_abs_path)
+ check_file_exists(iso_abs_path)
+ log('Using image directory: %s' % args.storage_dir)
+ create_dir_if_not_exists(args.storage_dir)
+ for bridge in args.pxe_bridge:
+ check_bridge(bridge, args.dha_file)
+
+
+ kwargs = {'no_fuel': args.no_fuel, 'fuel_only': args.fuel_only,
+ 'no_health_check': args.no_health_check,
+ 'cleanup_only': args.cleanup_only, 'cleanup': args.cleanup,
+ 'storage_dir': args.storage_dir, 'pxe_bridge': args.pxe_bridge,
+ 'iso_file': iso_abs_path, 'dea_file': args.dea_file,
+ 'dha_file': args.dha_file,
+ 'fuel_plugins_dir': args.fuel_plugins_dir,
+ 'fuel_plugins_conf_dir': args.fuel_plugins_conf_dir,
+ 'no_plugins': args.no_plugins,
+ 'deploy_timeout': args.deploy_timeout,
+ 'no_deploy_environment': args.no_deploy_environment,
+ 'deploy_log': args.deploy_log}
+ return kwargs
+
+
+def handle_signals(signal_num, frame):
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+ signal.signal(signal.SIGTERM, signal.SIG_IGN)
+
+ log('Caught signal %s, cleaning up and exiting.' % signal_num)
+
+ mount_point = os.environ.get(MOUNT_STATE_VAR)
+ if mount_point:
+ log('Unmounting ISO from "%s"' % mount_point)
+ # Prevent 'Device or resource busy' errors when unmounting
+ os.chdir('/')
+ exec_cmd('fusermount -u %s' % mount_point, True)
+ # Be nice and remove our environment variable, even though the OS would
+ # would clean it up anyway
+ os.environ.pop(MOUNT_STATE_VAR)
+
+ sys.exit(1)
+
+
+def main():
+ signal.signal(signal.SIGINT, handle_signals)
+ signal.signal(signal.SIGTERM, handle_signals)
+ kwargs = parse_arguments()
+ d = AutoDeploy(**kwargs)
+ sys.exit(d.run())
+
+if __name__ == '__main__':
+ main()
diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py
new file mode 100644
index 000000000..93dc3959b
--- /dev/null
+++ b/deploy/deploy_env.py
@@ -0,0 +1,285 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import os
+import io
+import yaml
+import glob
+import time
+import shutil
+
+from ssh_client import SSHClient
+
+from common import (
+ err,
+ log,
+ exec_cmd,
+ parse,
+ N,
+ E,
+ R,
+ delete,
+)
+
+CLOUD_DEPLOY_FILE = 'deploy.py'
+BLADE_RESTART_TIMES = 3
+
+
+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):
+ self.dea = dea
+ self.dha = dha
+ self.fuel_ip = fuel_ip
+ self.fuel_username = fuel_username
+ self.fuel_password = fuel_password
+ self.dea_file = dea_file
+ self.updated_dea_file = (
+ '%s/.%s' % (os.path.dirname(self.dea_file),
+ os.path.basename(self.dea_file)))
+ shutil.copy2(self.dea_file, self.updated_dea_file)
+ self.fuel_plugins_conf_dir = fuel_plugins_conf_dir
+ self.work_dir = work_dir
+ self.no_health_check = no_health_check
+ self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
+ self.deploy_log = deploy_log
+ self.file_dir = os.path.dirname(os.path.realpath(__file__))
+ self.ssh = SSHClient(self.fuel_ip, self.fuel_username,
+ self.fuel_password)
+ self.node_ids = self.dha.get_node_ids()
+ self.wanted_release = self.dea.get_property('wanted_release')
+ self.blade_node_dict = {}
+ self.macs_per_blade = {}
+
+ def merge_plugin_config_files_to_dea_file(self):
+ plugins_conf_dir = (
+ self.fuel_plugins_conf_dir if self.fuel_plugins_conf_dir
+ else '%s/plugins_conf' % os.path.dirname(self.dea_file))
+ if os.path.isdir(plugins_conf_dir):
+ with io.open(self.updated_dea_file) as stream:
+ updated_dea = yaml.load(stream)
+ for plugin_file in glob.glob('%s/*.yaml' % plugins_conf_dir):
+ with io.open(plugin_file) as stream:
+ plugin_conf = yaml.load(stream)
+ updated_dea['settings']['editable'].update(plugin_conf)
+ with io.open(self.updated_dea_file, 'w') as stream:
+ yaml.dump(updated_dea, stream, default_flow_style=False)
+
+ def upload_cloud_deployment_files(self):
+ with self.ssh as s:
+ s.exec_cmd('rm -rf %s' % self.work_dir, False)
+ s.exec_cmd('mkdir %s' % self.work_dir)
+ s.scp_put(self.updated_dea_file, '%s/%s' % (
+ 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)
+ for f in glob.glob('%s/cloud/*' % self.file_dir):
+ s.scp_put(f, self.work_dir)
+
+ def power_off_nodes(self):
+ for node_id in self.node_ids:
+ self.dha.node_power_off(node_id)
+
+ def power_on_nodes(self):
+ for node_id in self.node_ids:
+ self.dha.node_power_on(node_id)
+
+ def set_boot_order(self, boot_order_list):
+ for node_id in self.node_ids:
+ self.dha.node_set_boot_order(node_id, boot_order_list[:])
+
+ def get_mac_addresses(self):
+ self.macs_per_blade = {}
+ for node_id in self.node_ids:
+ self.macs_per_blade[node_id] = self.dha.get_node_pxe_mac(node_id)
+
+ def run_cloud_deploy(self, deploy_app):
+ log('START CLOUD DEPLOYMENT')
+ deploy_app = '%s/%s' % (self.work_dir, deploy_app)
+ dea_file = '%s/%s' % (self.work_dir, os.path.basename(self.dea_file))
+ with self.ssh as s:
+ status = s.run('python %s %s %s %s %s' % (
+ deploy_app,
+ ('-nh' if self.no_health_check else ''),
+ ('-dt %s' %
+ self.deploy_timeout if self.deploy_timeout else ''),
+ ('-nde' if self.no_deploy_environment else ''),
+ dea_file))
+ return status
+
+ def check_supported_release(self):
+ log('Check supported release: %s' % self.wanted_release)
+ found = False
+ release_list = parse(self.ssh.exec_cmd('fuel release -l'))
+ for release in release_list:
+ if release[R['name']] == self.wanted_release:
+ found = True
+ break
+ if not found:
+ err('This Fuel does not contain the following release: %s'
+ % self.wanted_release)
+
+ def check_previous_installation(self):
+ log('Check previous installation')
+ env_list = parse(self.ssh.exec_cmd('fuel env list'))
+ if env_list:
+ self.cleanup_fuel_environments(env_list)
+ node_list = parse(self.ssh.exec_cmd('fuel node list'))
+ if node_list:
+ self.cleanup_fuel_nodes(node_list)
+
+ def cleanup_fuel_environments(self, env_list):
+ WAIT_LOOP = 60
+ SLEEP_TIME = 10
+ for env in env_list:
+ log('Deleting environment %s' % env[E['id']])
+ self.ssh.exec_cmd('fuel env --env %s --delete --force'
+ % env[E['id']])
+ all_env_erased = False
+ for i in range(WAIT_LOOP):
+ env_list = parse(self.ssh.exec_cmd('fuel env list'))
+ if env_list:
+ time.sleep(SLEEP_TIME)
+ else:
+ all_env_erased = True
+ break
+ if not all_env_erased:
+ err('Could not erase these environments %s'
+ % [(env[E['id']], env[E['status']]) for env in env_list])
+
+ def cleanup_fuel_nodes(self, node_list):
+ for node in node_list:
+ if node[N['status']] == 'discover':
+ log('Deleting node %s' % node[N['id']])
+ self.ssh.exec_cmd('fuel node --node-id %s --delete-from-db '
+ '--force' % node[N['id']])
+ self.ssh.exec_cmd('cobbler system remove --name node-%s'
+ % node[N['id']], False)
+
+ def check_prerequisites(self):
+ log('Check prerequisites')
+ with self.ssh:
+ self.check_supported_release()
+ self.check_previous_installation()
+
+ def wait_for_discovered_blades(self):
+ log('Wait for discovered blades')
+ discovered_macs = []
+ restart_times = BLADE_RESTART_TIMES
+
+ for blade in self.node_ids:
+ self.blade_node_dict[blade] = None
+
+ with self.ssh:
+ all_discovered = self.discovery_waiting_loop(discovered_macs)
+
+ while not all_discovered and restart_times != 0:
+ restart_times -= 1
+ for blade in self.get_not_discovered_blades():
+ self.dha.node_reset(blade)
+ with self.ssh:
+ all_discovered = self.discovery_waiting_loop(discovered_macs)
+
+ if not all_discovered:
+ err('Not all blades have been discovered: %s'
+ % self.not_discovered_blades_summary())
+
+ with io.open(self.updated_dea_file) as stream:
+ updated_dea = yaml.load(stream)
+ updated_dea.update({'blade_node_map': self.blade_node_dict})
+ with io.open(self.updated_dea_file, 'w') as stream:
+ yaml.dump(updated_dea, stream, default_flow_style=False)
+
+ def discovery_waiting_loop(self, discovered_macs):
+ WAIT_LOOP = 360
+ SLEEP_TIME = 10
+ all_discovered = False
+ for i in range(WAIT_LOOP):
+ node_list = parse(self.ssh.exec_cmd('fuel node list'))
+ if node_list:
+ self.node_discovery(node_list, discovered_macs)
+ if self.all_blades_discovered():
+ all_discovered = True
+ break
+ else:
+ time.sleep(SLEEP_TIME)
+ return all_discovered
+
+ def node_discovery(self, node_list, discovered_macs):
+ for node in node_list:
+ if (node[N['status']] == 'discover' and
+ (node[N['online']] == 'True' or
+ node[N['online']] == '1') and
+ node[N['mac']] not in discovered_macs):
+ discovered_macs.append(node[N['mac']])
+ blade = self.find_mac_in_dict(node[N['mac']])
+ if blade:
+ log('Blade %s discovered as Node %s with MAC %s'
+ % (blade, node[N['id']], node[N['mac']]))
+ self.blade_node_dict[blade] = int(node[N['id']])
+
+ def find_mac_in_dict(self, mac):
+ for blade, mac_list in self.macs_per_blade.iteritems():
+ if mac in mac_list:
+ return blade
+
+ def all_blades_discovered(self):
+ for blade, node_id in self.blade_node_dict.iteritems():
+ if not node_id:
+ return False
+ return True
+
+ def not_discovered_blades_summary(self):
+ summary = ''
+ for blade, node_id in self.blade_node_dict.iteritems():
+ if not node_id:
+ summary += '\n[blade %s]' % blade
+ return summary
+
+ def get_not_discovered_blades(self):
+ not_discovered_blades = []
+ for blade, node_id in self.blade_node_dict.iteritems():
+ if not node_id:
+ not_discovered_blades.append(blade)
+ return not_discovered_blades
+
+ def set_boot_order_nodes(self):
+ self.power_off_nodes()
+ self.set_boot_order(['pxe', 'disk'])
+ self.power_on_nodes()
+
+ def get_put_deploy_log(self):
+ with self.ssh as s:
+ s.scp_get("deploy-*", local=self.deploy_log)
+
+ def deploy(self):
+
+ self.set_boot_order_nodes()
+
+ self.check_prerequisites()
+
+ self.get_mac_addresses()
+
+ self.wait_for_discovered_blades()
+
+ self.merge_plugin_config_files_to_dea_file()
+
+ self.upload_cloud_deployment_files()
+
+ delete(self.updated_dea_file)
+
+ rc = self.run_cloud_deploy(CLOUD_DEPLOY_FILE)
+
+ self.get_put_deploy_log()
+
+ return rc
diff --git a/deploy/dha.py b/deploy/dha.py
new file mode 100644
index 000000000..3f09da40a
--- /dev/null
+++ b/deploy/dha.py
@@ -0,0 +1,38 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+
+from dha_adapters.libvirt_adapter import LibvirtAdapter
+from dha_adapters.ipmi_adapter import IpmiAdapter
+from dha_adapters.hp_adapter import HpAdapter
+from dha_adapters.amt_adapter import AmtAdapter
+from dha_adapters.zte_adapter import ZteAdapter
+
+class DeploymentHardwareAdapter(object):
+
+ def __new__(cls, yaml_path):
+ with io.open(yaml_path) as yaml_file:
+ dha_struct = yaml.load(yaml_file)
+ type = dha_struct['adapter']
+
+ if cls is DeploymentHardwareAdapter:
+ if type == 'libvirt':
+ return LibvirtAdapter(yaml_path)
+ if type == 'ipmi':
+ return IpmiAdapter(yaml_path)
+ if type == 'hp':
+ return HpAdapter(yaml_path)
+ if type == 'amt':
+ return AmtAdapter(yaml_path)
+ if type == 'zte':
+ return ZteAdapter(yaml_path)
+ return super(DeploymentHardwareAdapter, cls).__new__(cls)
diff --git a/deploy/dha_adapters/__init__.py b/deploy/dha_adapters/__init__.py
new file mode 100644
index 000000000..fb73157f9
--- /dev/null
+++ b/deploy/dha_adapters/__init__.py
@@ -0,0 +1,8 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
diff --git a/deploy/dha_adapters/amt_adapter.py b/deploy/dha_adapters/amt_adapter.py
new file mode 100644
index 000000000..02025b9dd
--- /dev/null
+++ b/deploy/dha_adapters/amt_adapter.py
@@ -0,0 +1,100 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# liyi.meng@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from hardware_adapter import HardwareAdapter
+
+from common import (
+ log,
+ exec_cmd,
+ err,
+)
+
+
+'''
+This is hardware adapter for Intel AMT based system. It use amttool to interact
+ with the targeting node. It dose not support vPro v9. if the targeting system
+ is v9 or later, we need to consider a new adpater with using lib
+ like https://github.com/sdague/amt
+'''
+class AmtAdapter(HardwareAdapter):
+
+ def __init__(self, yaml_path):
+ super(AmtAdapter, self).__init__(yaml_path)
+ #amttool dose not allow you change bios setting permanently.
+ # so we have to make a workaround to make it IPMI like.
+ self.boot_order = {}
+
+ def node_get_boot_dev(self, node_id):
+ if node_id in self.boot_order:
+ dev = self.boot_order[node_id][0]
+ if dev == 'pxe':
+ return 'PXE-boot'
+ elif dev == 'iso':
+ return 'cd-boot'
+ elif dev == 'disk':
+ return 'HD-boot'
+ else:
+ return 'HD-boot'
+
+ def get_access_info(self, node_id):
+ ip = self.get_node_property(node_id, 'amtIp')
+ username = self.get_node_property(node_id, 'amtUser')
+ password = self.get_node_property(node_id, 'amtPass')
+ return ip, username, password
+
+ def amt_cmd(self, node_id):
+ ip, username, password = self.get_access_info(node_id)
+ # We first Setup password for amttool, then use ping to wake up the node over LAN
+ cmd = 'export AMT_PASSWORD={0};' \
+ 'ping {1} -W 5 -c 1 -q;' \
+ 'yes | amttool {1}'.format(password, ip)
+ return cmd
+
+ def get_node_pxe_mac(self, node_id):
+ mac_list = []
+ mac_list.append(self.get_node_property(node_id, 'pxeMac').lower())
+ return mac_list
+
+ def node_power_on(self, node_id):
+ log('Power ON Node %s' % node_id)
+ cmd_prefix = self.amt_cmd(node_id)
+ resp, ret = exec_cmd('{0} info'.format(cmd_prefix), check=False)
+ if 'Powerstate: S0' not in resp:
+ dev = self.node_get_boot_dev(node_id)
+ resp, ret = exec_cmd('{0} powerup {1}'.format(cmd_prefix, dev), check=False)
+ if 'pt_status: success' not in resp:
+ err('Could Not Power ON Node %s' % node_id)
+
+ def node_power_off(self, node_id):
+ log('Power OFF Node %s' % node_id)
+ cmd_prefix = self.amt_cmd(node_id)
+ resp, ret = exec_cmd('{0} info'.format(cmd_prefix), check=False)
+ if "Powerstate: S0" in resp:
+ resp, ret = exec_cmd('{0} powerdown'.format(cmd_prefix), check=False)
+ if 'pt_status: success' not in resp:
+ err('Could Not Power OFF Node %s' % node_id)
+
+ def node_reset(self, node_id):
+ log('RESET Node %s' % node_id)
+ cmd_prefix = self.amt_cmd(node_id)
+ dev = self.node_get_boot_dev(node_id)
+ resp, ret = exec_cmd('{0} info'.format(cmd_prefix), check=False)
+ if 'Powerstate: S0' in resp:
+ resp, ret = exec_cmd('{0} reset {1}'.format(cmd_prefix, dev), check=False)
+ if 'pt_status: success' not in resp:
+ err('Could Not RESET Node %s' % node_id)
+ else:
+ err('Cannot RESET Node %s because it\'s not Active, state: %s'
+ % (node_id, resp))
+
+ def node_set_boot_order(self, node_id, boot_order_list):
+ log('Set boot order %s on Node %s' % (boot_order_list, node_id))
+ self.boot_order[node_id] = boot_order_list
+
diff --git a/deploy/dha_adapters/hardware_adapter.py b/deploy/dha_adapters/hardware_adapter.py
new file mode 100644
index 000000000..aa59581ee
--- /dev/null
+++ b/deploy/dha_adapters/hardware_adapter.py
@@ -0,0 +1,65 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+
+
+class HardwareAdapter(object):
+
+ def __init__(self, yaml_path):
+ self.dha_struct = None
+ self.parse_yaml(yaml_path)
+
+ def parse_yaml(self, yaml_path):
+ with io.open(yaml_path) as yaml_file:
+ self.dha_struct = yaml.load(yaml_file)
+
+ def get_adapter_type(self):
+ return self.dha_struct['adapter']
+
+ def get_all_node_ids(self):
+ node_ids = []
+ for node in self.dha_struct['nodes']:
+ node_ids.append(node['id'])
+ node_ids.sort()
+ return node_ids
+
+ def get_fuel_node_id(self):
+ for node in self.dha_struct['nodes']:
+ if 'isFuel' in node and node['isFuel']:
+ return node['id']
+
+ def get_node_ids(self):
+ node_ids = []
+ fuel_node_id = self.get_fuel_node_id()
+ for node in self.dha_struct['nodes']:
+ if node['id'] != fuel_node_id:
+ node_ids.append(node['id'])
+ node_ids.sort()
+ return node_ids
+
+ def get_node_property(self, node_id, property_name):
+ for node in self.dha_struct['nodes']:
+ if node['id'] == node_id and property_name in node:
+ return node[property_name]
+
+ def get_fuel_access(self):
+ for node in self.dha_struct['nodes']:
+ if 'isFuel' in node and node['isFuel']:
+ return node['username'], node['password']
+
+ def get_disks(self):
+ return self.dha_struct['disks']
+
+ def get_vm_definition(self, role):
+ vm_definition = self.dha_struct.get('define_vms')
+ if vm_definition:
+ return vm_definition.get(role)
diff --git a/deploy/dha_adapters/hp_adapter.py b/deploy/dha_adapters/hp_adapter.py
new file mode 100644
index 000000000..6434da868
--- /dev/null
+++ b/deploy/dha_adapters/hp_adapter.py
@@ -0,0 +1,37 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from ipmi_adapter import IpmiAdapter
+from ssh_client import SSHClient
+
+from common import (
+ log,
+)
+
+DEV = {'pxe': 'bootsource5',
+ 'disk': 'bootsource3',
+ 'iso': 'bootsource1'}
+
+ROOT = '/system1/bootconfig1'
+
+
+class HpAdapter(IpmiAdapter):
+
+ def __init__(self, yaml_path):
+ super(HpAdapter, self).__init__(yaml_path)
+
+ def node_set_boot_order(self, node_id, boot_order_list):
+ log('Set boot order %s on Node %s' % (boot_order_list, node_id))
+ ip, username, password, ipmiport = self.get_access_info(node_id)
+ ssh = SSHClient(ip, username, password)
+ with ssh as s:
+ for order, dev in enumerate(boot_order_list):
+ s.exec_cmd('set %s/%s bootorder=%s'
+ % (ROOT, DEV[dev], order + 1))
diff --git a/deploy/dha_adapters/ipmi_adapter.py b/deploy/dha_adapters/ipmi_adapter.py
new file mode 100644
index 000000000..7cc930554
--- /dev/null
+++ b/deploy/dha_adapters/ipmi_adapter.py
@@ -0,0 +1,114 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# (c) 2016 Enea Software AB
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import time
+from hardware_adapter import HardwareAdapter
+
+from common import (
+ log,
+ exec_cmd,
+ err,
+)
+
+
+class IpmiAdapter(HardwareAdapter):
+
+ def __init__(self, yaml_path, attempts=20, delay=3):
+ super(IpmiAdapter, self).__init__(yaml_path)
+ self.attempts = attempts
+ self.delay = delay
+
+ def get_access_info(self, node_id):
+ ip = self.get_node_property(node_id, 'ipmiIp')
+ username = self.get_node_property(node_id, 'ipmiUser')
+ password = self.get_node_property(node_id, 'ipmiPass')
+ ipmiport = self.get_node_property(node_id, 'ipmiPort')
+ return ip, username, password, ipmiport
+
+ def ipmi_cmd(self, node_id):
+ ip, username, password, ipmiport = self.get_access_info(node_id)
+ cmd = 'ipmitool -I lanplus -A password'
+ cmd += ' -H %s -U %s -P %s' % (ip, username, password)
+ if ipmiport:
+ cmd += ' -p %d' % int(ipmiport)
+ return cmd
+
+ def get_node_pxe_mac(self, node_id):
+ mac_list = []
+ mac_list.append(self.get_node_property(node_id, 'pxeMac').lower())
+ return mac_list
+
+ def node_get_state(self, node_id):
+ state = exec_cmd('%s chassis power status' % self.ipmi_cmd(node_id),
+ attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
+ return state
+
+ def _node_power_cmd(self, node_id, cmd):
+ expected = 'Chassis Power is %s' % cmd
+ if self.node_get_state(node_id) == expected:
+ return
+
+ pow_cmd = '%s chassis power %s' % (self.ipmi_cmd(node_id), cmd)
+ exec_cmd(pow_cmd, attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
+
+ attempts = self.attempts
+ while attempts:
+ time.sleep(self.delay)
+ state = self.node_get_state(node_id)
+ attempts -= 1
+ if state == expected:
+ return
+ elif attempts != 0:
+ # reinforce our will, but allow the command to fail,
+ # we know our message got across once already...
+ exec_cmd(pow_cmd, check=False, mask_args=[8,10])
+
+ err('Could not set chassis %s for node %s' % (cmd, node_id))
+
+ def node_power_on(self, node_id):
+ log('Power ON Node %s' % node_id)
+ self._node_power_cmd(node_id, 'on')
+
+ def node_power_off(self, node_id):
+ log('Power OFF Node %s' % node_id)
+ self._node_power_cmd(node_id, 'off')
+
+ def node_reset(self, node_id):
+ log('RESET Node %s' % node_id)
+ cmd = '%s chassis power reset' % self.ipmi_cmd(node_id)
+ exec_cmd(cmd, attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
+
+ def node_set_boot_order(self, node_id, boot_order_list):
+ log('Set boot order %s on Node %s' % (boot_order_list, node_id))
+ boot_order_list.reverse()
+ cmd_prefix = self.ipmi_cmd(node_id)
+ for dev in boot_order_list:
+ if dev == 'pxe':
+ exec_cmd('%s chassis bootdev pxe options=persistent'
+ % cmd_prefix, attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
+ elif dev == 'iso':
+ exec_cmd('%s chassis bootdev cdrom' % cmd_prefix,
+ attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
+ elif dev == 'disk':
+ exec_cmd('%s chassis bootdev disk options=persistent'
+ % cmd_prefix, attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
diff --git a/deploy/dha_adapters/libvirt_adapter.py b/deploy/dha_adapters/libvirt_adapter.py
new file mode 100644
index 000000000..466f134ae
--- /dev/null
+++ b/deploy/dha_adapters/libvirt_adapter.py
@@ -0,0 +1,173 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from lxml import etree
+from hardware_adapter import HardwareAdapter
+import tempfile
+import os
+
+from common import (
+ log,
+ exec_cmd,
+ err,
+ delete,
+)
+
+DEV = {'pxe': 'network',
+ 'disk': 'hd',
+ 'iso': 'cdrom'}
+
+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'
+
+class LibvirtAdapter(HardwareAdapter):
+
+ def __init__(self, yaml_path):
+ super(LibvirtAdapter, self).__init__(yaml_path)
+ self.parser = etree.XMLParser(remove_blank_text=True)
+
+ 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)
+ if state == 'running':
+ exec_cmd('virsh destroy %s' % 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)
+ if state == 'shut off':
+ exec_cmd('virsh start %s' % 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)
+
+ def translate(self, boot_order_list):
+ translated = []
+ for boot_dev in boot_order_list:
+ if boot_dev in DEV:
+ translated.append(DEV[boot_dev])
+ else:
+ err('Boot device %s not recognized' % boot_dev)
+ return translated
+
+ def node_set_boot_order(self, node_id, boot_order_list):
+ boot_order_list = self.translate(boot_order_list)
+ 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)
+ xml_dump = etree.fromstring(resp, self.parser)
+ os = xml_dump.xpath('/domain/os')
+ for o in os:
+ for bootelem in ['boot', 'bootmenu']:
+ boot = o.xpath(bootelem)
+ for b in boot:
+ o.remove(b)
+ for dev in boot_order_list:
+ b = etree.Element('boot')
+ b.set('dev', dev)
+ o.append(b)
+ bmenu = etree.Element('bootmenu')
+ bmenu.set('enable', 'no')
+ o.append(bmenu)
+ tree = etree.ElementTree(xml_dump)
+ 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)
+ 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)
+ xml_dump = etree.fromstring(resp)
+ disks = xml_dump.xpath('/domain/devices/disk')
+ for disk in disks:
+ if disk.get('device') == 'disk':
+ sources = disk.xpath('source')
+ for source in sources:
+ disk_file = source.get('file')
+ disk_size = exec_cmd('qemu-img info '
+ '%s |grep \"virtual size:\"'
+ % disk_file).split()[2]
+ delete(disk_file)
+ exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_file,
+ disk_size))
+
+ 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)
+
+ 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))
+
+ 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)
+ xml_dump = etree.fromstring(resp)
+ interfaces = xml_dump.xpath('/domain/devices/interface')
+ for interface in interfaces:
+ macs = interface.xpath('mac')
+ for mac in macs:
+ 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)
+ xml_dump = etree.fromstring(resp)
+ disks = xml_dump.xpath('/domain/devices/disk')
+ for disk in disks:
+ if disk.get('device') == device_type:
+ targets = disk.xpath('target')
+ for target in targets:
+ device = target.get('dev')
+ if device:
+ return device
+
+ def get_virt_net_conf_dir(self):
+ return self.dha_struct['virtNetConfDir']
+
+ def upload_iso(self, 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',
+ size=size, format_type='raw')
+ fd, fname = tempfile.mkstemp(text=True, suffix='deploy')
+ os.write(fd, vol_xml)
+ os.close(fd)
+
+ 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 vol-upload %s %s' % (vol_path, iso_file),
+ attempts=5, delay=10, verbose=True)
+
+ delete(fname)
+
+ return vol_path
diff --git a/deploy/dha_adapters/zte_adapter.py b/deploy/dha_adapters/zte_adapter.py
new file mode 100644
index 000000000..da651ca15
--- /dev/null
+++ b/deploy/dha_adapters/zte_adapter.py
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2016 Ericsson AB, ZTE and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import time
+from ipmi_adapter import IpmiAdapter
+
+from common import (
+ log,
+ exec_cmd,
+ err,
+)
+
+
+class ZteAdapter(IpmiAdapter):
+
+ def __init__(self, yaml_path, attempts=100):
+ super(ZteAdapter, self).__init__(yaml_path, attempts)
+
+ def node_reset(self, node_id):
+ log('RESET Node %s' % node_id)
+ cmd = '%s chassis power cycle' % self.ipmi_cmd(node_id)
+ exec_cmd(cmd, attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
+
diff --git a/deploy/environments/__init__.py b/deploy/environments/__init__.py
new file mode 100644
index 000000000..fb73157f9
--- /dev/null
+++ b/deploy/environments/__init__.py
@@ -0,0 +1,8 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
diff --git a/deploy/environments/execution_environment.py b/deploy/environments/execution_environment.py
new file mode 100644
index 000000000..3812902aa
--- /dev/null
+++ b/deploy/environments/execution_environment.py
@@ -0,0 +1,100 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from lxml import etree
+from dha_adapters.libvirt_adapter import LibvirtAdapter
+
+from common import (
+ exec_cmd,
+ log,
+ delete,
+)
+
+
+class ExecutionEnvironment(object):
+
+ def __init__(self, storage_dir, dha_file, root_dir):
+ self.storage_dir = storage_dir
+ self.dha = LibvirtAdapter(dha_file)
+ self.root_dir = root_dir
+ self.parser = etree.XMLParser(remove_blank_text=True)
+ self.fuel_node_id = self.dha.get_fuel_node_id()
+
+ 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)
+ if c:
+ return
+ self.undefine_vm_delete_disk(r, vm_name)
+
+ def undefine_vm_delete_disk(self, printout, vm_name):
+ disk_files = []
+ xml_dump = etree.fromstring(printout, self.parser)
+ disks = xml_dump.xpath('/domain/devices/disk')
+ for disk in disks:
+ sources = disk.xpath('source')
+ for source in sources:
+ source_file = source.get('file')
+ 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)
+
+ def overwrite_xml(self, vm_xml, vm_definition_overwrite):
+ if not vm_definition_overwrite:
+ return
+ for key, value in vm_definition_overwrite.iteritems():
+ if key == 'attribute_equlas':
+ continue
+ if key == 'value':
+ vm_xml.text = str(value)
+ return
+ if key == 'attribute':
+ for attr_key, attr_value in value.iteritems():
+ vm_xml.set(attr_key, str(attr_value))
+ return
+
+ if isinstance(value, dict):
+ only_when_attribute = value.get('attribute_equlas')
+ for xml_element in vm_xml.xpath(key):
+ if only_when_attribute:
+ for attr_key, attr_value in \
+ only_when_attribute.iteritems():
+ if attr_value != xml_element.get(attr_key):
+ continue
+ self.overwrite_xml(xml_element, value)
+
+ def define_vm(self, vm_name, temp_vm_file, disk_path,
+ vm_definition_overwrite):
+ log('Creating VM %s with disks %s' % (vm_name, disk_path))
+ with open(temp_vm_file) as f:
+ vm_xml = etree.parse(f)
+ names = vm_xml.xpath('/domain/name')
+ for name in names:
+ name.text = vm_name
+ uuids = vm_xml.xpath('/domain/uuid')
+ for uuid in uuids:
+ uuid.getparent().remove(uuid)
+ self.overwrite_xml(vm_xml.xpath('/domain')[0],
+ vm_definition_overwrite)
+ disks = vm_xml.xpath('/domain/devices/disk')
+ for disk in disks:
+ if (disk.get('type') == 'file' and
+ disk.get('device') == 'disk'):
+ sources = disk.xpath('source')
+ for source in sources:
+ disk.remove(source)
+ source = etree.Element('source')
+ source.set('file', disk_path)
+ 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)
diff --git a/deploy/environments/libvirt_environment.py b/deploy/environments/libvirt_environment.py
new file mode 100644
index 000000000..c9fa41fd7
--- /dev/null
+++ b/deploy/environments/libvirt_environment.py
@@ -0,0 +1,107 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from lxml import etree
+import glob
+from execution_environment import ExecutionEnvironment
+import tempfile
+
+from common import (
+ exec_cmd,
+ log,
+ check_dir_exists,
+ check_file_exists,
+ delete,
+)
+
+
+class LibvirtEnvironment(ExecutionEnvironment):
+
+ def __init__(self, storage_dir, dha_file, dea, root_dir):
+ super(LibvirtEnvironment, self).__init__(
+ storage_dir, dha_file, root_dir)
+ self.dea = dea
+ self.network_dir = '%s/%s' % (self.root_dir,
+ self.dha.get_virt_net_conf_dir())
+ 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):
+ role = self.dea.get_node_main_role(node_id, self.fuel_node_id)
+ disk_size = disk_sizes[role]
+ exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size))
+
+ def create_vms(self):
+ temp_dir = tempfile.mkdtemp()
+ disk_sizes = self.dha.get_disks()
+ for node_id in self.node_ids:
+ vm_name = self.dha.get_node_property(node_id, 'libvirtName')
+ vm_template = '%s/%s' % (self.root_dir,
+ self.dha.get_node_property(
+ 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)
+ 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)
+ delete(temp_dir)
+
+ def start_vms(self):
+ for node_id in self.node_ids:
+ self.dha.node_power_on(node_id)
+
+ def create_networks(self):
+ for net_file in glob.glob('%s/*' % self.network_dir):
+ exec_cmd('virsh net-define %s' % net_file)
+ for net in self.net_names:
+ log('Creating network %s' % net)
+ exec_cmd('virsh net-autostart %s' % net)
+ exec_cmd('virsh net-start %s' % net)
+
+ def delete_networks(self):
+ for net in self.net_names:
+ log('Deleting network %s' % net)
+ exec_cmd('virsh net-destroy %s' % net, False)
+ exec_cmd('virsh net-undefine %s' % net, False)
+
+ def get_net_name(self, net_file):
+ with open(net_file) as f:
+ net_xml = etree.parse(f)
+ name_list = net_xml.xpath('/network/name')
+ for name in name_list:
+ net_name = name.text
+ return net_name
+
+ def collect_net_names(self):
+ net_list = []
+ for net_file in glob.glob('%s/*' % self.network_dir):
+ name = self.get_net_name(net_file)
+ net_list.append(name)
+ return net_list
+
+ def delete_vms(self):
+ for node_id in self.node_ids:
+ self.delete_vm(node_id)
+
+
+ def setup_environment(self):
+ check_dir_exists(self.network_dir)
+ self.cleanup_environment()
+ self.create_networks()
+ self.create_vms()
+ self.start_vms()
+
+ def cleanup_environment(self):
+ self.delete_vms()
+ self.delete_networks()
diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
new file mode 100644
index 000000000..b1a76e479
--- /dev/null
+++ b/deploy/environments/virtual_fuel.py
@@ -0,0 +1,143 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+from lxml import etree
+from execution_environment import ExecutionEnvironment
+import tempfile
+import os
+import re
+import time
+
+from common import (
+ exec_cmd,
+ check_file_exists,
+ check_if_root,
+ delete,
+ log,
+)
+
+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 VirtualFuel(ExecutionEnvironment):
+
+ def __init__(self, storage_dir, pxe_bridge, dha_file, root_dir):
+ super(VirtualFuel, self).__init__(storage_dir, dha_file, root_dir)
+ self.pxe_bridge = pxe_bridge
+ self.temp_dir = tempfile.mkdtemp()
+ self.vm_name = self.dha.get_node_property(self.fuel_node_id,
+ 'libvirtName')
+ self.vm_template = '%s/%s' % (self.root_dir,
+ self.dha.get_node_property(
+ self.fuel_node_id, 'libvirtTemplate'))
+ check_file_exists(self.vm_template)
+ with open(self.vm_template) as f:
+ self.vm_xml = etree.parse(f)
+
+ self.temp_vm_file = '%s/%s' % (self.temp_dir, self.vm_name)
+ self.update_vm_template_file()
+
+ def __del__(self):
+ delete(self.temp_dir)
+
+ def update_vm_template_file(self):
+ with open(self.temp_vm_file, "wc") as f:
+ self.vm_xml.write(f, pretty_print=True, xml_declaration=True)
+
+ def del_vm_nics(self):
+ interfaces = self.vm_xml.xpath('/domain/devices/interface')
+ for interface in interfaces:
+ interface.getparent().remove(interface)
+
+ def add_vm_nic(self, bridge):
+ interface = etree.Element('interface')
+ interface.set('type', 'bridge')
+ source = etree.SubElement(interface, 'source')
+ source.set('bridge', bridge)
+ model = etree.SubElement(interface, 'model')
+ model.set('type', 'virtio')
+
+ devices = self.vm_xml.xpath('/domain/devices')
+ if devices:
+ device = devices[0]
+ device.append(interface)
+ else:
+ err('No devices!')
+
+ def create_volume(self, pool, name, su, img_type='qcow2'):
+ log('Creating image using Libvirt volumes in pool %s, name: %s' %
+ (pool, name))
+ 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(self.temp_dir, '%s_vol.xml' % name)
+ 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))
+
+ delete(fname)
+
+ return vol_path
+
+ def create_image(self, disk_path, disk_size):
+ if os.environ.get('LIBVIRT_DEFAULT_URI') == None:
+ exec_cmd('qemu-img create -f qcow2 %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)
+
+ return disk_path
+
+ def create_vm(self):
+ stamp = time.strftime("%Y%m%d%H%M%S")
+ disk_path = '%s/%s-%s.raw' % (self.storage_dir, self.vm_name, stamp)
+ disk_sizes = self.dha.get_disks()
+ disk_size = disk_sizes['fuel']
+ disk_path = self.create_image(disk_path, disk_size)
+
+ self.del_vm_nics()
+ for bridge in self.pxe_bridge:
+ self.add_vm_nic(bridge)
+ self.update_vm_template_file()
+
+ vm_definition_overwrite = self.dha.get_vm_definition('fuel')
+
+ self.define_vm(self.vm_name, self.temp_vm_file, disk_path,
+ vm_definition_overwrite)
+
+ def setup_environment(self):
+ check_if_root()
+ self.cleanup_environment()
+ self.create_vm()
+
+ def cleanup_environment(self):
+ self.delete_vm(self.fuel_node_id)
diff --git a/deploy/execution_environment.py b/deploy/execution_environment.py
new file mode 100644
index 000000000..b8e861c4a
--- /dev/null
+++ b/deploy/execution_environment.py
@@ -0,0 +1,37 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import yaml
+import io
+import os
+
+from environments.libvirt_environment import LibvirtEnvironment
+from environments.virtual_fuel import VirtualFuel
+
+
+class ExecutionEnvironment(object):
+
+ def __new__(cls, storage_dir, pxe_bridge, dha_path, dea):
+
+ with io.open(dha_path) as yaml_file:
+ dha_struct = yaml.load(yaml_file)
+
+ type = dha_struct['adapter']
+
+ root_dir = os.path.dirname(os.path.realpath(__file__))
+
+ if cls is ExecutionEnvironment:
+ if type == 'libvirt':
+ return LibvirtEnvironment(storage_dir, dha_path, dea, root_dir)
+
+ if type in ['ipmi', 'hp', 'amt', 'zte']:
+ return VirtualFuel(storage_dir, pxe_bridge, dha_path, root_dir)
+
+ return super(ExecutionEnvironment, cls).__new__(cls)
diff --git a/deploy/fuel_patch/ks.cfg.patch b/deploy/fuel_patch/ks.cfg.patch
new file mode 100644
index 000000000..8c9cebc0f
--- /dev/null
+++ b/deploy/fuel_patch/ks.cfg.patch
@@ -0,0 +1,19 @@
+*** ks.cfg.orig 2016-01-25 08:56:16.406241267 +0100
+--- ks.cfg 2016-01-25 14:31:11.417761494 +0100
+***************
+*** 98,104 ****
+ default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+ installdrive=${installdrive:-undefined}
+! forceformat=${forceformat:-no}
+ for I in $(cat /proc/cmdline); do
+ case "$I" in
+ *=*)
+--- 98,104 ----
+ default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+ installdrive=${installdrive:-undefined}
+! forceformat=${forceformat:-yes}
+ for I in $(cat /proc/cmdline); do
+ case "$I" in
+ *=*)
diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py
new file mode 100644
index 000000000..a0e28b033
--- /dev/null
+++ b/deploy/install_fuel_master.py
@@ -0,0 +1,222 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+import time
+import os
+import glob
+from ssh_client import SSHClient
+from dha_adapters.libvirt_adapter import LibvirtAdapter
+
+from common import (
+ log,
+ err,
+ clean,
+ delete,
+)
+
+TRANSPLANT_FUEL_SETTINGS = 'transplant_fuel_settings.py'
+BOOTSTRAP_ADMIN = 'bootstrap_admin_node'
+FUEL_CLIENT_CONFIG = '/etc/fuel/client/config.yaml'
+PLUGINS_DIR = '~/plugins'
+LOCAL_PLUGIN_FOLDER = '/opt/opnfv'
+IGNORABLE_FUEL_ERRORS = ['does not update installed package',
+ 'Couldn\'t resolve host']
+
+
+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):
+ self.dea_file = dea_file
+ self.dha = LibvirtAdapter(dha_file)
+ self.fuel_ip = fuel_ip
+ self.fuel_username = fuel_username
+ self.fuel_password = fuel_password
+ self.fuel_node_id = fuel_node_id
+ self.iso_file = iso_file
+ self.iso_dir = os.path.dirname(self.iso_file)
+ self.work_dir = work_dir
+ self.fuel_plugins_dir = fuel_plugins_dir
+ self.no_plugins = no_plugins
+ self.file_dir = os.path.dirname(os.path.realpath(__file__))
+ self.ssh = SSHClient(self.fuel_ip, self.fuel_username,
+ self.fuel_password)
+
+ def install(self):
+ log('Start Fuel Installation')
+
+ self.dha.node_power_off(self.fuel_node_id)
+
+ if os.environ.get('LIBVIRT_DEFAULT_URI'):
+ log('Upload ISO to pool')
+ self.iso_file = self.dha.upload_iso(self.iso_file)
+ else:
+ log('Zero the MBR')
+ self.dha.node_zero_mbr(self.fuel_node_id)
+
+ self.dha.node_set_boot_order(self.fuel_node_id, ['disk', 'iso'])
+
+ try:
+ self.proceed_with_installation()
+ except Exception as e:
+ self.post_install_cleanup()
+ err(e)
+
+ def proceed_with_installation(self):
+ log('Eject ISO')
+ self.dha.node_eject_iso(self.fuel_node_id)
+
+ log('Insert ISO %s' % self.iso_file)
+ self.dha.node_insert_iso(self.fuel_node_id, self.iso_file)
+
+ self.dha.node_power_on(self.fuel_node_id)
+
+ log('Waiting for Fuel master to accept SSH')
+ self.wait_for_node_up()
+
+ log('Wait until Fuel menu is up')
+ fuel_menu_pid = self.wait_until_fuel_menu_up()
+
+ log('Inject our own astute.yaml and fuel_bootstrap_cli.yaml settings')
+ self.inject_own_astute_and_bootstrap_yaml()
+
+ log('Let the Fuel deployment continue')
+ log('Found FUEL menu as PID %s, now killing it' % fuel_menu_pid)
+ self.ssh_exec_cmd('kill %s' % fuel_menu_pid, False)
+
+ log('Wait until installation is complete')
+ self.wait_until_installation_completed()
+
+ log('Waiting for one minute for Fuel to stabilize')
+ time.sleep(60)
+
+ self.delete_deprecated_fuel_client_config()
+
+ if not self.no_plugins:
+
+ self.collect_plugin_files()
+
+ self.install_plugins()
+
+ self.post_install_cleanup()
+
+ log('Fuel Master installed successfully !')
+
+ def collect_plugin_files(self):
+ with self.ssh as s:
+ s.exec_cmd('mkdir %s' % PLUGINS_DIR)
+ if self.fuel_plugins_dir:
+ for f in glob.glob('%s/*.rpm' % self.fuel_plugins_dir):
+ s.scp_put(f, PLUGINS_DIR)
+
+ def install_plugins(self):
+ log('Installing Fuel Plugins')
+ plugin_files = []
+ with self.ssh as s:
+ for plugin_location in [PLUGINS_DIR, LOCAL_PLUGIN_FOLDER]:
+ s.exec_cmd('mkdir -p %s' % plugin_location)
+ r = s.exec_cmd('find %s -type f -name \'*.rpm\''
+ % plugin_location)
+ plugin_files.extend(r.splitlines())
+ for f in plugin_files:
+ log('Found plugin %s, installing ...' % f)
+ r, e = s.exec_cmd('fuel plugins --install %s' % f, False)
+ printout = r + e if e else r
+ if e and all([err not in printout
+ for err in IGNORABLE_FUEL_ERRORS]):
+ raise Exception('Installation of Fuel Plugin %s '
+ 'failed: %s' % (f, e))
+
+ def wait_for_node_up(self):
+ WAIT_LOOP = 240
+ SLEEP_TIME = 10
+ success = False
+ for i in range(WAIT_LOOP):
+ try:
+ self.ssh.open()
+ success = True
+ break
+ except Exception:
+ log('Trying to SSH into Fuel VM %s ... sleeping %s seconds'
+ % (self.fuel_ip, SLEEP_TIME))
+ time.sleep(SLEEP_TIME)
+ finally:
+ self.ssh.close()
+
+ if not success:
+ raise Exception('Could not SSH into Fuel VM %s' % self.fuel_ip)
+
+ def wait_until_fuel_menu_up(self):
+ WAIT_LOOP = 60
+ SLEEP_TIME = 10
+ CMD = 'pgrep -f fuelmenu'
+ fuel_menu_pid = None
+ with self.ssh:
+ for i in range(WAIT_LOOP):
+ ret = self.ssh.exec_cmd(CMD)
+ fuel_menu_pid = ret.strip()
+ if not fuel_menu_pid:
+ time.sleep(SLEEP_TIME)
+ else:
+ break
+ if not fuel_menu_pid:
+ raise Exception('Could not find the Fuel Menu Process ID')
+ return fuel_menu_pid
+
+ def ssh_exec_cmd(self, cmd, check=True):
+ with self.ssh:
+ ret = self.ssh.exec_cmd(cmd, check=check)
+ return ret
+
+ def inject_own_astute_and_bootstrap_yaml(self):
+ with self.ssh as s:
+ s.exec_cmd('rm -rf %s' % self.work_dir, False)
+ s.exec_cmd('mkdir %s' % self.work_dir)
+ s.scp_put(self.dea_file, self.work_dir)
+ 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/transplant_fuel_settings.py'
+ % self.file_dir, self.work_dir)
+ log('Modifying Fuel astute')
+ s.run('python %s/%s %s/%s'
+ % (self.work_dir, TRANSPLANT_FUEL_SETTINGS,
+ self.work_dir, os.path.basename(self.dea_file)))
+
+ def wait_until_installation_completed(self):
+ WAIT_LOOP = 360
+ SLEEP_TIME = 10
+ CMD = 'pgrep -f %s' % BOOTSTRAP_ADMIN
+
+ install_completed = False
+ with self.ssh:
+ for i in range(WAIT_LOOP):
+ ret = self.ssh.exec_cmd(CMD)
+ if not ret:
+ install_completed = True
+ break
+ else:
+ time.sleep(SLEEP_TIME)
+
+ if not install_completed:
+ raise Exception('Fuel installation did not complete')
+
+ def post_install_cleanup(self):
+ log('Eject ISO file %s' % self.iso_file)
+ self.dha.node_eject_iso(self.fuel_node_id)
+ delete(self.iso_dir)
+
+ def delete_deprecated_fuel_client_config(self):
+ with self.ssh as s:
+ response, error = s.exec_cmd('fuel -v', False)
+ if (error and
+ 'DEPRECATION WARNING' in error and FUEL_CLIENT_CONFIG in error):
+ log('Delete deprecated fuel client config %s' % FUEL_CLIENT_CONFIG)
+ with self.ssh as s:
+ s.exec_cmd('rm %s' % FUEL_CLIENT_CONFIG, False)
diff --git a/deploy/reap.py b/deploy/reap.py
new file mode 100644
index 000000000..69c98d10c
--- /dev/null
+++ b/deploy/reap.py
@@ -0,0 +1,413 @@
+#!/usr/bin/python
+###############################################################################
+# Copyright (c) 2015, 2016 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import time
+import os
+import yaml
+import glob
+import shutil
+import tempfile
+import re
+import netaddr
+import templater
+
+from common import (
+ N,
+ E,
+ R,
+ ArgParser,
+ exec_cmd,
+ parse,
+ err,
+ log,
+ delete,
+ commafy,
+)
+
+DEA_1 = '''
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: {date}
+comment: {comment}
+'''
+
+DHA_1 = '''
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version: 1.1
+created: {date}
+comment: {comment}
+
+# Adapter to use for this definition
+# adapter: [ipmi|libvirt]
+adapter:
+
+# Node list.
+# Mandatory properties are id and role.
+# All other properties are adapter specific.
+# For Non-Fuel nodes controlled by:
+# - ipmi adapter you need to provide:
+# pxeMac
+# ipmiIp
+# ipmiUser
+# ipmiPass
+# and you *MAY* provide (optional, not added by reap.py):
+# ipmiPort
+# - libvirt adapter you need to provide:
+# libvirtName: <whatever>
+# libvirtTemplate: [libvirt/vms/controller.xml | libvirt/vms/compute.xml]
+#
+# For the Fuel Node you need to provide:
+# libvirtName: <whatever>
+# libvirtTemplate: libvirt/vms/fuel.xml
+# isFuel: yes
+# username: root
+# password: r00tme
+'''
+
+DHA_2 = '''
+# Adding the Fuel node as node id {node_id}
+# which may not be correct - please adjust as needed.
+'''
+
+DISKS = {'fuel': '100G',
+ 'controller': '100G',
+ 'compute': '100G'}
+
+
+class Reap(object):
+
+ def __init__(self, dea_file, dha_file, comment, base_dea, template):
+ self.dea_file = dea_file
+ self.dha_file = dha_file
+ self.comment = comment
+ self.base_dea = base_dea
+ self.template = template
+ self.temp_dir = None
+ self.env = None
+ self.env_id = None
+ self.last_node = None
+
+ def get_env(self):
+ env_list = parse(exec_cmd('fuel env'))
+ if len(env_list) == 0:
+ err('No environment deployed')
+ elif len(env_list) > 1:
+ err('More than 1 environment deployed')
+ self.env = env_list[0]
+ self.env_id = self.env[E['id']]
+
+ def download_config(self, config_type):
+ log('Download %s config for environment %s'
+ % (config_type, self.env_id))
+ exec_cmd('fuel %s --env %s --download --dir %s'
+ % (config_type, self.env_id, self.temp_dir))
+
+ def download_node_config(self, nodeid):
+ log('Download node %s config for environment %s to %s'
+ % (nodeid, self.env_id,self.temp_dir))
+ exec_cmd('fuel deployment --node-id %s --env %s --default --dir %s'
+ % (nodeid, self.env_id, self.temp_dir))
+
+ def write(self, file, text, newline=True):
+ mode = 'a' if os.path.isfile(file) else 'w'
+ with open(file, mode) as f:
+ f.write('%s%s' % (text, ('\n' if newline else '')))
+
+ def write_yaml(self, file, data, newline=True):
+ self.write(file, yaml.dump(data, default_flow_style=False).strip(),
+ newline)
+
+ def get_node_by_id(self, node_list, node_id):
+ for node in node_list:
+ if node[N['id']] == node_id:
+ return node
+
+ def reap_interface(self, node_id, interfaces):
+ interface, mac = self.get_interface(node_id)
+ if_name = None
+ if interfaces:
+ if_name = self.check_dict_exists(interfaces, interface)
+ if not if_name:
+ if_name = 'interfaces_%s' % str(len(interfaces) + 1)
+ interfaces[if_name] = interface
+ return if_name, mac
+
+ 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'
+ % (self.temp_dir, self.env_id, node_id))
+ tr_name = None
+ with open(node_file[0]) as f:
+ node_config = yaml.load(f)
+ transformation = {'transformations':
+ node_config['network_scheme']['transformations']}
+ if transformations:
+ tr_name = self.check_dict_exists(transformations, transformation)
+ if not tr_name:
+ tr_name = 'transformations_%s' % str(len(transformations) + 1)
+ transformations[tr_name] = transformation
+ return tr_name
+
+ def check_dict_exists(self, main_dict, dict):
+ for key, val in main_dict.iteritems():
+ if cmp(dict, val) == 0:
+ return key
+
+ def reap_nodes_interfaces_transformations(self):
+ node_list = parse(exec_cmd('fuel node'))
+ real_node_ids = [node[N['id']] for node in node_list]
+ real_node_ids.sort()
+ min_node = real_node_ids[0]
+ interfaces = {}
+ transformations = {}
+ dea_nodes = []
+ dha_nodes = []
+
+ for real_node_id in real_node_ids:
+ node_id = int(real_node_id) - int(min_node) + 1
+ self.last_node = node_id
+ node = self.get_node_by_id(node_list, real_node_id)
+ roles = commafy(node[N['roles']])
+ if not roles:
+ err('Fuel Node %s has no role' % real_node_id)
+ dea_node = {'id': node_id,
+ 'role': roles}
+ dha_node = {'id': node_id}
+ if_name, mac = self.reap_interface(real_node_id, interfaces)
+ log('reap transformation for node %s' % real_node_id)
+ tr_name = self.reap_transformation(real_node_id, roles,
+ transformations)
+ dea_node.update(
+ {'interfaces': if_name,
+ 'transformations': tr_name})
+
+ dha_node.update(
+ {'pxeMac': mac if mac else None,
+ 'ipmiIp': None,
+ 'ipmiUser': None,
+ 'ipmiPass': None,
+ 'libvirtName': None,
+ 'libvirtTemplate': None})
+
+ dea_nodes.append(dea_node)
+ dha_nodes.append(dha_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, transformations)
+ self.reap_fuel_node_info()
+ self.write_yaml(self.dha_file, {'disks': DISKS})
+
+ def reap_fuel_node_info(self):
+ dha_nodes = []
+ dha_node = {
+ 'id': self.last_node + 1,
+ 'libvirtName': None,
+ 'libvirtTemplate': None,
+ 'isFuel': True,
+ 'username': 'root',
+ 'password': 'r00tme'}
+
+ dha_nodes.append(dha_node)
+
+ self.write(self.dha_file, DHA_2.format(node_id=dha_node['id']), False)
+ self.write_yaml(self.dha_file, dha_nodes)
+
+ def reap_environment_info(self):
+ network_file = ('%s/network_%s.yaml'
+ % (self.temp_dir, self.env_id))
+ network = self.read_yaml(network_file)
+
+ env = {'environment':
+ {'name': self.env[E['name']],
+ 'net_segment_type':
+ network['networking_parameters']['segmentation_type']}}
+ self.write_yaml(self.dea_file, env)
+ wanted_release = None
+ rel_list = parse(exec_cmd('fuel release'))
+ for rel in rel_list:
+ if rel[R['id']] == self.env[E['release_id']]:
+ wanted_release = rel[R['name']]
+ self.write_yaml(self.dea_file, {'wanted_release': wanted_release})
+
+ def reap_fuel_settings(self):
+ data = self.read_yaml('/etc/fuel/astute.yaml')
+ fuel = {}
+ del data['ADMIN_NETWORK']['mac']
+ del data['ADMIN_NETWORK']['interface']
+ for key in ['ADMIN_NETWORK', 'HOSTNAME', 'DNS_DOMAIN', 'DNS_SEARCH',
+ 'DNS_UPSTREAM', 'NTP1', 'NTP2', 'NTP3', 'FUEL_ACCESS']:
+ fuel[key] = data[key]
+ for key in fuel['ADMIN_NETWORK'].keys():
+ if key not in ['ipaddress', 'netmask',
+ 'dhcp_pool_start', 'dhcp_pool_end', 'ssh_network']:
+ del fuel['ADMIN_NETWORK'][key]
+
+ ## FIXME(armband): Factor in support for adding public/other interfaces.
+ ## TODO: Following block expects interface name(s) to be lowercase only
+ interfaces_list = exec_cmd('ip -o -4 a | grep -e "e[nt][hopsx].*"')
+ for interface in re.split('\n', interfaces_list):
+ # Sample output line from above cmd:
+ # 3: eth1 inet 10.0.2.10/24 scope global eth1 valid_lft forever ...
+ ifcfg = re.split(r'\s+', interface)
+ ifcfg_name = ifcfg[1]
+ ifcfg_ipaddr = ifcfg[3]
+
+ # Filter out admin interface (device name is not known, match IP)
+ current_network = netaddr.IPNetwork(ifcfg_ipaddr)
+ if str(current_network.ip) == fuel['ADMIN_NETWORK']['ipaddress']:
+ continue
+
+ # Read ifcfg-* network interface config file, write IFCFG_<IFNAME>
+ ifcfg_sec = 'IFCFG_%s' % ifcfg_name.upper()
+ fuel[ifcfg_sec] = {}
+ ifcfg_data = {}
+ ifcfg_f = ('/etc/sysconfig/network-scripts/ifcfg-%s' % ifcfg_name)
+ with open(ifcfg_f) as f:
+ for line in f:
+ if line.startswith('#'):
+ continue
+ (key, val) = line.split('=')
+ ifcfg_data[key.lower()] = val.rstrip()
+
+ # Keep only needed info (e.g. filter-out type=Ethernet).
+ fuel[ifcfg_sec]['ipaddress'] = ifcfg_data['ipaddr']
+ fuel[ifcfg_sec]['device'] = ifcfg_data['device']
+ fuel[ifcfg_sec]['netmask'] = str(current_network.netmask)
+ fuel[ifcfg_sec]['gateway'] = ifcfg_data['gateway']
+
+ self.write_yaml(self.dea_file, {'fuel': fuel})
+
+ def reap_network_settings(self):
+ network_file = ('%s/network_%s.yaml'
+ % (self.temp_dir, self.env_id))
+ data = self.read_yaml(network_file)
+ network = {}
+ network['networking_parameters'] = data['networking_parameters']
+ network['networks'] = data['networks']
+ for net in network['networks']:
+ del net['id']
+ del net['group_id']
+ self.write_yaml(self.dea_file, {'network': network})
+
+ def reap_settings(self):
+ settings_file = '%s/settings_%s.yaml' % (self.temp_dir, self.env_id)
+ settings = self.read_yaml(settings_file)
+ self.write_yaml(self.dea_file, {'settings': settings})
+
+ def get_interface(self, real_node_id):
+ exec_cmd('fuel node --node-id %s --network --download --dir %s'
+ % (real_node_id, self.temp_dir))
+ interface_file = ('%s/node_%s/interfaces.yaml'
+ % (self.temp_dir, real_node_id))
+ interfaces = self.read_yaml(interface_file)
+ interface_config = {}
+ pxe_mac = None
+ for interface in interfaces:
+ networks = []
+ for network in interface['assigned_networks']:
+ networks.append(network['name'])
+ if network['name'] == 'fuelweb_admin':
+ pxe_mac = interface['mac']
+ if networks:
+ interface_config[interface['name']] = networks
+ return interface_config, pxe_mac
+
+ def read_yaml(self, yaml_file):
+ with open(yaml_file) as f:
+ data = yaml.load(f)
+ return data
+
+ def intro(self):
+ delete(self.dea_file)
+ delete(self.dha_file)
+
+ self.temp_dir = tempfile.mkdtemp()
+ date = time.strftime('%c')
+ self.write(self.dea_file,
+ DEA_1.format(date=date, comment=self.comment), False)
+ self.write(self.dha_file,
+ DHA_1.format(date=date, comment=self.comment))
+ self.get_env()
+
+ # Need to download deployment with explicit node ids
+ node_list = parse(exec_cmd('fuel node'))
+ real_node_ids = [node[N['id']] for node in node_list]
+ real_node_ids.sort()
+ self.download_node_config(','.join(real_node_ids))
+
+ self.download_config('settings')
+ self.download_config('network')
+
+ def create_base_dea(self):
+ 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)
+ log('DHA file is available at %s (this is just a template)'
+ % self.dha_file)
+ if self.base_dea:
+ log('DEA base file is available at %s' % self.base_dea)
+ shutil.rmtree(self.temp_dir)
+
+ def reap(self):
+ self.intro()
+ self.reap_environment_info()
+ self.reap_nodes_interfaces_transformations()
+ self.reap_fuel_settings()
+ self.reap_network_settings()
+ self.reap_settings()
+ if self.base_dea:
+ self.create_base_dea()
+ self.finale()
+
+
+def parse_arguments():
+ parser = ArgParser(prog='python %s' % __file__)
+ parser.add_argument('dea_file', nargs='?', action='store',
+ default='dea.yaml',
+ help='Deployment Environment Adapter: dea.yaml')
+ parser.add_argument('dha_file', nargs='?', action='store',
+ default='dha.yaml',
+ help='Deployment Hardware Adapter: dha.yaml')
+ parser.add_argument('comment', nargs='?', action='store', help='Comment')
+ parser.add_argument('-base_dea',
+ dest='base_dea',
+ help='Create specified base DEA file from "dea_file"')
+ parser.add_argument('-template',
+ dest='template',
+ nargs='?',
+ default='base_dea_template.yaml',
+ help='Base DEA is generated from this template')
+ args = parser.parse_args()
+ return (args.dea_file,
+ args.dha_file,
+ args.comment,
+ args.base_dea,
+ args.template)
+
+
+def main():
+ dea_file, dha_file, comment, base_dea, template = parse_arguments()
+
+ r = Reap(dea_file, dha_file, comment, base_dea, template)
+ r.reap()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/deploy/scenario/README b/deploy/scenario/README
new file mode 100644
index 000000000..e32262d0d
--- /dev/null
+++ b/deploy/scenario/README
@@ -0,0 +1,159 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+Abstract:
+---------
+The directory contains configuration files for different OPNFV deployment
+feature scenarios used by Fuel@OPNFV, eg.:
+- High availability configuration
+- Type of SDN controller to be deployed
+- OPNFV collaboration project features to be deployed.
+- Provisioning of any other sevices
+
+Creating a new plugin
+---------------------
+Creating a new plugin involves creating a plugin config yaml file in
+/deploy/config/plugins. The filename should comply to following structure:
+fuel-<plugin_name>.yaml.
+The plugin configuration must include plugin configuration metadata as below:
+
+plugin-config-metadata:
+ title:
+ version:
+ created:
+ comment:
+
+Moreover, naturaly the plugin configuration must include the plugin yaml
+fragment, eg:
+
+opendaylight:
+ metadata:
+ enabled: true
+ label: OpenDaylight Lithium plugin
+.......
+
+Creating a new deployment scenario
+----------------------------------
+Creating a new deployment scenario involve creating a deployment scenario
+yaml file under deploy/scenario/. The filename should comply to following
+format: <ha | no-ha>_<SDN Controller>_<feature-1>_..._<feature-n>.yaml
+
+The deployment configuration file must contain configuration metadata as stated
+below:
+
+deployment-scenario-metadata:
+ title:
+ version:
+ created:
+ comment:
+
+To include fuel plugins, use the stack-extentions key:
+stack-extensions, eg:
+
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.0.1
+ module-config-override:
+ # Module config overrides
+ rest_api_port:
+ value: '8282'
+ enable_gbp:
+ value: false
+ enable_l3_odl:
+ value: true
+ enable_sfc:
+ value: false
+
+"module-config-name" and "module-config-version" must correspond to how
+the plugin configuration yaml was named.
+Everything under the "module-config-override" overrides the corresponding
+keys in the plugin config yaml file, this can for instance be used to configure
+the plugin.
+
+Everything under the "dea-override-config" overrides corresponding keys in the dea_base.yaml and dea_pod_override.yaml.
+You must at least provide {environment:{mode:'value},{net_segment_type:'value'}
+and {nodes:....} in order to configure the HA mode, network segmentation types
+and role to node assignments.
+Other ovverides may also be used to enable stack features such as ceph, heat,
+etc.
+Example:
+
+dea-override-config:
+ environment:
+ mode: ha
+ net_segment_type: tun
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller,opendaylight
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+ settings:
+ editable:
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: true
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ storage:
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works
+ best if Ceph is enabled for volumes and images, too. Enables live migration
+ of all types of Ceph backed VMs (without this option, live migration will
+ only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: true
+ weight: 75
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images.
+ If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could
+ be selected.
+ type: checkbox
+ value: true
+ weight: 30
+
+Optionally you may override the pod dha defenition under the
+"dha-override-config" key.
+
+Short names
+-----------
+scenario.yaml provides a mapping between a deployment scenario short-name
+and one or several deployment scenario configuration yaml files.
+
+Other
+-----
+These configuration files are used by deploy.sh provided by Fuel@OPNFV, e.g.
+deploy.sh will clone this repo when deploying.
diff --git a/deploy/scenario/ha_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..4051c478a
--- /dev/null
+++ b/deploy/scenario/ha_heat_ceilometer_scenario.yaml
@@ -0,0 +1,86 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: OpenStack-only, HA deployment
+ version: 0.0.3
+ created: Jan 26 2016
+ comment: Rebased to Fuel8
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo, controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..1217f7273
--- /dev/null
+++ b/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml
@@ -0,0 +1,173 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: NFV KVM HA deployment
+ version: 0.0.6
+ created: 27.07.2016
+ comment: Ceph cannot be assigned to compute, ceph is collocated with one of the controllers
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-kvm
+ module-config-name: fuel-nfvkvm
+ module-config-version: 0.9.0
+ module-config-override:
+ # Module config overrides
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,mongo
+ - id: 2
+ interfaces: interfaces_1
+ role: controller
+ - id: 3
+ interfaces: interfaces_1
+ role: controller
+ - id: 4
+ interfaces: interfaces_1
+ role: compute,ceph-osd
+ - id: 5
+ interfaces: interfaces_1
+ role: compute,ceph-osd
+
+ settings:
+ editable:
+ storage:
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works best if Ceph is enabled for volumes and images, too. Enables live migration of all types of Ceph backed VMs (without this option, live migration will only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: false
+ weight: 75
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images. If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could be selected.
+ type: checkbox
+ value: false
+ weight: 30
+ images_vcenter:
+ description: Configures Glance to use the vCenter/ESXi backend to store images. If enabled, this option will prevent Swift from installing.
+ label: VMware vCenter/ESXi datastore for images (Glance)
+ restrictions:
+ - action: hide
+ condition: settings:common.use_vcenter.value != true
+ - condition: settings:storage.images_ceph.value == true
+ message: Only one Glance backend could be selected.
+ type: checkbox
+ value: false
+ weight: 35
+ iser:
+ description: 'High performance block storage: Cinder volumes over iSER protocol (iSCSI over RDMA). This feature requires SR-IOV capabilities in the NIC, and will use a dedicated virtual function for the storage network.'
+ label: iSER protocol for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.value != true or settings:common.libvirt_type.value != 'kvm'
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ group: storage
+ label: Storage Backends
+ weight: 60
+ objects_ceph:
+ description: Configures RadosGW front end for Ceph RBD. This exposes S3 and Swift API Interfaces. If enabled, this option will prevent Swift from installing.
+ label: Ceph RadosGW for objects (Swift API)
+ type: checkbox
+ value: false
+ weight: 80
+ osd_pool_size:
+ description: Configures the default number of object replicas in Ceph. This number must be equal to or lower than the number of deployed 'Storage - Ceph OSD' nodes.
+ label: Ceph object replication factor
+ regex:
+ error: Invalid number
+ source: ^[1-9]\d*$
+ type: text
+ value: '2'
+ weight: 85
+ volumes_block_device:
+ description: High performance block device storage. It is recommended to have at least one Storage - Cinder Block Device
+ label: Cinder Block device driver
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: false
+ weight: 15
+ volumes_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.value == true or settings:storage.volumes_block_device.value == true
+ type: checkbox
+ value: true
+ weight: 20
+ volumes_lvm:
+ description: It is recommended to have at least one Storage - Cinder LVM node.
+ label: Cinder LVM over iSCSI for volumes
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: false
+ weight: 10
+
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..51deb4e28
--- /dev/null
+++ b/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml
@@ -0,0 +1,134 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: NFV OVS HA deployment
+ version: 0.9.0
+ created: Jul 12 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - install_dpdk:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ fuel:
+ FEATURE_GROUPS:
+ - experimental
+ environment:
+ net_segment_type: vlan
+ nodes:
+ - id: 1
+ interfaces: interfaces_vlan
+ role: controller
+ - id: 2
+ interfaces: interfaces_vlan
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_vlan
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_dpdk
+ role: ceph-osd,compute
+ attributes: attributes_1
+ - id: 5
+ interfaces: interfaces_dpdk
+ role: ceph-osd,compute
+ attributes: attributes_1
+
+ attributes_1:
+ hugepages:
+ dpdk:
+ value: 128
+ nova:
+ value:
+ '2048': 1024
+
+ network:
+ networking_parameters:
+ segmentation_type: vlan
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ configurable: false
+ map_priority: 2
+ name: private
+ neutron_vlan_range: true
+ notation: null
+ render_addr_mask: null
+ render_type: null
+ seg_type: vlan
+ use_gateway: false
+ vlan_start: null
+ name: private
+ vlan_start: null
+
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_odl-bgpvpn_scenario.yaml b/deploy/scenario/ha_odl-bgpvpn_scenario.yaml
new file mode 100644
index 000000000..7d52e77e2
--- /dev/null
+++ b/deploy/scenario/ha_odl-bgpvpn_scenario.yaml
@@ -0,0 +1,104 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL HA BGPVPN deployment
+ version: 0.9.0
+ created: 29.06.2016
+ comment: Fuel ODL HA with BGPVPN, Ceph, Ceilometer and Heat Rebased for Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - enable_bgpvpn:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+ - module: bgpvpn
+ module-config-name: fuel-bgpvpn
+ module-config-version: 0.9.0
+
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,opendaylight
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..90c89aedc
--- /dev/null
+++ b/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml
@@ -0,0 +1,104 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL-L2 HA deployment
+ version: 0.0.4
+ created: Jun 02 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+# Note that the module substitionion does not support arrays
+# This is a quick fix
+# - module: opendaylight
+# module-config-name: fuel-odl
+# module-config-version: 0.0.2
+# module-config-override:
+ # Module config overrides
+# rest_api_port:
+# value: '8282'
+# enable_gbp:
+# value: false
+# enable_l3_odl:
+# value: false
+# enable_sfc:
+# value: false
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,opendaylight
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..e6aef2aba
--- /dev/null
+++ b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
@@ -0,0 +1,119 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL-L2 SFC HA deployment
+ version: 0.0.1
+ created: Feb 10 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - install_nsh:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - enable_sfc:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+# Note that the module substitionion does not support arrays
+# This is a quick fix
+# - module: opendaylight
+# module-config-name: fuel-odl
+# module-config-version: 0.0.2
+# module-config-override:
+ # Module config overrides
+# rest_api_port:
+# value: '8282'
+# enable_gbp:
+# value: false
+# enable_l3_odl:
+# value: false
+# enable_sfc:
+# value: false
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,opendaylight
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..967e7d295
--- /dev/null
+++ b/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml
@@ -0,0 +1,120 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL-L3 HA deployment
+ version: 0.0.5
+ created: Jun 02 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+# Note that the module substitionion does not support arrays
+# This is a quick fix
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - enable_l3_odl:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+
+# - module: opendaylight
+# module-config-name: fuel-odl
+# module-config-version: 0.0.2
+# module-config-override:
+# # Module config overrides
+# rest_api_port:
+# value: '8282'
+# enable_gbp:
+# value: false
+# enable_l3_odl:
+# value: true
+# enable_sfc:
+# value: false
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,opendaylight
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ public_network_assignment:
+ assign_to_all_nodes:
+ value: true
+
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..f813458d0
--- /dev/null
+++ b/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml
@@ -0,0 +1,115 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ONOS HA deployment
+ version: 0.0.6
+ created: Jun 08 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: onos
+ module-config-name: fuel-onos
+ module-config-version: 0.0.3
+ module-config-override:
+ metadata:
+ class: plugin
+ default: false
+ enabled: true
+ label: onos plugin
+ toggleable: true
+ versions:
+ - enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: false
+ weight: 13
+ metadata:
+ hot_pluggable: false
+ plugin_version: 0.9.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Neutron only
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ weight: 70
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ net_segment_type: tun
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,onos
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ public_network_assignment:
+ assign_to_all_nodes:
+ value: true
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..32fbfcf6c
--- /dev/null
+++ b/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml
@@ -0,0 +1,95 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ONOS HA deployment
+ version: 0.0.6
+ created: Jun 08 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: onos
+ module-config-name: fuel-onos
+ module-config-version: 0.0.3
+ module-config-override:
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ net_segment_type: tun
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller,onos
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ public_network_assignment:
+ assign_to_all_nodes:
+ value: true
+dha-override-config:
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..d1d5191f0
--- /dev/null
+++ b/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml
@@ -0,0 +1,129 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: OpenStack-only, HA deployment with VLAN segmentation
+ version: 0.0.2
+ created: Jan 19 2016
+ comment: Rebased to Fuel8
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ mode: ha
+ net_segment_type: vlan
+ name: opnfv-vlan-noha
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: controller
+ - id: 2
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,controller
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 5
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+ settings:
+ editable:
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: true
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ storage:
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works
+ best if Ceph is enabled for volumes and images, too. Enables live migration
+ of all types of Ceph backed VMs (without this option, live migration will
+ only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: true
+ weight: 75
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images.
+ If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could
+ be selected.
+ type: checkbox
+ value: true
+ weight: 30
+
+dha-override-config:
+# These overrides only take effect for virtual deployment scenarios
+ nodes:
+ - id: 1
+ libvirtName: controller1
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 2
+ libvirtName: controller2
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 3
+ libvirtName: controller3
+ libvirtTemplate: templates/virtual_environment/vms/controller.xml
+ - id: 4
+ libvirtName: compute1
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 5
+ libvirtName: compute2
+ libvirtTemplate: templates/virtual_environment/vms/compute.xml
+ - id: 6
+ libvirtName: fuel-master
+ libvirtTemplate: templates/virtual_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..3dd5f841e
--- /dev/null
+++ b/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: OpenStack-only, No-HA deployment
+ version: 0.0.2
+ created: Jan 26 2016
+ comment: Fuel OpenStack-only with Ceph, Ceilometer and Heat, No-HA deployment rebased with Fuel8
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..4661a263d
--- /dev/null
+++ b/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml
@@ -0,0 +1,151 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: NFV KVM NO-HA deployment
+ version: 0.0.5
+ created: Aug 03 2016
+ comment: Ceph cannot be assigned to compute, using a seperate node for it
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-kvm
+ module-config-name: fuel-nfvkvm
+ module-config-version: 0.9.0
+ module-config-override:
+ # Module config overrides
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ net_segment_type: tun
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd
+ - id: 3
+ interfaces: interfaces_1
+ role: compute
+ - id: 4
+ interfaces: interfaces_1
+ role: compute
+
+ settings:
+ editable:
+ storage:
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works best if Ceph is enabled for volumes and images, too. Enables live migration of all types of Ceph backed VMs (without this option, live migration will only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: false
+ weight: 75
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images. If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could be selected.
+ type: checkbox
+ value: false
+ weight: 30
+ images_vcenter:
+ description: Configures Glance to use the vCenter/ESXi backend to store images. If enabled, this option will prevent Swift from installing.
+ label: VMware vCenter/ESXi datastore for images (Glance)
+ restrictions:
+ - action: hide
+ condition: settings:common.use_vcenter.value != true
+ - condition: settings:storage.images_ceph.value == true
+ message: Only one Glance backend could be selected.
+ type: checkbox
+ value: false
+ weight: 35
+ iser:
+ description: 'High performance block storage: Cinder volumes over iSER protocol (iSCSI over RDMA). This feature requires SR-IOV capabilities in the NIC, and will use a dedicated virtual function for the storage network.'
+ label: iSER protocol for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.value != true or settings:common.libvirt_type.value != 'kvm'
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ group: storage
+ label: Storage Backends
+ weight: 60
+ objects_ceph:
+ description: Configures RadosGW front end for Ceph RBD. This exposes S3 and Swift API Interfaces. If enabled, this option will prevent Swift from installing.
+ label: Ceph RadosGW for objects (Swift API)
+ type: checkbox
+ value: false
+ weight: 80
+ osd_pool_size:
+ description: Configures the default number of object replicas in Ceph. This number must be equal to or lower than the number of deployed 'Storage - Ceph OSD' nodes.
+ label: Ceph object replication factor
+ regex:
+ error: Invalid number
+ source: ^[1-9]\d*$
+ type: text
+ value: '1'
+ weight: 85
+ volumes_block_device:
+ description: High performance block device storage. It is recommended to have at least one Storage - Cinder Block Device
+ label: Cinder Block device driver
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: false
+ weight: 15
+ volumes_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.value == true or settings:storage.volumes_block_device.value == true
+ type: checkbox
+ value: true
+ weight: 20
+ volumes_lvm:
+ description: It is recommended to have at least one Storage - Cinder LVM node.
+ label: Cinder LVM over iSCSI for volumes
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: false
+ weight: 10
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
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
new file mode 100644
index 000000000..87364e83a
--- /dev/null
+++ b/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml
@@ -0,0 +1,114 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: NFV KVM and OVS No-HA deployment
+ version: 0.0.1
+ created: Jan 6 2016
+ comment: NFV KVM and OVS
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-qemu
+ module-config-name: fuel-nfvkvm
+ module-config-version: 0.0.1
+ module-config-override:
+ # Module config overrides
+
+ - module: fuel-plugin-ovsnfv
+ module-config-name: fuel-nfvovs
+ module-config-version: 0.0.1
+ module-config-override:
+ # Module config overrides
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ mode: ha
+ net_segment_type: tun
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: true
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ storage:
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works
+ best if Ceph is enabled for volumes and images, too. Enables live migration
+ of all types of Ceph backed VMs (without this option, live migration will
+ only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: true
+ weight: 75
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images.
+ If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could
+ be selected.
+ type: checkbox
+ value: true
+ weight: 30
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..7ab76cbcf
--- /dev/null
+++ b/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml
@@ -0,0 +1,112 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: NFV OVS NO-HA deployment
+ version: 0.9.0
+ created: Jul 12 2016
+ comment: NFV OVS NO-HA Rebased for Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - install_dpdk:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ fuel:
+ FEATURE_GROUPS:
+ - experimental
+ environment:
+ net_segment_type: vlan
+ nodes:
+ - id: 1
+ interfaces: interfaces_vlan
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_dpdk
+ role: ceph-osd,compute
+ attributes: attributes_1
+ - id: 3
+ interfaces: interfaces_dpdk
+ role: ceph-osd,compute
+ attributes: attributes_1
+ - id: 4
+ interfaces: interfaces_dpdk
+ role: ceph-osd,compute
+ attributes: attributes_1
+
+ attributes_1:
+ hugepages:
+ dpdk:
+ value: 128
+ nova:
+ value:
+ '2048': 1024
+
+ network:
+ networking_parameters:
+ segmentation_type: vlan
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ configurable: false
+ map_priority: 2
+ name: private
+ neutron_vlan_range: true
+ notation: null
+ render_addr_mask: null
+ render_type: null
+ seg_type: vlan
+ use_gateway: false
+ vlan_start: null
+ name: private
+ vlan_start: null
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml b/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml
new file mode 100644
index 000000000..6f21ea2c8
--- /dev/null
+++ b/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml
@@ -0,0 +1,81 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL HA BGPVPN deployment
+ version: 0.9.0
+ created: 29.06.2016
+ comment: Fuel ODL No HA with BGPVPN, Ceph, Ceilometer and Heat Rebased for Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - enable_bgpvpn:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+ - module: bgpvpn
+ module-config-name: fuel-bgpvpn
+ module-config-version: 0.9.0
+
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,opendaylight
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..f8787d780
--- /dev/null
+++ b/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml
@@ -0,0 +1,82 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL-L2 No-HA deployment
+ version: 0.0.3
+ created: Jun 02 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+# Note that the module substitionion does not support arrays
+# This is a quick fix
+# - module: opendaylight
+# module-config-name: fuel-odl
+# module-config-version: 0.0.2
+# module-config-override:
+# # Module config overrides
+# rest_api_port:
+# value: '8282'
+# enable_gbp:
+# value: false
+# enable_l3_odl:
+# value: false
+# enable_sfc:
+# value: false
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,opendaylight
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
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
new file mode 100644
index 000000000..a8d9ed848
--- /dev/null
+++ b/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
@@ -0,0 +1,98 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL-L2-SFC No-HA deployment
+ version: 0.0.2
+ created: Feb 10 2016
+ comment: Fuel ODL-L2 SFC No HA with Ceph, Ceilometer and Heat Rebased for Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - install_nsh:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - enable_sfc:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+# Note that the module substitionion does not support arrays
+# This is a quick fix
+# - module: opendaylight
+# module-config-name: fuel-odl
+# module-config-version: 0.0.2
+# module-config-override:
+# # Module config overrides
+# rest_api_port:
+# value: '8282'
+# enable_gbp:
+# value: false
+# enable_l3_odl:
+# value: false
+# enable_sfc:
+# value: false
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,opendaylight
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..0c8415f78
--- /dev/null
+++ b/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml
@@ -0,0 +1,97 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ODL-L3 No-HA deployment
+ version: 0.0.4
+ created: Jun 02 2016
+ comment: Rebased to Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+# Note that the module substitionion does not support arrays
+# This is a quick fix
+stack-extensions:
+ - module: opendaylight
+ module-config-name: fuel-odl
+ module-config-version: 0.9.0
+ module-config-override:
+ metadata:
+ versions:
+ - enable_l3_odl:
+ value: true
+ metadata:
+ plugin_version: 0.9.0
+
+ - module: fuel-plugin-ovs
+ module-config-name: fuel-nshovs
+ module-config-version: 0.9.0
+
+# - module: opendaylight
+# module-config-name: fuel-odl
+# module-config-version: 0.0.2
+# module-config-override:
+ # Module config overrides
+# rest_api_port:
+# value: '8282'
+# enable_gbp:
+# value: false
+# enable_l3_odl:
+# value: true
+# enable_sfc:
+# value: false
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,opendaylight
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ public_network_assignment:
+ assign_to_all_nodes:
+ value: true
+
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..f5c00f0c9
--- /dev/null
+++ b/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml
@@ -0,0 +1,93 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ONOS No-HA deployment
+ version: 0.0.5
+ created: Jun 08 2016
+ comment: ONOS No HA with Ceph, Ceilometer and Heat - Rebased for Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: onos
+ module-config-name: fuel-onos
+ module-config-version: 0.0.3
+ module-config-override:
+ metadata:
+ class: plugin
+ default: false
+ enabled: true
+ label: onos plugin
+ toggleable: true
+ versions:
+ - enable_sfc:
+ label: SFC features
+ type: checkbox
+ value: false
+ weight: 13
+ metadata:
+ hot_pluggable: false
+ plugin_version: 0.9.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Neutron only
+ - settings:public_network_assignment.assign_to_all_nodes.value == false: Assign
+ public network to all nodes
+ weight: 70
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ net_segment_type: tun
+ name: onos_no-ha
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller,onos
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ public_network_assignment:
+ assign_to_all_nodes:
+ value: true
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..587346ef4
--- /dev/null
+++ b/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml
@@ -0,0 +1,73 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: ONOS No-HA deployment
+ version: 0.0.5
+ created: Jun 08 2016
+ comment: ONOS No HA with Ceph, Ceilometer and Heat - Rebased for Fuel9
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+ - module: onos
+ module-config-name: fuel-onos
+ module-config-version: 0.0.3
+ module-config-override:
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ net_segment_type: tun
+ name: onos_no-ha
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller,onos
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ public_network_assignment:
+ assign_to_all_nodes:
+ value: true
+dha-override-config:
+# disks:
+# contrail: 500G
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml
new file mode 100644
index 000000000..567ea9867
--- /dev/null
+++ b/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml
@@ -0,0 +1,103 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+############################################################################### # Description:
+# This .yaml configuration file defines the configuration of the fuel
+# deployment and is passed as an argument to deploy.sh
+# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
+# This will make build.sh fetch this configuration file and configure the
+# deployment accordingly.
+# After the deployment, a copy of this file gets uploaded to fuel:
+# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
+# /root/deploy-config.sha1
+##############################################################################
+
+##############################################################################
+# deployment configuration meta-data
+deployment-scenario-metadata:
+ title: OpenStack-only, No-HA deployment with VLAN segmentation
+ version: 0.0.1
+ created: Jan 12 2016
+ comment: Fuel OpenStack-only with VLAN segmentation, Ceph, Ceilometer and Heat, No-HA deployment
+
+##############################################################################
+# Stack extentions are opnfv added value features in form of a fuel-plugin
+# plug-ins listed below will be enabled and configured according to the
+# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
+# It does so by copying the config file to the local plugin config directory
+stack-extensions:
+
+##############################################################################
+# By editing the override-config sections below, you can override arbitrary
+# configuration name-space settings
+dea-override-config:
+ environment:
+ mode: ha
+ net_segment_type: vlan
+ name: opnfv-vlan-noha
+ nodes:
+ - id: 1
+ interfaces: interfaces_1
+ role: mongo,controller
+ - id: 2
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 3
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ - id: 4
+ interfaces: interfaces_1
+ role: ceph-osd,compute
+ settings:
+ editable:
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: true
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ storage:
+ ephemeral_ceph:
+ description: Configures Nova to store ephemeral volumes in RBD. This works
+ best if Ceph is enabled for volumes and images, too. Enables live migration
+ of all types of Ceph backed VMs (without this option, live migration will
+ only work with VMs launched from Cinder volumes).
+ label: Ceph RBD for ephemeral volumes (Nova)
+ type: checkbox
+ value: true
+ weight: 75
+ images_ceph:
+ description: Configures Glance to use the Ceph RBD backend to store images.
+ If enabled, this option will prevent Swift from installing.
+ label: Ceph RBD for images (Glance)
+ restrictions:
+ - settings:storage.images_vcenter.value == true: Only one Glance backend could
+ be selected.
+ type: checkbox
+ value: true
+ weight: 30
+
+dha-override-config:
+# These overrides only take effect for virtual deployment scenarios
+
+##############################################################################
+# The verification pipeline may populate the section below with arbitrary
+# testing information, which post deploy can be retreived from the fuel master:
+# /root/deploy-config.yaml
+test:
diff --git a/deploy/scenario/scenario.yaml b/deploy/scenario/scenario.yaml
new file mode 100644
index 000000000..648ff22b3
--- /dev/null
+++ b/deploy/scenario/scenario.yaml
@@ -0,0 +1,83 @@
+##############################################################################
+# Copyright (c) 2015 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
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+##############################################################################
+# Description:
+# This configuration file defines translation between a short deployment
+# scenario name and an actual deployment scenario configuration file
+#
+# Short deployment scenario names are aligned between installer, test, and
+# releng projects according to below pattern.
+# os-[controller]-[feature]-[mode](-[optionalparameter])
+#
+# Please note that the mechanism to get the details regarding the scenarios
+# is different currently which needs to be aligned as well.
+##############################################################################
+
+##############################################################################
+# Short scenario name convention to be followed:
+# os-<controller>-<feature>-<mode>[-<optional-parameter>]
+# controler: nosdn|odl|onos|ocl|...
+# feaure: nofeature | [vlan]_[kvm]_[ovs]_[vlan]_....
+# mode: ha|noha
+##############################################################################
+
+os-nosdn-nofeature-ha:
+ configfile: ha_heat_ceilometer_scenario.yaml
+
+os-nosdn-nofeature-noha:
+ configfile: no-ha_heat_ceilometer_scenario.yaml
+
+os-odl_l3-nofeature-ha:
+ configfile: ha_odl-l3_heat_ceilometer_scenario.yaml
+
+os-odl_l3-nofeature-noha:
+ configfile: no-ha_odl-l3_heat_ceilometer_scenario.yaml
+
+os-odl_l2-nofeature-ha:
+ configfile: ha_odl-l2_heat_ceilometer_scenario.yaml
+
+os-odl_l2-nofeature-noha:
+ configfile: no-ha_odl-l2_heat_ceilometer_scenario.yaml
+
+os-onos-nofeature-ha:
+ configfile: ha_onos_nofeature_heat_ceilometer_scenario.yaml
+
+os-onos-nofeature-noha:
+ configfile: no-ha_onos_nofeature_heat_ceilometer_scenario.yaml
+
+os-onos-sfc-ha:
+ configfile: ha_onos_sfc_heat_ceilometer_scenario.yaml
+
+os-onos-sfc-noha:
+ configfile: no-ha_onos_sfc_heat_ceilometer_scenario.yaml
+
+os-nosdn-kvm-ha:
+ configfile: ha_nfv-kvm_heat_ceilometer_scenario.yaml
+
+os-nosdn-kvm-noha:
+ configfile: no-ha_nfv-kvm_heat_ceilometer_scenario.yaml
+
+os-nosdn-ovs-ha:
+ configfile: ha_nfv-ovs_heat_ceilometer_scenario.yaml
+
+os-nosdn-ovs-noha:
+ configfile: no-ha_nfv-ovs_heat_ceilometer_scenario.yaml
+
+os-odl_l2-bgpvpn-ha:
+ configfile: ha_odl-bgpvpn_scenario.yaml
+
+os-odl_l2-bgpvpn-noha:
+ configfile: no-ha_odl-bgpvpn_scenario.yaml
+
+os-odl_l2-sfc-ha:
+ configfile: ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
+
+os-odl_l2-sfc-noha:
+ configfile: no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
diff --git a/deploy/ssh_client.py b/deploy/ssh_client.py
new file mode 100644
index 000000000..24119dbfa
--- /dev/null
+++ b/deploy/ssh_client.py
@@ -0,0 +1,103 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import paramiko
+import scp
+
+from common import (
+ log,
+ err,
+)
+
+TIMEOUT = 600
+
+class SSHClient(object):
+
+ def __init__(self, host, username, password):
+ self.host = host
+ self.username = username
+ self.password = password
+ self.client = None
+
+ def open(self, timeout=TIMEOUT):
+ self.client = paramiko.SSHClient()
+ self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ self.client.connect(self.host, username=self.username,
+ password=self.password, look_for_keys=False,
+ timeout=timeout)
+
+ def close(self):
+ if self.client is not None:
+ self.client.close()
+ self.client = None
+
+ def __enter__(self):
+ self.open()
+ return self
+
+ def __exit__(self, type, value, traceback):
+ self.close()
+
+ def exec_cmd(self, command, check=True, sudo=False, timeout=TIMEOUT):
+ if sudo and self.username != 'root':
+ command = "sudo -S -p '' %s" % command
+ stdin, stdout, stderr = self.client.exec_command(command,
+ timeout=timeout)
+ if sudo:
+ stdin.write(self.password + '\n')
+ stdin.flush()
+ response = stdout.read().strip()
+ error = stderr.read().strip()
+
+ if check:
+ if error:
+ self.close()
+ raise Exception(error)
+ else:
+ return response
+ return response, error
+
+ def run(self, command):
+ transport = self.client.get_transport()
+ transport.set_keepalive(1)
+ chan = transport.open_session()
+ chan.exec_command(command)
+ while not chan.exit_status_ready():
+ if chan.recv_ready():
+ data = chan.recv(1024)
+ while data:
+ log(data.strip())
+ data = chan.recv(1024)
+
+ if chan.recv_stderr_ready():
+ error_buff = chan.recv_stderr(1024)
+ while error_buff:
+ log(error_buff.strip())
+ error_buff = chan.recv_stderr(1024)
+ return chan.recv_exit_status()
+
+ def scp_get(self, remote, local='.', dir=False):
+ try:
+ with scp.SCPClient(self.client.get_transport(),
+ sanitize=lambda x: x,
+ socket_timeout=TIMEOUT) as _scp:
+ _scp.get(remote, local, dir)
+ except Exception as e:
+ err(e)
+
+ def scp_put(self, local, remote='.', dir=False):
+ try:
+ with scp.SCPClient(self.client.get_transport(),
+ sanitize=lambda x: x,
+ socket_timeout=TIMEOUT) as _scp:
+ _scp.put(local, remote, dir)
+ except Exception as e:
+ err(e)
diff --git a/deploy/templater.py b/deploy/templater.py
new file mode 100755
index 000000000..bda60c7fe
--- /dev/null
+++ b/deploy/templater.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python
+###############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import io
+import re
+import yaml
+import urllib2
+from common import(
+ err,
+ ArgParser,
+)
+
+
+TAG_START = '%{'
+TAG_END = '}'
+DELIMITER = '/'
+
+
+class Templater(object):
+ def __init__(self, base_file, template_file, output_file):
+ self.template_file = template_file
+ self.output_file = output_file
+ self.base = self.load_yaml(base_file)
+
+ def is_url(self, filespec):
+ regex = re.compile('^([^/:]+)://')
+ return re.search(regex, filespec)
+
+ def load_template(self, filespec):
+ try:
+ if(self.is_url(filespec)):
+ response = urllib2.urlopen(filespec)
+ return response.read()
+ else:
+ with io.open(filespec) as f:
+ return f.readlines()
+ except Exception as error:
+ err('Error opening template file: %s' % error)
+
+ def load_yaml(self, filespec):
+ try:
+ if(self.is_url(filespec)):
+ response = urllib2.urlopen(filespec)
+ return yaml.load(response)
+ else:
+ with io.open(filespec) as f:
+ return yaml.load(f)
+ except Exception as error:
+ err('Error opening YAML file: %s' % error)
+
+ def save_yaml(self, filename, content):
+ try:
+ with io.open(filename, 'w') as yaml_file:
+ yaml_file.write(content)
+ except Exception as error:
+ err('Error writing YAML file: %s' % error)
+
+ def get_indent(self, line):
+ return len(line) - len(line.lstrip(' '))
+
+ def format_fragment(self, fragment, indent):
+ result = ''
+ is_first_line = True
+
+ for line in fragment.splitlines():
+ # Skip indenting the first line as it is already indented
+ if is_first_line:
+ line += '\n'
+ is_first_line = False
+ else:
+ line = ' ' * indent + line + '\n'
+
+ result += line
+
+ return result.rstrip('\n')
+
+ def format_substitution(self, string):
+ if isinstance(string, basestring):
+ return string
+ else:
+ return yaml.dump(string, default_flow_style=False)
+
+ def parse_interface_tag(self, tag):
+ # Remove 'interface(' prefix, trailing ')' and split arguments
+ args = tag[len('interface('):].rstrip(')').split(',')
+
+ if len(args) == 1 and not args[0]:
+ err('No arguments for interface().')
+ elif len(args) == 2 and (not args[0] or not args[1]):
+ err('Empty argument for interface().')
+ elif len(args) > 2:
+ err('Too many arguments for interface().')
+ else:
+ return args
+
+ def get_interface_from_network(self, interfaces, network):
+ nics = self.base[interfaces]
+ for nic in nics:
+ if network in nics[nic]:
+ return nic
+
+ err('Network not found: %s' % network)
+
+ def get_role_interfaces(self, role):
+ nodes = self.base['nodes']
+ for node in nodes:
+ if role in node['role']:
+ return node['interfaces']
+
+ err('Role not found: %s' % role)
+
+ def lookup_interface(self, args):
+ nodes = self.base['nodes']
+
+ if len(args) == 1:
+ interfaces = nodes[0]['interfaces']
+ if len(args) == 2:
+ interfaces = self.get_role_interfaces(args[1])
+
+ return self.get_interface_from_network(interfaces, args[0])
+
+ def parse_include_tag(self, tag):
+ # Remove 'include(' prefix and trailing ')'
+ filename = tag[len('include('):].rstrip(')')
+
+ if not filename:
+ err('No argument for include().')
+
+ return filename
+
+ def include_file(self, filename):
+ fragment = self.load_yaml(filename)
+ return yaml.dump(fragment, default_flow_style=False)
+
+ def parse_tag(self, tag, indent):
+ fragment = ''
+
+ if 'interface(' in tag:
+ args = self.parse_interface_tag(tag)
+ fragment = self.lookup_interface(args)
+ elif 'include(' in tag:
+ filename = self.parse_include_tag(tag)
+ fragment = self.include_file(filename)
+ else:
+ path = tag.split(DELIMITER)
+ fragment = self.base
+ for i in path:
+ if i in fragment:
+ fragment = fragment.get(i)
+ else:
+ err('Error: key "%s" does not exist in base YAML file' % i)
+
+ fragment = self.format_substitution(fragment)
+
+ return self.format_fragment(fragment, indent)
+
+ def run(self):
+ result = ''
+
+ regex = re.compile(re.escape(TAG_START) + r'([a-z].+)' + re.escape(TAG_END),
+ flags=re.IGNORECASE)
+ for line in self.load_template(self.template_file):
+ indent = self.get_indent(line)
+ result += re.sub(regex,
+ lambda match: self.parse_tag(match.group(1), indent),
+ line)
+
+ self.save_yaml(self.output_file, result)
+
+
+def parse_arguments():
+ description = '''Process 'template_file' using 'base_file' as source for
+template variable substitution and write the results to 'output_file'.'''
+
+ parser = ArgParser(prog='python %s' % __file__,
+ description=description)
+ parser.add_argument('base_file',
+ help='Base YAML file or URL')
+ parser.add_argument('template_file',
+ help='Template file or URL')
+ parser.add_argument('output_file',
+ help='Output filename')
+
+ args = parser.parse_args()
+ return(args.base_file, args.template_file, args.output_file)
+
+
+def main():
+ base_file, template_file, output_file = parse_arguments()
+
+ templater = Templater(base_file, template_file, output_file)
+ templater.run()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/deploy/templates/ericsson/virtual_environment/noha/networks/fuel1.xml b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel1.xml
new file mode 100644
index 000000000..7b2b15423
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel1.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel1</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel1' stp='on' delay='0'/>
+ <ip address='10.20.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/ericsson/virtual_environment/noha/networks/fuel2.xml b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel2.xml
new file mode 100644
index 000000000..615c92094
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel2.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel2</name>
+ <bridge name='fuel2' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/ericsson/virtual_environment/noha/networks/fuel3.xml b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel3.xml
new file mode 100644
index 000000000..2383e6c1f
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel3.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel3</name>
+ <bridge name='fuel3' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/ericsson/virtual_environment/noha/networks/fuel4.xml b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel4.xml
new file mode 100644
index 000000000..5b69f912d
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/networks/fuel4.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel4</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel4' stp='on' delay='0'/>
+ <ip address='172.16.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
new file mode 100644
index 000000000..310ce292a
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
@@ -0,0 +1,91 @@
+<domain type='kvm'>
+ <name>compute</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='erms'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='smep'/>
+ <feature policy='require' name='pcid'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='monitor'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='fsgsbase'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ </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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
new file mode 100644
index 000000000..d0d0ef14c
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
@@ -0,0 +1,91 @@
+<domain type='kvm'>
+ <name>controller</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='erms'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='smep'/>
+ <feature policy='require' name='pcid'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='monitor'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='fsgsbase'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ </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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
new file mode 100644
index 000000000..223a65805
--- /dev/null
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
@@ -0,0 +1,93 @@
+<domain type='kvm'>
+ <name>fuel</name>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ <bootmenu enable='no'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='erms'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='smep'/>
+ <feature policy='require' name='pcid'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='monitor'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='fsgsbase'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ </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='block' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcwo2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='ide' index='0'>
+ </controller>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+ <seclabel type='dynamic' model='apparmor' relabel='yes'/>
+</domain>
+
diff --git a/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml b/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml
new file mode 100644
index 000000000..fe547b811
--- /dev/null
+++ b/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml
@@ -0,0 +1,91 @@
+<domain type='kvm' id='62'>
+ <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-trusty'>hvm</type>
+ <boot dev='cdrom'/>
+ <boot dev='hd'/>
+ <bootmenu enable='no'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ </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/bin/kvm</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <disk type='block' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hdb' bus='ide'/>
+ <readonly/>
+ </disk>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'>
+ </controller>
+ <controller type='ide' index='0'>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ </controller>
+ <interface type='bridge'>
+ <model type='virtio'/>
+ </interface>
+ <serial type='pty'>
+ <source path='/dev/pts/0'/>
+ <target port='0'/>
+ </serial>
+ <console type='pty' tty='/dev/pts/0'>
+ <source path='/dev/pts/0'/>
+ <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' keymap='en-us'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+ <seclabel type='dynamic' relabel='yes'>
+ <label>system_u:system_r:svirt_t:s0:c52,c932</label>
+ <imagelabel>system_u:object_r:svirt_image_t:s0:c52,c932</imagelabel>
+ </seclabel>
+</domain>
diff --git a/deploy/templates/hardware_environment/vms/fuel.xml b/deploy/templates/hardware_environment/vms/fuel.xml
new file mode 100644
index 000000000..8d8dd4494
--- /dev/null
+++ b/deploy/templates/hardware_environment/vms/fuel.xml
@@ -0,0 +1,91 @@
+<domain type='kvm' id='62'>
+ <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='cdrom'/>
+ <boot dev='hd'/>
+ <bootmenu enable='no'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ </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='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <disk type='block' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hdb' bus='ide'/>
+ <readonly/>
+ </disk>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'>
+ </controller>
+ <controller type='ide' index='0'>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ </controller>
+ <interface type='bridge'>
+ <model type='virtio'/>
+ </interface>
+ <serial type='pty'>
+ <source path='/dev/pts/0'/>
+ <target port='0'/>
+ </serial>
+ <console type='pty' tty='/dev/pts/0'>
+ <source path='/dev/pts/0'/>
+ <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' keymap='en-us'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+ <seclabel type='dynamic' model='selinux' relabel='yes'>
+ <label>system_u:system_r:svirt_t:s0:c52,c932</label>
+ <imagelabel>system_u:object_r:svirt_image_t:s0:c52,c932</imagelabel>
+ </seclabel>
+</domain>
diff --git a/deploy/templates/intel/virtual_environment/noha/networks/fuel1.xml b/deploy/templates/intel/virtual_environment/noha/networks/fuel1.xml
new file mode 100644
index 000000000..7b2b15423
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/networks/fuel1.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel1</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel1' stp='on' delay='0'/>
+ <ip address='10.20.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/intel/virtual_environment/noha/networks/fuel2.xml b/deploy/templates/intel/virtual_environment/noha/networks/fuel2.xml
new file mode 100644
index 000000000..615c92094
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/networks/fuel2.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel2</name>
+ <bridge name='fuel2' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/intel/virtual_environment/noha/networks/fuel3.xml b/deploy/templates/intel/virtual_environment/noha/networks/fuel3.xml
new file mode 100644
index 000000000..2383e6c1f
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/networks/fuel3.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel3</name>
+ <bridge name='fuel3' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/intel/virtual_environment/noha/networks/fuel4.xml b/deploy/templates/intel/virtual_environment/noha/networks/fuel4.xml
new file mode 100644
index 000000000..5b69f912d
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/networks/fuel4.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel4</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel4' stp='on' delay='0'/>
+ <ip address='172.16.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
new file mode 100644
index 000000000..310ce292a
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
@@ -0,0 +1,91 @@
+<domain type='kvm'>
+ <name>compute</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='erms'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='smep'/>
+ <feature policy='require' name='pcid'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='monitor'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='fsgsbase'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ </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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
new file mode 100644
index 000000000..d0d0ef14c
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
@@ -0,0 +1,91 @@
+<domain type='kvm'>
+ <name>controller</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='erms'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='smep'/>
+ <feature policy='require' name='pcid'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='monitor'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='fsgsbase'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ </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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
new file mode 100644
index 000000000..b8af5a633
--- /dev/null
+++ b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
@@ -0,0 +1,93 @@
+<domain type='kvm'>
+ <name>fuel</name>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ <bootmenu enable='no'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>SandyBridge</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='erms'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='smep'/>
+ <feature policy='require' name='pcid'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='monitor'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='fsgsbase'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ </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='block' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='ide' index='0'>
+ </controller>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+ <seclabel type='dynamic' model='apparmor' relabel='yes'/>
+</domain>
+
diff --git a/deploy/templates/plugins/.gitkeep b/deploy/templates/plugins/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/deploy/templates/plugins/.gitkeep
diff --git a/deploy/templates/templater/base_dea_template.yaml b/deploy/templates/templater/base_dea_template.yaml
new file mode 100644
index 000000000..bdc1b2684
--- /dev/null
+++ b/deploy/templates/templater/base_dea_template.yaml
@@ -0,0 +1,24 @@
+##############################################################################
+# Copyright (c) 2015, 2016 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+dea-base-config-metadata:
+ title: 'Deployment Environment Adapter Base configuration'
+ # DEA API version supported
+ version: '0.4'
+ created: 'Fri Jun 10 2016'
+ comment: 'Rebased for Fuel 9'
+environment:
+ net_segment_type: %{network/networking_parameters/segmentation_type}
+fuel:
+ FUEL_ACCESS:
+ %{fuel/FUEL_ACCESS}
+wanted_release: %{wanted_release}
+settings:
+ %{settings}
diff --git a/deploy/templates/virtual_environment/networks/fuel1.xml b/deploy/templates/virtual_environment/networks/fuel1.xml
new file mode 100644
index 000000000..7b2b15423
--- /dev/null
+++ b/deploy/templates/virtual_environment/networks/fuel1.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel1</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel1' stp='on' delay='0'/>
+ <ip address='10.20.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/virtual_environment/networks/fuel2.xml b/deploy/templates/virtual_environment/networks/fuel2.xml
new file mode 100644
index 000000000..558788664
--- /dev/null
+++ b/deploy/templates/virtual_environment/networks/fuel2.xml
@@ -0,0 +1,6 @@
+<network>
+ <name>fuel2</name>
+ <bridge name='fuel2' stp='on' delay='0'/>
+ <ip address='192.168.0.254' netmask='255.255.255.0'/>
+</network>
+
diff --git a/deploy/templates/virtual_environment/networks/fuel3.xml b/deploy/templates/virtual_environment/networks/fuel3.xml
new file mode 100644
index 000000000..2383e6c1f
--- /dev/null
+++ b/deploy/templates/virtual_environment/networks/fuel3.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel3</name>
+ <bridge name='fuel3' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/virtual_environment/networks/fuel4.xml b/deploy/templates/virtual_environment/networks/fuel4.xml
new file mode 100644
index 000000000..5b69f912d
--- /dev/null
+++ b/deploy/templates/virtual_environment/networks/fuel4.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel4</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel4' stp='on' delay='0'/>
+ <ip address='172.16.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/virtual_environment/vms/compute.xml b/deploy/templates/virtual_environment/vms/compute.xml
new file mode 100644
index 000000000..0bff88827
--- /dev/null
+++ b/deploy/templates/virtual_environment/vms/compute.xml
@@ -0,0 +1,67 @@
+<domain type='kvm'>
+ <name>compute</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/virtual_environment/vms/controller.xml b/deploy/templates/virtual_environment/vms/controller.xml
new file mode 100644
index 000000000..422aa39e2
--- /dev/null
+++ b/deploy/templates/virtual_environment/vms/controller.xml
@@ -0,0 +1,64 @@
+<domain type='kvm'>
+ <name>controller</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/virtual_environment/vms/fuel.xml b/deploy/templates/virtual_environment/vms/fuel.xml
new file mode 100644
index 000000000..e2a05d86e
--- /dev/null
+++ b/deploy/templates/virtual_environment/vms/fuel.xml
@@ -0,0 +1,64 @@
+<domain type='kvm'>
+ <name>fuel</name>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ <bootmenu enable='no'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <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='block' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='ide' index='0'>
+ </controller>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='virtio'/>
+ </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' keymap='en-us'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/virtual_environment_noha/networks/fuel1.xml b/deploy/templates/virtual_environment_noha/networks/fuel1.xml
new file mode 100644
index 000000000..7b2b15423
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/networks/fuel1.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel1</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel1' stp='on' delay='0'/>
+ <ip address='10.20.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/virtual_environment_noha/networks/fuel2.xml b/deploy/templates/virtual_environment_noha/networks/fuel2.xml
new file mode 100644
index 000000000..615c92094
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/networks/fuel2.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel2</name>
+ <bridge name='fuel2' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/virtual_environment_noha/networks/fuel3.xml b/deploy/templates/virtual_environment_noha/networks/fuel3.xml
new file mode 100644
index 000000000..2383e6c1f
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/networks/fuel3.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel3</name>
+ <bridge name='fuel3' stp='on' delay='0'/>
+</network>
+
diff --git a/deploy/templates/virtual_environment_noha/networks/fuel4.xml b/deploy/templates/virtual_environment_noha/networks/fuel4.xml
new file mode 100644
index 000000000..5b69f912d
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/networks/fuel4.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>fuel4</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='fuel4' stp='on' delay='0'/>
+ <ip address='172.16.0.1' netmask='255.255.255.0'>
+ </ip>
+</network>
+
diff --git a/deploy/templates/virtual_environment_noha/vms/compute.xml b/deploy/templates/virtual_environment_noha/vms/compute.xml
new file mode 100644
index 000000000..95db87984
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/vms/compute.xml
@@ -0,0 +1,64 @@
+<domain type='kvm'>
+ <name>compute</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/virtual_environment_noha/vms/controller.xml b/deploy/templates/virtual_environment_noha/vms/controller.xml
new file mode 100644
index 000000000..422aa39e2
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/vms/controller.xml
@@ -0,0 +1,64 @@
+<domain type='kvm'>
+ <name>controller</name>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bios rebootTimeout='30000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <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='qcow2'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='e1000'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/deploy/templates/virtual_environment_noha/vms/fuel.xml b/deploy/templates/virtual_environment_noha/vms/fuel.xml
new file mode 100644
index 000000000..e9d454530
--- /dev/null
+++ b/deploy/templates/virtual_environment_noha/vms/fuel.xml
@@ -0,0 +1,65 @@
+<domain type='kvm'>
+ <name>fuel</name>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ <bootmenu enable='no'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <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='block' device='cdrom'>
+ <driver name='qemu' type='qcow2'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <controller type='ide' index='0'>
+ </controller>
+ <controller type='usb' index='0'>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <source network='fuel1'/>
+ <model type='e1000'/>
+ </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' keymap='en-us'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/deploy/transplant_fuel_settings.py b/deploy/transplant_fuel_settings.py
new file mode 100644
index 000000000..993b0dcce
--- /dev/null
+++ b/deploy/transplant_fuel_settings.py
@@ -0,0 +1,116 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# szilard.cserey@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+
+import sys
+import io
+import yaml
+import re
+import os
+from dea import DeploymentEnvironmentAdapter
+
+from common import (
+ check_file_exists,
+ exec_cmd,
+ log,
+)
+
+ASTUTE_YAML = '/etc/fuel/astute.yaml'
+FUEL_BOOTSTRAP_CLI_YAML = '/opt/opnfv/fuel_bootstrap_cli.yaml'
+
+
+def usage():
+ print '''
+ Usage:
+ python transplant_fuel_settings.py <deafile>
+ '''
+
+
+def parse_arguments():
+ if len(sys.argv) != 2:
+ usage()
+ sys.exit(1)
+ dea_file = sys.argv[-1]
+ check_file_exists(dea_file)
+ return dea_file
+
+def write_ifcfg_file(key, fuel_conf):
+ config = ('BOOTPROTO=none\n'
+ 'ONBOOT=yes\n'
+ 'TYPE=Ethernet\n'
+ 'NM_CONTROLLED=yes\n')
+ for skey in ('ipaddress', 'device', 'netmask', 'gateway'):
+ if not fuel_conf[key].get(skey):
+ log('Warning: missing key %s for %s' % (skey, key))
+ config += '%s=\n' % skey.upper()
+ elif skey == 'ipaddress':
+ config += 'IPADDR=%s\n' % fuel_conf[key][skey]
+ else:
+ config += '%s=%s\n' % (skey.upper(), fuel_conf[key][skey])
+
+ fname = os.path.join('/etc/sysconfig/network-scripts/',
+ key.lower().replace('_','-'))
+ with open(fname, 'wc') as f:
+ f.write(config)
+
+def transplant(dea, astute):
+ fuel_conf = dea.get_fuel_config()
+ require_network_restart = False
+ for key in fuel_conf.iterkeys():
+ if key == 'ADMIN_NETWORK':
+ for skey in fuel_conf[key].iterkeys():
+ astute[key][skey] = fuel_conf[key][skey]
+ elif re.match('^IFCFG', key):
+ log('Adding interface configuration for: %s' % key.lower())
+ require_network_restart = True
+ write_ifcfg_file(key, fuel_conf)
+ if astute.has_key(key):
+ astute.pop(key, None)
+ else:
+ astute[key] = fuel_conf[key]
+ if require_network_restart:
+ admin_ifcfg = '/etc/sysconfig/network-scripts/ifcfg-eth0'
+ exec_cmd('echo "DEFROUTE=no" >> %s' % admin_ifcfg)
+ log('At least one interface was reconfigured, restart network manager')
+ exec_cmd('systemctl restart network')
+ return astute
+
+
+def transplant_bootstrap(astute, fuel_bootstrap_cli):
+ if 'BOOTSTRAP' in astute:
+ for skey in astute['BOOTSTRAP'].iterkeys():
+ # FIXME: astute.yaml repos point to public ones instead of
+ # local mirrors, this filter should be removed when in sync
+ if skey != 'repos':
+ fuel_bootstrap_cli[skey] = astute['BOOTSTRAP'][skey]
+ return fuel_bootstrap_cli
+
+def main():
+ dea_file = parse_arguments()
+ check_file_exists(ASTUTE_YAML)
+ check_file_exists(FUEL_BOOTSTRAP_CLI_YAML)
+ dea = DeploymentEnvironmentAdapter(dea_file)
+ log('Reading astute file %s' % ASTUTE_YAML)
+ with io.open(ASTUTE_YAML) as stream:
+ astute = yaml.load(stream)
+ log('Initiating transplant')
+ transplant(dea, astute)
+ with io.open(ASTUTE_YAML, 'w') as stream:
+ yaml.dump(astute, stream, default_flow_style=False)
+ log('Transplant done')
+ # Update bootstrap config yaml with info from DEA/astute.yaml
+ with io.open(FUEL_BOOTSTRAP_CLI_YAML) as stream:
+ fuel_bootstrap_cli = yaml.load(stream)
+ transplant_bootstrap(astute, fuel_bootstrap_cli)
+ with io.open(FUEL_BOOTSTRAP_CLI_YAML, 'w') as stream:
+ yaml.dump(fuel_bootstrap_cli, stream, default_flow_style=False)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/buildprocedure/build.instruction.rst b/docs/buildprocedure/build.instruction.rst
new file mode 100644
index 000000000..d755ee5fb
--- /dev/null
+++ b/docs/buildprocedure/build.instruction.rst
@@ -0,0 +1,305 @@
+.. This document is protected/licensed under the following conditions
+.. (c) Jonas Bjurel (Ericsson AB)
+.. Licensed under a Creative Commons Attribution 4.0 International License.
+.. You should have received a copy of the license along with this work.
+.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+========
+Abstract
+========
+
+This document describes how to build the Fuel deployment tool for the
+Colorado release of OPNFV build system, dependencies and required
+system resources.
+
+============
+Introduction
+============
+
+This document describes the build system used to build the Fuel
+deployment tool for the Colorado release of OPNFV, required
+dependencies and minimum requirements on the host to be used for the
+build system.
+
+The Fuel build system is designed around Docker containers such that
+dependencies outside of the build system can be kept to a minimum. It
+also shields the host from any potential dangerous operations
+performed by the build system.
+
+The audience of this document is assumed to have good knowledge in
+network and Unix/Linux administration.
+
+============
+Requirements
+============
+
+Minimum Hardware Requirements
+=============================
+
+- ~30 GB available disc
+
+- 4 GB RAM
+
+Minimum Software Requirements
+=============================
+
+The build host should run Ubuntu 14.04 or 16.04 operating system.
+
+On the host, the following packages must be installed:
+
+- An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
+
+ - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported
+ - A kernel equal- or later than 3.19 (Vivid), simply available through
+
+.. code-block:: bash
+
+ $ sudo apt-get install linux-generic-lts-vivid
+
+- docker - see https://docs.docker.com/installation/ubuntulinux/ for
+ installation notes for Ubuntu 14.04. Note: use the latest version from
+ Docker (docker-engine) and not the one in Ubuntu 14.04.
+
+- git (simply available through $ sudo apt-get install git)
+
+- make (simply available through $ sudo apt-get install make)
+
+- curl (simply available through $ sudo apt-get install curl)
+
+============
+Preparations
+============
+
+Setting up the Docker build container
+=====================================
+
+After having installed Docker, add yourself to the docker group:
+
+.. code-block:: bash
+
+ $ sudo usermod -a -G docker [userid]
+
+Also make sure to define relevant DNS servers part of the global
+DNS chain in your </etc/default/docker> configuration file.
+Uncomment, and modify the values appropriately.
+
+For example:
+
+.. code-block:: bash
+
+ DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
+
+Then restart docker:
+
+.. code-block:: bash
+
+ $ sudo service docker restart
+
+Setting up OPNFV Gerrit in order to being able to clone the code
+----------------------------------------------------------------
+
+- Start setting up OPNFV gerrit by creating a SSH key (unless you
+ don't already have one), create one with ssh-keygen
+
+- Add your generated public key in OPNFV Gerrit <https://gerrit.opnfv.org/>
+ (this requires a Linux foundation account, create one if you do not
+ already have one)
+
+- Select "SSH Public Keys" to the left and then "Add Key" and paste
+ your public key in.
+
+Clone the OPNFV code Git repository with your SSH key
+-----------------------------------------------------
+
+Now it is time to clone the code repository:
+
+.. code-block:: bash
+
+ $ git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/fuel
+
+Now you should have the OPNFV fuel repository with the Fuel
+directories stored locally on your build host.
+
+Check out the Colorado release:
+
+.. code-block:: bash
+
+ $ cd fuel
+ $ git checkout colorado.1.0
+
+Clone the OPNFV code Git repository without a SSH key
+-----------------------------------------------------
+
+You can also opt to clone the code repository without a SSH key:
+
+.. code-block:: bash
+
+ $ git clone https://gerrit.opnfv.org/gerrit/fuel
+
+Make sure to checkout the release tag as described above.
+
+Support for building behind a http/https/rsync proxy
+====================================================
+
+The build system is able to make use of a web proxy setup if the
+http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or
+RSYNC_CONNECT_PROG environment variables have been set before invoking make.
+
+The proxy setup must permit port 80 (http) and 443 (https).
+Rsync protocol is currently not used during build process.
+
+Important note about the host Docker daemon settings
+----------------------------------------------------
+
+The Docker daemon on the host must be configured to use the http proxy
+for it to be able to pull the base Ubuntu 14.04 image from the Docker
+registry before invoking make! In Ubuntu this is done by adding a line
+like:
+
+.. code-block:: bash
+
+ export http_proxy="http://10.0.0.1:8888/"
+
+to /etc/default/docker and restarting the Docker daemon.
+
+Setting proxy environment variables prior to build
+--------------------------------------------------
+
+The build system will make use the following environment variables
+that needs to be exported to subshells by using export (bash) or
+setenv (csh/tcsh).
+
+.. code-block:: bash
+
+ http_proxy (or HTTP_PROXY)
+ https_proxy (or HTTP_PROXY)
+ no_proxy (or NO_PROXY)
+ RSYNC_PROXY
+ RSYNC_CONNECT_PROG
+
+As an example, these are the settings that were put in the user's
+.bashrc when verifying the proxy build functionality:
+
+.. code-block:: bash
+
+ export RSYNC_PROXY=10.0.0.1:8888
+ export http_proxy=http://10.0.0.1:8888
+ export https_proxy=http://10.0.0.1:8888
+ export no_proxy=localhost,127.0.0.1,.consultron.com,.sock
+
+Using a ssh proxy for the rsync connection
+------------------------------------------
+
+If the proxy setup is not allowing the rsync protocol, an alternative
+solution is to use a SSH tunnel to a machine capable of accessing the
+outbound port 873. Set the RSYNC_CONNECT_PROG according to the rsync
+manual page (for example to "ssh <username>@<hostname> nc %H 873")
+to enable this. Also note that netcat needs to be installed on the
+remote system!
+
+Make sure that the ssh command also refers to the user on the remote
+system, as the command itself will be run from the Docker build container
+as the root user (but with the invoking user's SSH keys).
+
+Configure your build environment
+================================
+
+** Configuring the build environment should not be performed if building
+standard Colorado release **
+
+Select the versions of the components you want to build by editing the
+fuel/build/config.mk file.
+
+Non official build: Selecting which plugins to build
+====================================================
+
+In order to cut the build time for unofficial builds (made by an
+individual developer locally), the selection if which Fuel plugins to
+build (if any) can be done by environment variable
+"BUILD_FUEL_PLUGINS" prior to building.
+
+Only the plugin targets from fuel/build/f_isoroot/Makefile that are
+specified in the environment variable will then be built. In order to
+completely disable the building of plugins, the environment variable
+is set to " ". When using this functionality, the resulting iso file
+will be prepended with the prefix "unofficial-" to clearly indicate
+that this is not a full build.
+
+This method of plugin selection is not meant to be used from within
+Gerrit!
+
+========
+Building
+========
+
+There are two methods available for building Fuel:
+
+- A low level method using Make
+
+- An abstracted method using build.sh
+
+Low level build method using make
+=================================
+
+The low level method is based on Make:
+
+From the <fuel/build> directory, invoke <make [target]>
+
+Following targets exist:
+
+- none/all - this will:
+
+ - Initialize the docker build environment
+
+ - Build Fuel from upstream (as defined by fuel-build/config-spec)
+
+ - Build the OPNFV defined plugins/features from upstream
+
+ - Build the defined additions to fuel (as defined by the structure
+ of this framework)
+
+ - Apply changes and patches to fuel (as defined by the structure of
+ this framework)
+
+ - Reconstruct a fuel .iso image
+
+- clean - this will remove all artifacts from earlier builds.
+
+- debug - this will simply enter the build container without starting a build, from here you can start a build by enter "make iso"
+
+If the build is successful, you will find the generated ISO file in
+the <fuel/build/release> subdirectory!
+
+Abstracted build method using build.sh
+======================================
+
+The abstracted build method uses the <fuel/ci/build.sh> script which
+allows you to:
+
+- Create and use a build cache - significantly speeding up the
+ build time if upstream repositories have not changed.
+
+- push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:)
+
+For more info type <fuel/ci/build.sh -h>.
+
+=========
+Artifacts
+=========
+
+The artifacts produced are:
+
+- <OPNFV_XXXX.iso> - Which represents the bootable Fuel image, XXXX is
+ replaced with the build identity provided to the build system
+
+- <OPNFV_XXXX.iso.txt> - Which holds version metadata.
+
+==========
+References
+==========
+
+1) `OPNFV Installation instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/installationprocedure/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/docs/installationprocedure/index.html
+
+2) `OPNFV Build instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/buildprocedure/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/docs/buildprocedure/index.html
+
+3) `OPNFV Release Note for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/releasenotes/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/docs/releasenotes/index.html
diff --git a/docs/buildprocedure/index.rst b/docs/buildprocedure/index.rst
new file mode 100644
index 000000000..4f88814b5
--- /dev/null
+++ b/docs/buildprocedure/index.rst
@@ -0,0 +1,16 @@
+.. This document is protected/licensed under the following conditions
+.. (c) Jonas Bjurel (Ericsson AB)
+.. Licensed under a Creative Commons Attribution 4.0 International License.
+.. You should have received a copy of the license along with this work.
+.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+*********************************
+Build instruction for Fuel\@OPNFV
+*********************************
+
+.. toctree::
+ :numbered:
+ :maxdepth: 2
+
+ build.instruction.rst
+
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 000000000..6cd69313d
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,28 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 Linux Foundation 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
+##############################################################################
+
+# Copied from releng/docs/etc/conf.py
+extensions = ['sphinxcontrib.httpdomain',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.napoleon']
+
+needs_sphinx = '1.3'
+master_doc = 'index'
+pygments_style = 'sphinx'
+
+html_use_index = False
+numfig = True
+html_logo = 'opnfv-logo.png'
+
+latex_domain_indices = False
+latex_logo = 'opnfv-logo.png'
+
+# addtional config
+latex_elements = {'figure_align': 'H'}
diff --git a/docs/installationprocedure/img/addnodes.png b/docs/installationprocedure/img/addnodes.png
new file mode 100644
index 000000000..b62405692
--- /dev/null
+++ b/docs/installationprocedure/img/addnodes.png
Binary files differ
diff --git a/docs/installationprocedure/img/compute.png b/docs/installationprocedure/img/compute.png
new file mode 100644
index 000000000..fc1cf0f22
--- /dev/null
+++ b/docs/installationprocedure/img/compute.png
Binary files differ
diff --git a/docs/installationprocedure/img/computelist.png b/docs/installationprocedure/img/computelist.png
new file mode 100644
index 000000000..474196536
--- /dev/null
+++ b/docs/installationprocedure/img/computelist.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelconsole1.png b/docs/installationprocedure/img/fuelconsole1.png
new file mode 100644
index 000000000..61703cab1
--- /dev/null
+++ b/docs/installationprocedure/img/fuelconsole1.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelmenu1.png b/docs/installationprocedure/img/fuelmenu1.png
new file mode 100644
index 000000000..ee7a0edb2
--- /dev/null
+++ b/docs/installationprocedure/img/fuelmenu1.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelmenu2.png b/docs/installationprocedure/img/fuelmenu2.png
new file mode 100644
index 000000000..4dcbb6e68
--- /dev/null
+++ b/docs/installationprocedure/img/fuelmenu2.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelmenu3.png b/docs/installationprocedure/img/fuelmenu3.png
new file mode 100644
index 000000000..23e61975b
--- /dev/null
+++ b/docs/installationprocedure/img/fuelmenu3.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelmenu4.png b/docs/installationprocedure/img/fuelmenu4.png
new file mode 100644
index 000000000..3be29cd66
--- /dev/null
+++ b/docs/installationprocedure/img/fuelmenu4.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelmenu5.png b/docs/installationprocedure/img/fuelmenu5.png
new file mode 100644
index 000000000..e3d215459
--- /dev/null
+++ b/docs/installationprocedure/img/fuelmenu5.png
Binary files differ
diff --git a/docs/installationprocedure/img/fuelmenu6.png b/docs/installationprocedure/img/fuelmenu6.png
new file mode 100644
index 000000000..cafbcddfc
--- /dev/null
+++ b/docs/installationprocedure/img/fuelmenu6.png
Binary files differ
diff --git a/docs/installationprocedure/img/grub-1.png b/docs/installationprocedure/img/grub-1.png
new file mode 100644
index 000000000..e64b79373
--- /dev/null
+++ b/docs/installationprocedure/img/grub-1.png
Binary files differ
diff --git a/docs/installationprocedure/img/health.png b/docs/installationprocedure/img/health.png
new file mode 100644
index 000000000..57bd8cf70
--- /dev/null
+++ b/docs/installationprocedure/img/health.png
Binary files differ
diff --git a/docs/installationprocedure/img/interfaceconf.png b/docs/installationprocedure/img/interfaceconf.png
new file mode 100644
index 000000000..e00b03f03
--- /dev/null
+++ b/docs/installationprocedure/img/interfaceconf.png
Binary files differ
diff --git a/docs/installationprocedure/img/interfaces.png b/docs/installationprocedure/img/interfaces.png
new file mode 100644
index 000000000..291e434f6
--- /dev/null
+++ b/docs/installationprocedure/img/interfaces.png
Binary files differ
diff --git a/docs/installationprocedure/img/network.png b/docs/installationprocedure/img/network.png
new file mode 100644
index 000000000..7bef05064
--- /dev/null
+++ b/docs/installationprocedure/img/network.png
Binary files differ
diff --git a/docs/installationprocedure/img/neutronl3.png b/docs/installationprocedure/img/neutronl3.png
new file mode 100644
index 000000000..36291ef87
--- /dev/null
+++ b/docs/installationprocedure/img/neutronl3.png
Binary files differ
diff --git a/docs/installationprocedure/img/newenv.png b/docs/installationprocedure/img/newenv.png
new file mode 100644
index 000000000..d6bc2827f
--- /dev/null
+++ b/docs/installationprocedure/img/newenv.png
Binary files differ
diff --git a/docs/installationprocedure/img/nodes.png b/docs/installationprocedure/img/nodes.png
new file mode 100644
index 000000000..771e4813d
--- /dev/null
+++ b/docs/installationprocedure/img/nodes.png
Binary files differ
diff --git a/docs/installationprocedure/img/offloadingmodes.png b/docs/installationprocedure/img/offloadingmodes.png
new file mode 100644
index 000000000..5b3cb17bc
--- /dev/null
+++ b/docs/installationprocedure/img/offloadingmodes.png
Binary files differ
diff --git a/docs/installationprocedure/img/other.png b/docs/installationprocedure/img/other.png
new file mode 100644
index 000000000..c088488dc
--- /dev/null
+++ b/docs/installationprocedure/img/other.png
Binary files differ
diff --git a/docs/installationprocedure/img/plugin_install.png b/docs/installationprocedure/img/plugin_install.png
new file mode 100644
index 000000000..ff50633ed
--- /dev/null
+++ b/docs/installationprocedure/img/plugin_install.png
Binary files differ
diff --git a/docs/installationprocedure/img/plugins.png b/docs/installationprocedure/img/plugins.png
new file mode 100644
index 000000000..8f7ea596f
--- /dev/null
+++ b/docs/installationprocedure/img/plugins.png
Binary files differ
diff --git a/docs/installationprocedure/img/verifynet.png b/docs/installationprocedure/img/verifynet.png
new file mode 100644
index 000000000..e675562c0
--- /dev/null
+++ b/docs/installationprocedure/img/verifynet.png
Binary files differ
diff --git a/docs/installationprocedure/index.rst b/docs/installationprocedure/index.rst
new file mode 100644
index 000000000..8e61be219
--- /dev/null
+++ b/docs/installationprocedure/index.rst
@@ -0,0 +1,15 @@
+.. This document is protected/licensed under the following conditions
+.. (c) Jonas Bjurel (Ericsson AB)
+.. Licensed under a Creative Commons Attribution 4.0 International License.
+.. You should have received a copy of the license along with this work.
+.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+****************************************
+Installation instruction for Fuel\@OPNFV
+****************************************
+
+.. toctree::
+ :numbered:
+ :maxdepth: 2
+
+ installation.instruction.rst
diff --git a/docs/installationprocedure/installation.instruction.rst b/docs/installationprocedure/installation.instruction.rst
new file mode 100644
index 000000000..2d6889bf8
--- /dev/null
+++ b/docs/installationprocedure/installation.instruction.rst
@@ -0,0 +1,691 @@
+.. This document is protected/licensed under the following conditions
+.. (c) Jonas Bjurel (Ericsson AB)
+.. Licensed under a Creative Commons Attribution 4.0 International License.
+.. You should have received a copy of the license along with this work.
+.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+========
+Abstract
+========
+
+This document describes how to install the Colorado release of
+OPNFV when using Fuel as a deployment tool, covering its usage,
+limitations, dependencies and required system resources.
+
+============
+Introduction
+============
+
+This document provides guidelines on how to install and
+configure the Colorado release of OPNFV when using Fuel as a
+deployment tool, including required software and hardware configurations.
+
+Although the available installation options give a high degree of
+freedom in how the system is set-up, including architecture, services
+and features, etc., said permutations may not provide an OPNFV
+compliant reference architecture. This instruction provides a
+step-by-step guide that results in an OPNFV Colorado compliant
+deployment.
+
+The audience of this document is assumed to have good knowledge in
+networking and Unix/Linux administration.
+
+=======
+Preface
+=======
+
+Before starting the installation of the Colorado release of
+OPNFV, using Fuel as a deployment tool, some planning must be
+done.
+
+Retrieving the ISO image
+========================
+
+First of all, the Fuel deployment ISO image needs to be retrieved, the
+Fuel .iso image of the Colorado release can be found at *Reference: 2*
+
+Building the ISO image
+======================
+
+Alternatively, you may build the Fuel .iso from source by cloning the
+opnfv/fuel git repository. To retrieve the repository for the Colorado
+release use the following command:
+
+.. code-block:: bash
+
+ $ git clone https://gerrit.opnfv.org/gerrit/fuel
+
+Check-out the Colorado release tag to set the HEAD to the
+baseline required to replicate the Colorado release:
+
+.. code-block:: bash
+
+ $ git checkout colorado.1.0
+
+Go to the fuel directory and build the .iso:
+
+.. code-block:: bash
+
+ $ cd fuel/build; make all
+
+For more information on how to build, please see *Reference: 14*
+
+Other preparations
+==================
+
+Next, familiarize yourself with Fuel by reading the following documents:
+
+- Fuel Installation Guide, please see *Reference: 8*
+
+- Fuel User Guide, please see *Reference: 9*
+
+- Fuel Developer Guide, please see *Reference: 10*
+
+- Fuel Plugin Developers Guide, please see *Reference: 11*
+
+Prior to installation, a number of deployment specific parameters must be collected, those are:
+
+#. Provider sub-net and gateway information
+
+#. Provider VLAN information
+
+#. Provider DNS addresses
+
+#. Provider NTP addresses
+
+#. Network overlay you plan to deploy (VLAN, VXLAN, FLAT)
+
+#. How many nodes and what roles you want to deploy (Controllers, Storage, Computes)
+
+#. Monitoring options you want to deploy (Ceilometer, Syslog, etc.).
+
+#. Other options not covered in the document are available in the links above
+
+
+This information will be needed for the configuration procedures
+provided in this document.
+
+=====================
+Hardware requirements
+=====================
+
+The following minimum hardware requirements must be met for the
+installation of Colorado using Fuel:
+
++--------------------+------------------------------------------------------+
+| **HW Aspect** | **Requirement** |
+| | |
++====================+======================================================+
+| **# of nodes** | Minimum 5 (3 for non redundant deployment): |
+| | |
+| | - 1 Fuel deployment master (may be virtualized) |
+| | |
+| | - 3(1) Controllers (1 colocated mongo/ceilometer |
+| | role, 2 Ceph-OSD roles) |
+| | |
+| | - 1 Compute (1 co-located Ceph-OSD role) |
+| | |
++--------------------+------------------------------------------------------+
+| **CPU** | Minimum 1 socket x86_AMD64 with Virtualization |
+| | support |
++--------------------+------------------------------------------------------+
+| **RAM** | Minimum 16GB/server (Depending on VNF work load) |
+| | |
++--------------------+------------------------------------------------------+
+| **Disk** | Minimum 256GB 10kRPM spinning disks |
+| | |
++--------------------+------------------------------------------------------+
+| **Networks** | 4 Tagged VLANs (PUBLIC, MGMT, STORAGE, PRIVATE) |
+| | |
+| | 1 Un-Tagged VLAN for PXE Boot - ADMIN Network |
+| | |
+| | Note: These can be allocated to a single NIC - |
+| | or spread out over multiple NICs as your hardware |
+| | supports. |
++--------------------+------------------------------------------------------+
+
+===============================
+Help with Hardware Requirements
+===============================
+
+Calculate hardware requirements:
+
+For information on compatible hardware types available for use, please see *Reference: 11*.
+
+When choosing the hardware on which you will deploy your OpenStack
+environment, you should think about:
+
+- CPU -- Consider the number of virtual machines that you plan to deploy in your cloud environment and the CPU per virtual machine.
+
+- Memory -- Depends on the amount of RAM assigned per virtual machine and the controller node.
+
+- Storage -- Depends on the local drive space per virtual machine, remote volumes that can be attached to a virtual machine, and object storage.
+
+- Networking -- Depends on the Choose Network Topology, the network bandwidth per virtual machine, and network storage.
+
+================================================
+Top of the rack (TOR) Configuration requirements
+================================================
+
+The switching infrastructure provides connectivity for the OPNFV
+infrastructure operations, tenant networks (East/West) and provider
+connectivity (North/South); it also provides needed connectivity for
+the Storage Area Network (SAN).
+To avoid traffic congestion, it is strongly suggested that three
+physically separated networks are used, that is: 1 physical network
+for administration and control, one physical network for tenant private
+and public networks, and one physical network for SAN.
+The switching connectivity can (but does not need to) be fully redundant,
+in such case it comprises a redundant 10GE switch pair for each of the
+three physically separated networks.
+
+The physical TOR switches are **not** automatically configured from
+the Fuel OPNFV reference platform. All the networks involved in the OPNFV
+infrastructure as well as the provider networks and the private tenant
+VLANs needs to be manually configured.
+
+Manual configuration of the Colorado hardware platform should
+be carried out according to the OPNFV Pharos specification:
+<https://wiki.opnfv.org/display/pharos/Pharos+Specification>
+
+==========================================
+OPNFV Software installation and deployment
+==========================================
+
+This section describes the installation of the OPNFV installation
+server (Fuel master) as well as the deployment of the full OPNFV
+reference platform stack across a server cluster.
+
+Install Fuel master
+===================
+
+#. Mount the Colorado Fuel ISO file/media as a boot device to the jump host server.
+
+#. Reboot the jump host to establish the Fuel server.
+
+ - The system now boots from the ISO image.
+
+ - Select "Fuel Install (Static IP)" (See figure below)
+
+ - Press [Enter].
+
+ .. figure:: img/grub-1.png
+
+#. Wait until the Fuel setup screen is shown (Note: This can take up to 30 minutes).
+
+#. In the "Fuel User" section - Confirm/change the default password (See figure below)
+
+ - Enter "admin" in the Fuel password input
+
+ - Enter "admin" in the Confirm password input
+
+ - Select "Check" and press [Enter]
+
+ .. figure:: img/fuelmenu1.png
+
+#. In the "Network Setup" section - Configure DHCP/Static IP information for your FUEL node - For example, ETH0 is 10.20.0.2/24 for FUEL booting and ETH1 is DHCP in your corporate/lab network (see figure below).
+
+ - Configure eth1 or other network interfaces here as well (if you have them present on your FUEL server).
+
+ .. figure:: img/fuelmenu2.png
+
+#. In the "PXE Setup" section (see figure below) - Change the following fields to appropriate values (example below):
+
+ - DHCP Pool Start 10.20.0.3
+
+ - DHCP Pool End 10.20.0.254
+
+ - DHCP Pool Gateway 10.20.0.2 (IP address of Fuel node)
+
+ .. figure:: img/fuelmenu3.png
+
+#. In the "DNS & Hostname" section (see figure below) - Change the following fields to appropriate values:
+
+ - Hostname
+
+ - Domain
+
+ - Search Domain
+
+ - External DNS
+
+ - Hostname to test DNS
+
+ - Select <Check> and press [Enter]
+
+ .. figure:: img/fuelmenu4.png
+
+
+#. OPTION TO ENABLE PROXY SUPPORT - In the "Bootstrap Image" section (see figure below), edit the following fields to define a proxy. (**NOTE:** cannot be used in tandem with local repository support)
+
+ - Navigate to "HTTP proxy" and enter your http proxy address
+
+ - Select <Check> and press [Enter]
+
+ .. figure:: img/fuelmenu5.png
+
+#. In the "Time Sync" section (see figure below) - Change the following fields to appropriate values:
+
+ - NTP Server 1 <Customer NTP server 1>
+
+ - NTP Server 2 <Customer NTP server 2>
+
+ - NTP Server 3 <Customer NTP server 3>
+
+ .. figure:: img/fuelmenu6.png
+
+#. Start the installation.
+
+ - Select Quit Setup and press Save and Quit.
+
+ - The installation will now start, wait until the login screen is shown.
+
+Boot the Node Servers
+=====================
+
+After the Fuel Master node has rebooted from the above steps and is at
+the login prompt, you should boot the Node Servers (Your
+Compute/Control/Storage blades, nested or real) with a PXE booting
+scheme so that the FUEL Master can pick them up for control.
+
+#. Enable PXE booting
+
+ - For every controller and compute server: enable PXE Booting as the first boot device in the BIOS boot order menu, and hard disk as the second boot device in the same menu.
+
+#. Reboot all the control and compute blades.
+
+#. Wait for the availability of nodes showing up in the Fuel GUI.
+
+ - Connect to the FUEL UI via the URL provided in the Console (default: https://10.20.0.2:8443)
+
+ - Wait until all nodes are displayed in top right corner of the Fuel GUI: Total nodes and Unallocated nodes (see figure below).
+
+ .. figure:: img/nodes.png
+
+Install additional Plugins/Features on the FUEL node
+====================================================
+
+#. SSH to your FUEL node (e.g. root@10.20.0.2 pwd: r00tme)
+
+#. Select wanted plugins/features from the /opt/opnfv/ directory.
+
+#. Install the wanted plugin with the command
+
+ .. code-block:: bash
+
+ $ fuel plugins --install /opt/opnfv/<plugin-name>-<version>.<arch>.rpm
+
+ Expected output (see figure below):
+
+ .. code-block:: bash
+
+ Plugin ....... was successfully installed.
+
+ .. figure:: img/plugin_install.png
+
+Create an OpenStack Environment
+===============================
+
+#. Connect to Fuel WEB UI with a browser (default: https://10.20.0.2:8443) (login: admin/admin)
+
+#. Create and name a new OpenStack environment, to be installed.
+
+ .. figure:: img/newenv.png
+
+#. Select "<Mitaka on Ubuntu 14.04>" and press <Next>
+
+#. Select "compute virtulization method".
+
+ - Select "QEMU-KVM as hypervisor" and press <Next>
+
+#. Select "network mode".
+
+ - Select "Neutron with ML2 plugin"
+
+ - Select "Neutron with tunneling segmentation" (Required when using the ODL or ONOS plugins)
+
+ - Press <Next>
+
+#. Select "Storage Back-ends".
+
+ - Select "Ceph for block storage" and press <Next>
+
+#. Select "additional services" you wish to install.
+
+ - Check option "Install Ceilometer and Aodh" and press <Next>
+
+#. Create the new environment.
+
+ - Click <Create> Button
+
+Configure the network environment
+=================================
+
+#. Open the environment you previously created.
+
+#. Open the networks tab and select the "default" Node Networks group to on the left pane (see figure below).
+
+ .. figure:: img/network.png
+
+#. Update the Public network configuration and change the following fields to appropriate values:
+
+ - CIDR to <CIDR for Public IP Addresses>
+
+ - IP Range Start to <Public IP Address start>
+
+ - IP Range End to <Public IP Address end>
+
+ - Gateway to <Gateway for Public IP Addresses>
+
+ - Check <VLAN tagging>.
+
+ - Set appropriate VLAN id.
+
+#. Update the Storage Network Configuration
+
+ - Set CIDR to appropriate value (default 192.168.1.0/24)
+
+ - Set IP Range Start to appropriate value (default 192.168.1.1)
+
+ - Set IP Range End to appropriate value (default 192.168.1.254)
+
+ - Set vlan to appropriate value (default 102)
+
+#. Update the Management network configuration.
+
+ - Set CIDR to appropriate value (default 192.168.0.0/24)
+
+ - Set IP Range Start to appropriate value (default 192.168.0.1)
+
+ - Set IP Range End to appropriate value (default 192.168.0.254)
+
+ - Check <VLAN tagging>.
+
+ - Set appropriate VLAN id. (default 101)
+
+#. Update the Private Network Information
+
+ - Set CIDR to appropriate value (default 192.168.2.0/24
+
+ - Set IP Range Start to appropriate value (default 192.168.2.1)
+
+ - Set IP Range End to appropriate value (default 192.168.2.254)
+
+ - Check <VLAN tagging>.
+
+ - Set appropriate VLAN tag (default 103)
+
+#. Select the "Neutron L3" Node Networks group on the left pane.
+
+ .. figure:: img/neutronl3.png
+
+#. Update the Floating Network configuration.
+
+ - Set the Floating IP range start (default 172.16.0.130)
+
+ - Set the Floating IP range end (default 172.16.0.254)
+
+ - Set the Floating network name (default admin_floating_net)
+
+#. Update the Internal Network configuration.
+
+ - Set Internal network CIDR to an appropriate value (default 192.168.111.0/24)
+
+ - Set Internal network gateway to an appropriate value
+
+ - Set the Internal network name (default admin_internal_net)
+
+#. Update the Guest OS DNS servers.
+
+ - Set Guest OS DNS Server values appropriately
+
+#. Save Settings.
+
+#. Select the "Other" Node Networks group on the left pane (see figure below).
+
+ .. figure:: img/other.png
+
+#. Update the Public network assignment.
+
+ - Check the box for "Assign public network to all nodes" (Required by OpenDaylight)
+
+#. Update Host OS DNS Servers.
+
+ - Provide the DNS server settings
+
+#. Update Host OS NTP Servers.
+
+ - Provide the NTP server settings
+
+Select Hypervisor type
+======================
+
+#. In the FUEL UI of your Environment, click the "Settings" Tab
+
+#. Select "Compute" on the left side pane (see figure below)
+
+ - Check the KVM box and press "Save settings"
+
+ .. figure:: img/compute.png
+
+Enable Plugins
+==============
+
+#. In the FUEL UI of your Environment, click the "Settings" Tab
+
+#. Select Other on the left side pane (see figure below)
+
+ - Enable and configure the plugins of your choice
+
+ .. figure:: img/plugins.png
+
+Allocate nodes to environment and assign functional roles
+=========================================================
+
+#. Click on the "Nodes" Tab in the FUEL WEB UI (see figure below).
+
+ .. figure:: img/addnodes.png
+
+#. Assign roles (see figure below).
+
+ - Click on the <+Add Nodes> button
+
+ - Check <Controller>, <Telemetry - MongoDB> and optionally an SDN Controller role (OpenDaylight controller/ONOS) in the "Assign Roles" Section.
+
+ - Check one node which you want to act as a Controller from the bottom half of the screen
+
+ - Click <Apply Changes>.
+
+ - Click on the <+Add Nodes> button
+
+ - Check the <Controller> and <Storage - Ceph OSD> roles.
+
+ - Check the two next nodes you want to act as Controllers from the bottom half of the screen
+
+ - Click <Apply Changes>
+
+ - Click on <+Add Nodes> button
+
+ - Check the <Compute> and <Storage - Ceph OSD> roles.
+
+ - Check the Nodes you want to act as Computes from the bottom half of the screen
+
+ - Click <Apply Changes>.
+
+ .. figure:: img/computelist.png
+
+#. Configure interfaces (see figure below).
+
+ - Check Select <All> to select all allocated nodes
+
+ - Click <Configure Interfaces>
+
+ - Assign interfaces (bonded) for mgmt-, admin-, private-, public- and storage networks
+
+ - Click <Apply>
+
+ .. figure:: img/interfaceconf.png
+
+OPTIONAL - Set Local Mirror Repos
+=================================
+
+The following steps must be executed if you are in an environment with
+no connection to the Internet. The Fuel server delivers a local repo
+that can be used for installation / deployment of openstack.
+
+#. In the Fuel UI of your Environment, click the Settings Tab and select General from the left pane.
+
+ - Replace the URI values for the "Name" values outlined below:
+
+ - "ubuntu" URI="deb http://<ip-of-fuel-server>:8080/mirrors/ubuntu/ trusty main universe multiverse"
+
+ - "ubuntu-security" URI="deb http://<ip-of-fuel-server>:8080/mirrors/ubuntu/ trusty-security main universe multiverse"
+
+ - "ubuntu-updates" URI="deb http://<ip-of-fuel-server>:8080/mirrors/ubuntu/ trusty-updates main universe multiverse"
+
+ - "mos" URI="deb http://<ip-of-fuel-server>::8080/mitaka-9.0/ubuntu/x86_64 mos9.0 main restricted"
+
+ - "Auxiliary" URI="deb http://<ip-of-fuel-server>:8080/mitaka-9.0/ubuntu/auxiliary auxiliary main restricted"
+
+ - Click <Save Settings> at the bottom to Save your changes
+
+Target specific configuration
+=============================
+
+#. Set up targets for provisioning with non-default "Offloading Modes"
+
+ Some target nodes may require additional configuration after they are
+ PXE booted (bootstrapped); the most frequent changes are in defaults
+ for ethernet devices' "Offloading Modes" settings (e.g. some targets'
+ ethernet drivers may strip VLAN traffic by default).
+
+ If your target ethernet drivers have wrong "Offloading Modes" defaults,
+ in "Configure interfaces" page (described above), expand affected
+ interface's "Offloading Modes" and [un]check the relevant settings
+ (see figure below):
+
+ .. figure:: img/offloadingmodes.png
+
+#. Set up targets for "Verify Networks" with non-default "Offloading Modes"
+
+ **NOTE**: Check *Reference 15* for an updated and comprehensive list of
+ known issues and/or limitations, including "Offloading Modes" not being
+ applied during "Verify Networks" step.
+
+ Setting custom "Offloading Modes" in Fuel GUI will only apply those settings
+ during provisiong and **not** during "Verify Networks", so if your targets
+ need this change, you have to apply "Offloading Modes" settings by hand
+ to bootstrapped nodes.
+
+ **E.g.**: Our driver has "rx-vlan-filter" default "on" (expected "off") on
+ the Openstack interface(s) "eth1", preventing VLAN traffic from passing
+ during "Verify Networks".
+
+ - From Fuel master console identify target nodes admin IPs (see figure below):
+
+ .. code-block:: bash
+
+ $ fuel nodes
+
+ .. figure:: img/fuelconsole1.png
+
+ - SSH into each of the target nodes and disable "rx-vlan-filter" on the
+ affected physical interface(s) allocated for OpenStack traffic (eth1):
+
+ .. code-block:: bash
+
+ $ ssh root@10.20.0.6 ethtool -K eth1 rx-vlan-filter off
+
+ - Repeat the step above for all affected nodes/interfaces in the POD.
+
+Verify Networks
+===============
+
+It is important that the Verify Networks action is performed as it will verify
+that communicate works for the networks you have setup, as well as check that
+packages needed for a successful deployment can be fetched.
+
+#. From the FUEL UI in your Environment, Select the Networks Tab and select "Connectivity check" on the left pane (see figure below)
+
+ - Select <Verify Networks>
+
+ - Continue to fix your topology (physical switch, etc) until the "Verification Succeeded" and "Your network is configured correctly" message is shown
+
+ .. figure:: img/verifynet.png
+
+Deploy Your Environment
+=======================
+
+#. Deploy the environment.
+
+ - In the Fuel GUI, click on the "Dashboard" Tab.
+
+ - Click on <Deploy Changes> in the "Ready to Deploy?" section
+
+ - Examine any information notice that pops up and click <Deploy>
+
+ Wait for your deployment to complete, you can view the "Dashboard"
+ Tab to see the progress and status of your deployment.
+
+=========================
+Installation health-check
+=========================
+
+#. Perform system health-check (see figure below)
+
+ - Click the "Health Check" tab inside your Environment in the FUEL Web UI
+
+ - Check <Select All> and Click <Run Tests>
+
+ - Allow tests to run and investigate results where appropriate
+
+ .. figure:: img/health.png
+
+==========
+References
+==========
+
+OPNFV
+=====
+
+1) `OPNFV Home Page <http://www.opnfv.org>`_: http://www.opnfv.org
+
+2) `OPNFV documentation- and software downloads <https://www.opnfv.org/software/download>`_: https://www.opnfv.org/software/download
+
+OpenStack
+=========
+
+3) `OpenStack Mitaka Release artifacts <http://www.openstack.org/software/mitaka>`_: http://www.openstack.org/software/mitaka
+
+4) `OpenStack documentation <http://docs.openstack.org>`_: http://docs.openstack.org
+
+OpenDaylight
+============
+
+5) `OpenDaylight artifacts <http://www.opendaylight.org/software/downloads>`_: http://www.opendaylight.org/software/downloads
+
+Fuel
+====
+
+6) `The Fuel OpenStack project <https://wiki.openstack.org/wiki/Fuel>`_: https://wiki.openstack.org/wiki/Fuel
+
+7) `Fuel documentation overview <http://docs.openstack.org/developer/fuel-docs>`_: http://docs.openstack.org/developer/fuel-docs
+
+8) `Fuel Installation Guide <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide.html>`_: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide.html
+
+9) `Fuel User Guide <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide.html>`_: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide.html
+
+10) `Fuel Developer Guide <http://docs.openstack.org/developer/fuel-docs/devdocs/develop.html>`_: http://docs.openstack.org/developer/fuel-docs/devdocs/develop.html
+
+11) `Fuel Plugin Developers Guide <http://docs.openstack.org/developer/fuel-docs/plugindocs/fuel-plugin-sdk-guide.html>`_: http://docs.openstack.org/developer/fuel-docs/plugindocs/fuel-plugin-sdk-guide.html
+
+12) `Fuel OpenStack Hardware Compatibility List <https://www.mirantis.com/products/openstack-drivers-and-plugins/hardware-compatibility-list>`_: https://www.mirantis.com/products/openstack-drivers-and-plugins/hardware-compatibility-list
+
+Fuel in OPNFV
+=============
+
+13) `OPNFV Installation instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/installationprocedure/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/docs/installationprocedure/index.html
+
+14) `OPNFV Build instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/buildprocedure/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/docs/buildprocedure/index.html
+
+15) `OPNFV Release Note for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/releasenotes/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/docs/releasenotes/index.html
diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst
new file mode 100644
index 000000000..db97a7492
--- /dev/null
+++ b/docs/releasenotes/index.rst
@@ -0,0 +1,16 @@
+.. This document is protected/licensed under the following conditions
+.. (c) Jonas Bjurel (Ericsson AB)
+.. Licensed under a Creative Commons Attribution 4.0 International License.
+.. You should have received a copy of the license along with this work.
+.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+*****************************
+Release notes for Fuel\@OPNFV
+*****************************
+
+.. toctree::
+ :numbered:
+ :maxdepth: 2
+
+ release-notes.rst
+
diff --git a/docs/releasenotes/release-notes.rst b/docs/releasenotes/release-notes.rst
new file mode 100644
index 000000000..c3398df19
--- /dev/null
+++ b/docs/releasenotes/release-notes.rst
@@ -0,0 +1,260 @@
+.. This document is protected/licensed under the following conditions
+.. (c) Jonas Bjurel (Ericsson AB)
+.. Licensed under a Creative Commons Attribution 4.0 International License.
+.. You should have received a copy of the license along with this work.
+.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+========
+Abstract
+========
+
+This document compiles the release notes for the Colorado 1.0 release of
+OPNFV when using Fuel as a deployment tool.
+
+===============
+Important notes
+===============
+
+These notes provides release information for the use of Fuel as deployment
+tool for the Colorado 1.0 release of OPNFV.
+
+The goal of the Colorado release and this Fuel-based deployment process is
+to establish a lab ready platform accelerating further development
+of the OPNFV infrastructure.
+
+Carefully follow the installation-instructions provided in *Reference 13*.
+
+=======
+Summary
+=======
+
+For Colorado, the typical use of Fuel as an OpenStack installer is
+supplemented with OPNFV unique components such as:
+
+- `OpenDaylight <http://www.opendaylight.org/software>`_ version "Beryllium SR3" [1]_ 'http://www.opendaylight.org/software'
+
+- `ONOS <http://onosproject.org/>`_ version "Drake" 'http://onosproject.org/'
+
+- `Service function chaining <https://wiki.opnfv.org/service_function_chaining>`_ 'https://wiki.opnfv.org/service_function_chaining'
+
+- `SDN distributed routing and VPN <https://wiki.opnfv.org/sdnvpn>`_ 'https://wiki.opnfv.org/sdnvpn'
+
+- `NFV Hypervisors-KVM <https://wiki.opnfv.org/nfv-kvm>`_ 'https://wiki.opnfv.org/nfv-kvm'
+
+- `Open vSwitch for NFV <https://wiki.opnfv.org/ovsnfv>`_ 'https://wiki.opnfv.org/ovsnfv'
+
+- `VSPERF <https://wiki.opnfv.org/characterize_vswitch_performance_for_telco_nfv_use_cases>`_ 'https://wiki.opnfv.org/characterize_vswitch_performance_for_telco_nfv_use_cases'
+
+- `Promise <https://wiki.opnfv.org/display/promise>`_ 'https://wiki.opnfv.org/display/promise'
+
+- `Parser <https://wiki.opnfv.org/display/parser>`_ 'https://wiki.opnfv.org/display/parser'
+
+- `Doctor <https://wiki.opnfv.org/display/doctor>`_ 'https://wiki.opnfv.org/display/doctor'
+
+As well as OPNFV-unique configurations of the Hardware- and Software stack.
+
+This Colorado artifact provides Fuel as the deployment stage tool in the
+OPNFV CI pipeline including:
+
+- Documentation built by Jenkins
+
+ - overall OPNFV documentation
+
+ - this document (release notes)
+
+ - installation instructions
+
+ - build-instructions
+
+- The Colorado Fuel installer image (.iso) built by Jenkins
+
+- Automated deployment of Colorado with running on bare metal or a nested hypervisor environment (KVM)
+
+- Automated validation of the Colorado deployment
+
+============
+Release Data
+============
+
++--------------------------------------+--------------------------------------+
+| **Project** | fuel |
+| | |
++--------------------------------------+--------------------------------------+
+| **Repo/tag** | colorado.1.0 |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release designation** | Colorado 1.0 main release |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release date** | September 22 2016 |
+| | |
++--------------------------------------+--------------------------------------+
+| **Purpose of the delivery** | Colorado alignment to Released |
+| | Fuel 9.0 baseline + features and |
+| | bug-fixes for the following |
+| | feaures: |
+| | - NFV Hypervisors-KVM |
+| | - Open vSwitch for NFV |
+| | - OpenDaylight |
+| | - ONOS |
+| | - SDN distributed routing and VPN |
+| | - Service function chaining |
+| | - Promise |
+| | - Parser |
+| | - Doctor |
+| | |
++--------------------------------------+--------------------------------------+
+
+Version change
+==============
+
+Module version changes
+----------------------
+This is the Colorado 1.0 main release.
+It is based on following upstream versions:
+
+- Fuel 9.0 Base release
+
+- OpenStack Mitaka release
+
+- OpenDaylight Beryllium SR3 release [1]_
+
+- ONOS Drake release
+
+Document changes
+----------------
+This is the Colorado 1.0 main release.
+It comes with the following documentation:
+
+- Installation instructions - *Reference 13* - **Changed**
+
+- Build instructions - *Reference 14* - **Changed**
+
+- Release notes - *Reference 15* - **Changed** (This document)
+
+Reason for version
+==================
+
+Feature additions
+-----------------
+
+**JIRA TICKETS:**
+
+
+Bug corrections
+---------------
+
+**JIRA TICKETS:**
+
+`Colorado 1.0 bug fixes <https://jira.opnfv.org/issues/?filter=11180>`_ 'https://jira.opnfv.org/issues/?filter=11180'
+
+(Also See respective Integrated feature project's bug tracking)
+
+Deliverables
+============
+
+Software deliverables
+---------------------
+
+Fuel-based installer iso file found in *Reference 2*
+
+Documentation deliverables
+--------------------------
+
+- Installation instructions - *Reference 13*
+
+- Build instructions - *Reference 14*
+
+- Release notes - *Reference 15* (This document)
+
+=========================================
+Known Limitations, Issues and Workarounds
+=========================================
+
+System Limitations
+==================
+
+- **Max number of blades:** 1 Fuel master, 3 Controllers, 20 Compute blades
+
+- **Min number of blades:** 1 Fuel master, 1 Controller, 1 Compute blade
+
+- **Storage:** Ceph is the only supported storage configuration
+
+- **Max number of networks:** 65k
+
+
+Known issues
+============
+
+**JIRA TICKETS:**
+
+`Known issues <https://jira.opnfv.org/issues/?filter=11183>`_ 'https://jira.opnfv.org/issues/?filter=11183'
+
+(Also See respective Integrated feature project's bug tracking)
+
+Workarounds
+===========
+
+**JIRA TICKETS:**
+
+`Workarounds <https://jira.opnfv.org/issues/?filter=11181>`_ 'https://jira.opnfv.org/issues/?filter=11181'
+
+(Also See respective Integrated feature project's bug tracking)
+
+============
+Test results
+============
+The Colorado 1.0 release with the Fuel deployment tool has undergone QA test
+runs, see separate test results.
+
+==========
+References
+==========
+For more information on the OPNFV Colorado release, please see:
+
+OPNFV
+=====
+
+1) `OPNFV Home Page <http://www.opnfv.org>`_ 'http://www.opnfv.org'
+
+2) `OPNFV documentation- and software downloads <https://www.opnfv.org/software/download>`_ 'https://www.opnfv.org/software/download'
+
+OpenStack
+=========
+
+3) `OpenStack Mitaka Release artifacts <http://www.openstack.org/software/mitaka>`_ 'http://www.openstack.org/software/mitaka'
+
+4) `OpenStack documentation <http://docs.openstack.org>`_ 'http://docs.openstack.org'
+
+OpenDaylight
+============
+
+5) `OpenDaylight artifacts <http://www.opendaylight.org/software/downloads>`_ 'http://www.opendaylight.org/software/downloads'
+
+Fuel
+====
+
+6) `The Fuel OpenStack project <https://wiki.openstack.org/wiki/Fuel>`_: https://wiki.openstack.org/wiki/Fuel
+
+7) `Fuel documentation overview <http://docs.openstack.org/developer/fuel-docs>`_: http://docs.openstack.org/developer/fuel-docs
+
+8) `Fuel Installation Guide <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide.html>`_: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide.html
+
+9) `Fuel User Guide <http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide.html>`_: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide.html
+
+10) `Fuel Developer Guide <http://docs.openstack.org/developer/fuel-docs/devdocs/develop.html>`_: http://docs.openstack.org/developer/fuel-docs/devdocs/develop.html
+
+11) `Fuel Plugin Developers Guide <http://docs.openstack.org/developer/fuel-docs/plugindocs/fuel-plugin-sdk-guide.html>`_: http://docs.openstack.org/developer/fuel-docs/plugindocs/fuel-plugin-sdk-guide.html
+
+12) `Fuel OpenStack Hardware Compatibility List <https://www.mirantis.com/products/openstack-drivers-and-plugins/hardware-compatibility-list>`_: https://www.mirantis.com/products/openstack-drivers-and-plugins/hardware-compatibility-list
+
+Fuel in OPNFV
+=============
+
+13) `OPNFV Installation instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/installationprocedure/index.html>`_ 'http://artifacts.opnfv.org/fuel/colorado/docs/installationprocedure/index.html'
+
+14) `OPNFV Build instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/buildprocedure/index.html>`_ 'http://artifacts.opnfv.org/fuel/colorado/docs/buildprocedure/index.html'
+
+15) `OPNFV Release Note for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/docs/releasenotes/index.html>`_ 'http://artifacts.opnfv.org/fuel/colorado/docs/releasenotes/index.html'
+
+.. [1] OpenDaylight Boron RC3.5 is used when Service Function Chaining is enabled in Fuel plugin.
diff --git a/onboarding.txt b/onboarding.txt
index e98f426c1..c9c45ac0d 100644
--- a/onboarding.txt
+++ b/onboarding.txt
@@ -1,3 +1,10 @@
+###########################################################################
+This document is protected/licensed under the following conditions
+(c) Jonas Bjurel (Ericsson AB)
+Licensed under a Creative Commons Attribution 4.0 International License.
+You should have received a copy of the license along with this work.
+If not, see <http://creativecommons.org/licenses/by/4.0/>.
+###########################################################################
Get on board by filling this out and submitting it for review.
This is all optional, it's just to give you a taste of the workflow.
diff --git a/prototypes/sfc_tacker/README b/prototypes/sfc_tacker/README
new file mode 100644
index 000000000..0208b7850
--- /dev/null
+++ b/prototypes/sfc_tacker/README
@@ -0,0 +1,54 @@
+# author: Ferenc Cserepkei <ferenc.cserepkei@ericsson.com>
+#
+# (c) 2016 Telefonaktiebolaget L. M. ERICSSON
+#
+# 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
+
+README SFC + Tacker
+-------------------
+
+ The Enclosed shell script builds, deploys, orchestrates Tacker,
+an Open NFV Orchestrator with in-built general purpose VNF Manager
+to deploy and operate Virtual Network Functions (VNFs).
+ The provided deployment tool is experimental, not fault
+tolerant but as idempotent as possible. To use the provided shell
+script for provision/deployment, transfer the script to the Openstack
+primary controller node, where Your deployed OpenDaylight SDN
+controller runs. The deployment tool (poc.tacker-up.sh), expects that
+Your primary controller reaches all your OPNFV/Fuel cluster nodes and
+has internet connection either directly or via an http proxy, note
+that a working and consistent DNS name resolution is a must.
+ Theory of operation: the deployment tool downloads the source
+python packages from GitHub and a json rpc library developed by Josh
+Marshall. Besides these sources, downloads software for python/debian
+software release. When building succeeds the script deploys the software
+components to the OPNFV Cluster nodes. Finally orchestrates the deployed
+tacker binaries as an infrastucture/service. The Tacker has two
+components:
+o Tacker server - what interacts with Openstack and OpenDayLight.
+o Tacker client - a command line software talks with the server,
+ available on all cluster nodes and the access point
+ to the Tacker service. Note that the tacker
+ distribution provides a a plugin to the Horizon
+ OpenStack Gui, but thus Horizon plugin is out of the
+ scope of this Proof of Concept setup/deployment.
+As mentioned, this compilation contains an OpenDayLight SDN controller
+with Service Function Chaining and Group based Policy features enabled.
+
+To acces for your cluster information ssh to the fuel master (10.20.0.2)
+and issue command: fuel node.
+Here is an output of an example deployment:
+
+id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
+---|--------|------------------|---------|-----------|-------------------|----------------------------------|---------------|--------|---------
+3 | ready | Untitled (a2:4c) | 1 | 10.20.0.5 | 52:54:00:d3:a2:4c | compute | | True | 1
+4 | ready | Untitled (c7:d8) | 1 | 10.20.0.3 | 52:54:00:00:c7:d8 | cinder, controller, opendaylight | | True | 1
+1 | ready | Untitled (cc:51) | 1 | 10.20.0.6 | 52:54:00:1e:cc:51 | compute | | True | 1
+2 | ready | Untitled (e6:3e) | 1 | 10.20.0.4 | 52:54:00:0c:e6:3e | compute | | True | 1
+[root@fuel-sfc-virt ~]#
+
+As You can see in this case the poc.tacker-up.sh script should be
+transferred and run on node having IP address 10.20.0.3
diff --git a/prototypes/sfc_tacker/poc.tacker-up.sh b/prototypes/sfc_tacker/poc.tacker-up.sh
new file mode 100755
index 000000000..caad3f86a
--- /dev/null
+++ b/prototypes/sfc_tacker/poc.tacker-up.sh
@@ -0,0 +1,385 @@
+#!/bin/bash
+
+#
+# POC Script to build/install/deploy/orchestrate Tacker on an OPNFV Brhamaputra Fuel cluster
+# Script assuming it runs on the openstack primary controller (where is opendaylight
+# present) and there is a fuel master on 10.20.0.2 and can be reached with default
+# credentials.
+#
+# author: Ferenc Cserepkei <ferenc.cserepkei@ericsson.com>
+#
+# (c) 2016 Telefonaktiebolaget L. M. ERICSSON
+#
+# 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
+#
+
+
+SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
+
+MYDIR=$(dirname $(readlink -f "$0"))
+MYREPO="tacker-server"
+CLIREPO="tacker-client"
+DEPREPO="jsonrpclib"
+
+CLIENT=$(echo python-python-tackerclient_*_all.deb)
+JSONRPC=$(echo python-jsonrpclib_*_all.deb)
+SERVER=$(echo python-tacker_*_all.deb)
+
+#fuel admin user name
+fadm="fadm"
+
+# Function checks whether crudini is available, if not - installs
+function chkCrudini () {
+ if [[ ! -f '/usr/bin/crudini' ]]; then
+ wget -N http://mirrors.kernel.org/ubuntu/pool/universe/p/python-iniparse/python-iniparse_0.4-2.1build1_all.deb
+ wget -N http://archive.ubuntu.com/ubuntu/pool/universe/c/crudini/crudini_0.3-1_amd64.deb
+ dpkg -i python-iniparse_0.4-2.1build1_all.deb crudini_0.3-1_amd64.deb
+ fi
+}
+
+# Function checks whether a python egg is available, if not, installs
+function chkPPkg () {
+ PKG="$1"
+ IPPACK=$(python - <<'____EOF'
+import pip
+from os.path import join
+for package in pip.get_installed_distributions():
+ print(package.location)
+ print(join(package.location, *package._get_metadata("top_level.txt")))
+____EOF
+)
+ echo "$IPPACK" | grep -q "$PKG"
+ if [ $? -ne 0 ];then
+ pip install "$PKG"
+ fi
+}
+
+# Function setting up the build/deploy environment
+function envSetup () {
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BCE5CC461FA22B08
+ apt-get update
+ apt-get install -y git python-pip python-all debhelper
+ chkPPkg stdeb
+ chkCrudini
+}
+
+# Function installs jsonrpclib from github
+function deployJsonrpclib () {
+ if [[ -e "${MYDIR}/${JSONRPC}" ]]; then
+ echo "$JSONRPC exists."
+ return 1
+ fi
+ cd $MYDIR
+ rm -rf $DEPREPO
+ git clone https://github.com/joshmarshall/jsonrpclib.git $DEPREPO
+ cd $DEPREPO
+ dpkg --purge python-jsonrpclib
+ python setup.py --command-packages=stdeb.command bdist_deb
+ cd "deb_dist"
+ JSONRPC=$(echo python-jsonrpclib_*_all.deb)
+ cp $JSONRPC $MYDIR
+ dpkg -i $JSONRPC
+}
+
+# Function builds Tacker server from github
+function buildTackerServer () {
+ if [[ -e "${MYDIR}/${SERVER}" ]]; then
+ echo "$SERVER exists."
+ return 1
+ fi
+ cd $MYDIR
+ rm -rf $MYREPO
+ git clone -b 'SFC_colorado' https://github.com/trozet/tacker.git $MYREPO
+ cd $MYREPO
+ patch -p 1 <<EOFSCP
+diff -ruN a/setup.cfg b/setup.cfg
+--- a/setup.cfg 2016-02-08 10:54:37.416525934 +0100
++++ b/setup.cfg 2016-02-08 10:55:29.293428896 +0100
+@@ -22,14 +22,14 @@
+ packages =
+ tacker
+ data_files =
+- etc/tacker =
++ /etc/tacker =
+ etc/tacker/api-paste.ini
+ etc/tacker/policy.json
+ etc/tacker/tacker.conf
+ etc/tacker/rootwrap.conf
+- etc/rootwrap.d =
++ /etc/rootwrap.d =
+ etc/tacker/rootwrap.d/servicevm.filters
+- etc/init.d = etc/init.d/tacker-server
++ /etc/init.d = etc/init.d/tacker-server
+
+ [global]
+ setup-hooks =
+EOFSCP
+ dpkg --purge python-tacker
+ python setup.py --command-packages=stdeb.command bdist_deb
+}
+
+# Function corrects and installs the Tacker-server debian package
+function blessPackage () {
+ pushd "${MYDIR}/${MYREPO}/deb_dist"
+ SERVER=$(echo python-tacker_*_all.deb)
+ popd
+ DEBFILE="${MYDIR}/${MYREPO}/deb_dist/${SERVER}"
+ TMPDIR=$(mktemp -d /tmp/deb.XXXXXX) || exit 1
+ OUTPUT=$(basename "$DEBFILE")
+ if [[ -e "${MYDIR}/${OUTPUT}" ]]; then
+ echo "$OUTPUT exists."
+ rm -r "$TMPDIR"
+ return 1
+ fi
+ dpkg-deb -x "$DEBFILE" "$TMPDIR"
+ dpkg-deb --control "$DEBFILE" "${TMPDIR}/DEBIAN"
+ cd "$TMPDIR"
+ patch -p 1 <<EOFDC
+diff -ruN DEBIAN/control DEBIAN/control
+--- a/DEBIAN/control 2016-08-19 11:53:10.000000000 +0000
++++ b/DEBIAN/control 2016-08-19 12:01:49.629096317 +0000
+@@ -4,7 +4,7 @@
+ Architecture: all
+ Maintainer: OpenStack <openstack-dev@lists.openstack.org>
+ Installed-Size: 1566
+-Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-pbr, python-paste, python-pastedeploy, python-routes, python-anyjson, python-babel, python-eventlet, python-greenlet, python-httplib2, python-requests, python-iso8601, python-jsonrpclib, python-jinja2, python-kombu, python-netaddr, python-sqlalchemy (>= 1.0~), python-sqlalchemy (<< 1.1), python-webob, python-heatclient, python-keystoneclient, alembic, python-six, python-stevedore, python-oslo.config, python-oslo.messaging-, python-oslo.rootwrap, python-novaclient
++Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-pbr, python-paste, python-pastedeploy, python-routes, python-anyjson, python-babel, python-eventlet, python-greenlet, python-httplib2, python-requests, python-iso8601, python-jsonrpclib, python-jinja2, python-kombu, python-netaddr, python-sqlalchemy (>= 1.0~), python-sqlalchemy (<< 1.1), python-webob, python-heatclient, python-keystoneclient, alembic, python-six, python-stevedore, python-oslo.config, python-oslo.messaging, python-oslo.rootwrap, python-novaclient
+ Section: python
+ Priority: optional
+ Description: OpenStack servicevm/device manager
+EOFDC
+ cd "$MYDIR"
+ echo "Patching deb..."
+ dpkg -b "$TMPDIR" "${MYDIR}/${SERVER}"
+ rm -r "$TMPDIR"
+ dpkg -i "${MYDIR}/${SERVER}"
+}
+
+# Function deploys Tacker-server (installs missing mandatory files: upstart, default)
+function deployTackerServer () {
+ rm -rf /etc/default/tacker-server
+ cat > /etc/default/tacker-server <<EOFTD
+ENABLED=true
+PIDFILE=/var/run/tacker/tacker-server.pid
+LOGFILE=/var/log/tacker/tacker-server.log
+PATH="\${PATH:+\$PATH:}/usr/sbin:/sbin"
+TMPDIR=/var/lib/tacker/tmp
+EOFTD
+ rm -rf /etc/init/tacker.conf
+ cat > /etc/init/tacker.conf <<EOFSC
+# tacker-server - Provides the Tacker servicevm/device manager service
+description "Openstack Tacker Server"
+author "Ferenc Cserepkei <ferenc.cserepkei@ericsson.com>"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+respawn
+respawn limit 20 5
+limit nofile 65535 65535
+
+chdir /var/run
+
+pre-start script
+ # stop job from continuing if no config file found for daemon
+ [ ! -f /etc/default/tacker-server ] && { stop; exit 0; }
+ [ ! -f /etc/tacker/tacker.conf ] && { stop; exit 0; }
+
+ # source the config file
+ . /etc/default/tacker-server
+
+ # stop job from continuing if admin has not enabled service in
+ # config file.
+ [ -z "\$ENABLED" ] && { stop; exit 0; }
+
+ mkdir -p /var/run/tacker
+ mkdir -p /var/log/tacker
+ echo "Starting tacker server"
+end script
+
+pre-stop script
+ echo "Stopping tacker server"
+end script
+
+exec /usr/bin/python /usr/bin/tacker-server --log-file=/var/log/tacker/tacker-server.log -v -d --config-file=/etc/tacker/tacker.conf
+EOFSC
+}
+
+# Function installs python-tackerclient from github
+function deployTackerClient() {
+ if [[ -e "${MYDIR}/${CLIENT}" ]]; then
+ echo "$CLIENT exists."
+ return 1
+ fi
+ cd $MYDIR
+ rm -rf $CLIREPO
+ dpkg --purge python-tackerclient
+ git clone -b 'SFC_refactor' https://github.com/trozet/python-tackerclient.git $CLIREPO
+ cd $CLIREPO
+ python setup.py --command-packages=stdeb.command bdist_deb
+ cd "deb_dist"
+ CLIENT=$(echo python-python-tackerclient_*_all.deb)
+ cp $CLIENT $MYDIR
+ dpkg -i "${MYDIR}/${CLIENT}"
+}
+
+# Function removes the cloned git repositories
+function remove_repo () {
+ if [[ -d "${MYDIR}/${1}" ]]; then
+ rm -r "$1"
+ fi
+}
+
+# Funcion copies and installs built artifact on all remaining cluster nodes
+function populate_client() {
+ wget -O deb http://archive.ubuntu.com/ubuntu/pool/universe/s/sshpass/sshpass_1.05-1_amd64.deb &&\
+ dpkg -i deb &&\
+ rm deb
+
+ clusternodes=$(sshpass -p "r00tme" ssh ${SSH_OPTIONS[@]} root@10.20.0.2 fuel node | cut -d '|' -f 5 | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" )
+ myaddr=$(ifconfig br-fw-admin | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
+ for anode in $clusternodes ; do
+ if [ "$anode" != "$myaddr" ] ; then
+ echo "Installing $CLIENT on $anode"
+ scp ${SSH_OPTIONS[@]} -i "${MYDIR}/.ssh/id_rsa" ${CLIENT} ${fadm}@${anode}:${CLIENT}
+ ssh ${SSH_OPTIONS[@]} -i "${MYDIR}/.ssh/id_rsa" ${fadm}@${anode} sudo dpkg -i ${CLIENT}
+ ssh ${SSH_OPTIONS[@]} -i "${MYDIR}/.ssh/id_rsa" ${fadm}@${anode} rm ${CLIENT}
+ fi
+ done
+}
+
+# Function orchestrate the Tacker service
+function orchestrate () {
+ rm -rf /etc/puppet/modules/tacker
+ pushd /etc/puppet/modules
+ git clone https://github.com/trozet/puppet-tacker.git tacker
+ rm -rf /etc/puppet/modules/tacker/.git
+ popd
+
+ ### Facts ###
+
+ # Port(s) Protocol ServiceDetails Source
+ # 8805-8872 tcp,udp Unassigned IANA
+ bind_port='8808'
+
+ auth_uri=$(crudini --get '/etc/heat/heat.conf' 'keystone_authtoken' 'auth_uri')
+ identity_uri=$(crudini --get '/etc/heat/heat.conf' 'keystone_authtoken' 'identity_uri')
+ int_addr=$(ifconfig br-mesh | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
+ odl_addr=$(hiera management_vip)
+ mgmt_addr=$(ifconfig br-mgmt | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
+ pub_addr=$(ifconfig br-ex-lnx | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
+ rabbit_host=$(crudini --get '/etc/heat/heat.conf' 'oslo_messaging_rabbit' 'rabbit_hosts'| cut -d ':' -f 1)
+ rabbit_password=$(crudini --get '/etc/heat/heat.conf' 'oslo_messaging_rabbit' 'rabbit_password')
+ sql_host=$(hiera database_vip)
+ database_connection="mysql://tacker:tacker@${sql_host}/tacker"
+ internal_url="http://${int_addr}:${bind_port}"
+ admin_url="http://${mgmt_addr}:${bind_port}"
+ public_url="http://${pub_addr}:${bind_port}"
+ heat_api_vip=$(crudini --get '/etc/heat/heat.conf' 'heat_api' 'bind_host')
+ allowed_hosts="[ '${sql_host}', '${HOSTNAME%%.domain.tld}', 'localhost', '127.0.0.1', '%' ]"
+ heat_uri="http://${heat_api_vip}:8004/v1"
+ odl_port='8282'
+ service_tenant='services'
+ myRegion='RegionOne'
+ myPassword='tacker'
+
+ cat > configure_tacker.pp << EOF
+ class mysql::config {}
+ include mysql::config
+ class mysql::server {}
+ include mysql::server
+
+ class { 'tacker':
+ package_ensure => 'absent',
+ client_package_ensure => 'absent',
+ bind_port => '${bind_port}',
+ keystone_password => '${myPassword}',
+ keystone_tenant => '${service_tenant}',
+ auth_uri => '${auth_uri}',
+ identity_uri => '${identity_uri}',
+ database_connection => '${database_connection}',
+ rabbit_host => '${rabbit_host}',
+ rabbit_password => '${rabbit_password}',
+ heat_uri => '${heat_uri}',
+ opendaylight_host => '${odl_addr}',
+ opendaylight_port => '${odl_port}',
+ }
+
+ class { 'tacker::db::mysql':
+ password => '${myPassword}',
+ allowed_hosts => ${allowed_hosts},
+ }
+
+ class { 'tacker::keystone::auth':
+ password => '${myPassword}',
+ tenant => '${service_tenant}',
+ admin_url => '${admin_url}',
+ internal_url => '${internal_url}',
+ public_url => '${public_url}',
+ region => '${myRegion}',
+ }
+EOF
+
+ apt-get install -y mysql-client-5.5
+ cat > /usr/bin/tacker-manage <<EOFAKEMANAGE
+#!/bin/bash
+EOFAKEMANAGE
+ chmod +x /usr/bin/tacker-manage
+ puppet apply configure_tacker.pp
+ rm -f tackerc
+ cat > tackerc <<EOFRC
+#!/bin/sh
+export LC_ALL=C
+export OS_NO_CACHE='true'
+export OS_TENANT_NAME='${service_tenant}'
+export OS_PROJECT_NAME='${service_tenant}'
+export OS_USERNAME='tacker'
+export OS_PASSWORD='${myPassword}'
+export OS_AUTH_URL='${auth_uri}'
+export OS_DEFAULT_DOMAIN='default'
+export OS_AUTH_STRATEGY='keystone'
+export OS_REGION_NAME='${myRegion}'
+export TACKER_ENDPOINT_TYPE='internalURL'
+EOFRC
+ chmod +x tackerc
+}
+
+# Funcion copies and installs built environment settings on all remaining cluster nodes
+function populate_rc() {
+ wget -O deb http://archive.ubuntu.com/ubuntu/pool/universe/s/sshpass/sshpass_1.05-1_amd64.deb &&\
+ dpkg -i deb &&\
+ rm deb
+
+ clusternodes=$(sshpass -p "r00tme" ssh ${SSH_OPTIONS[@]} root@10.20.0.2 fuel node | cut -d '|' -f 5 | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" )
+ myaddr=$(ifconfig br-fw-admin | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
+ for anode in $clusternodes ; do
+ if [ "$anode" != "$myaddr" ] ; then
+ echo "Populating settings to $anode"
+ scp ${SSH_OPTIONS[@]} -i "${MYDIR}/.ssh/id_rsa" tackerc ${fadm}@${anode}:tackerc
+ fi
+ done
+}
+
+
+envSetup
+deployTackerClient
+deployJsonrpclib
+buildTackerServer
+blessPackage
+deployTackerServer
+populate_client
+orchestrate
+populate_rc
+
+git clone https://github.com/trozet/sfc-random.git
+
+remove_repo "$MYREPO"
+remove_repo "$DEPREPO"
+remove_repo "$CLIREPO"
+
+echo "Built: ${MYDIR}/${OUTPUT}"
+echo "Built: ${MYDIR}/${CLIENT}"
+echo "Built: ${MYDIR}/${JSONRPC}"
+echo "tackerc - mandatory environmental parameters file created"