summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2015-10-02 13:29:56 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2015-10-02 13:32:52 +0200
commit0d4a1f4143d71fc616f456a3708d5c8c2a24ec3f (patch)
tree9b4aa7855b2e951d84bfc1e2032c258cd3be4787
parente99a391f42c4a38ab358cba6238d77ea828e6d4f (diff)
Move of genesis/fuel master branch: commit 563547b4a9f44090f32c0e17d040114854563760
Note: other installers and /common are removed Change-Id: Ie5a2b0b7f3e7fa2eda191710c98456eeec17ed61 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
-rw-r--r--fuel/.DS_Storebin0 -> 6148 bytes
-rw-r--r--fuel/README1
-rw-r--r--fuel/TODO5
-rw-r--r--fuel/build/Makefile150
-rw-r--r--fuel/build/README22
-rw-r--r--fuel/build/add_opnfv_packages23
-rw-r--r--fuel/build/apply_patches18
-rw-r--r--fuel/build/cache.mk94
-rw-r--r--fuel/build/config.mk20
-rw-r--r--fuel/build/docker/Makefile23
-rw-r--r--fuel/build/docker/README25
-rwxr-xr-xfuel/build/docker/runcontext35
-rw-r--r--fuel/build/docker/ubuntu-builder/Dockerfile28
-rw-r--r--fuel/build/docker/ubuntu-builder/enable_dockerx220
-rwxr-xr-xfuel/build/docker/ubuntu-builder/setcontext20
-rw-r--r--fuel/build/f_example_control_bond/Makefile28
-rw-r--r--fuel/build/f_example_control_bond/README56
-rw-r--r--fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond90
-rw-r--r--fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp56
-rw-r--r--fuel/build/f_example_packadd/Makefile42
-rw-r--r--fuel/build/f_example_packadd/README47
-rw-r--r--fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles1
-rw-r--r--fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control10
-rwxr-xr-xfuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst2
-rw-r--r--fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf2
-rwxr-xr-xfuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar2
-rw-r--r--fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian5
-rw-r--r--fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright18
-rw-r--r--fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp7
-rw-r--r--fuel/build/f_isoroot/Makefile35
-rw-r--r--fuel/build/f_isoroot/README16
-rw-r--r--fuel/build/f_isoroot/f_bootstrap/Makefile29
-rw-r--r--fuel/build/f_isoroot/f_bootstrap/README24
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh172
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig152
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh4
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh19
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh4
-rw-r--r--fuel/build/f_isoroot/f_kscfg/Makefile25
-rw-r--r--fuel/build/f_isoroot/f_kscfg/README18
-rw-r--r--fuel/build/f_isoroot/f_kscfg/ks.cfg598
-rw-r--r--fuel/build/f_isoroot/f_kscfg/ks.cfg.orig592
-rw-r--r--fuel/build/f_isoroot/f_odlpluginbuild/Makefile38
-rw-r--r--fuel/build/f_isoroot/f_repobuild/Makefile56
-rw-r--r--fuel/build/fuel-agent_1.patch36
-rw-r--r--fuel/build/fuel-main_3.patch19
-rw-r--r--fuel/build/fuel-main_5.patch19
-rw-r--r--fuel/build/install/apt-ftparchive-deb.conf35
-rw-r--r--fuel/build/install/apt-ftparchive-release.conf18
-rw-r--r--fuel/build/install/apt-ftparchive-udeb.conf33
-rwxr-xr-xfuel/build/install/install.sh477
-rwxr-xr-xfuel/build/install/uninstall.sh79
-rw-r--r--fuel/build/patch-packages/Makefile26
-rwxr-xr-xfuel/build/patch-packages/tools/correct_deps78
-rwxr-xr-xfuel/build/patch-packages/tools/deb_pack63
-rwxr-xr-xfuel/build/patch-packages/tools/deb_unpack58
-rwxr-xr-xfuel/build/patch-packages/tools/udeb_pack38
-rwxr-xr-xfuel/build/patch-packages/tools/udeb_unpack58
-rw-r--r--fuel/build/patch-packages/tr_example/Makefile30
-rw-r--r--fuel/ci/README106
-rwxr-xr-xfuel/ci/build.sh473
-rwxr-xr-xfuel/ci/deploy.sh8
-rw-r--r--fuel/deploy/README186
-rw-r--r--fuel/deploy/__init__.py8
-rw-r--r--fuel/deploy/cloud/configure_environment.py78
-rw-r--r--fuel/deploy/cloud/configure_network.py74
-rw-r--r--fuel/deploy/cloud/configure_nodes.py114
-rw-r--r--fuel/deploy/cloud/configure_settings.py59
-rw-r--r--fuel/deploy/cloud/deploy.py107
-rw-r--r--fuel/deploy/cloud/deployment.py97
-rw-r--r--fuel/deploy/common.py153
-rw-r--r--fuel/deploy/dea.py99
-rw-r--r--fuel/deploy/deploy.py308
-rw-r--r--fuel/deploy/deploy_env.py246
-rw-r--r--fuel/deploy/dha.py34
-rw-r--r--fuel/deploy/dha_adapters/__init__.py8
-rw-r--r--fuel/deploy/dha_adapters/hardware_adapter.py59
-rw-r--r--fuel/deploy/dha_adapters/hp_adapter.py36
-rw-r--r--fuel/deploy/dha_adapters/ipmi_adapter.py118
-rw-r--r--fuel/deploy/dha_adapters/libvirt_adapter.py136
-rw-r--r--fuel/deploy/environments/__init__.py8
-rw-r--r--fuel/deploy/environments/execution_environment.py78
-rw-r--r--fuel/deploy/environments/libvirt_environment.py107
-rw-r--r--fuel/deploy/environments/virtual_fuel.py70
-rw-r--r--fuel/deploy/execution_environment.py46
-rw-r--r--fuel/deploy/fuel_patch/ks.cfg.patch19
-rw-r--r--fuel/deploy/install_fuel_master.py218
-rw-r--r--fuel/deploy/reap.py339
-rw-r--r--fuel/deploy/ssh_client.py97
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dea.yaml844
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dha.yaml54
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dea.yaml841
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dha.yaml49
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml841
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dha.yaml49
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/opnfv_box/dea.yaml842
-rw-r--r--fuel/deploy/templates/hardware_environment/conf/opnfv_box/dha.yaml49
-rw-r--r--fuel/deploy/templates/hardware_environment/vms/fuel.xml91
-rw-r--r--fuel/deploy/templates/virtual_environment/conf/dea.yaml838
-rw-r--r--fuel/deploy/templates/virtual_environment/conf/dha.yaml38
-rw-r--r--fuel/deploy/templates/virtual_environment/networks/fuel1.xml12
-rw-r--r--fuel/deploy/templates/virtual_environment/networks/fuel2.xml5
-rw-r--r--fuel/deploy/templates/virtual_environment/networks/fuel3.xml5
-rw-r--r--fuel/deploy/templates/virtual_environment/networks/fuel4.xml12
-rw-r--r--fuel/deploy/templates/virtual_environment/vms/compute.xml91
-rw-r--r--fuel/deploy/templates/virtual_environment/vms/controller.xml91
-rw-r--r--fuel/deploy/templates/virtual_environment/vms/fuel.xml93
-rw-r--r--fuel/deploy/transplant_fuel_settings.py61
-rw-r--r--fuel/docs/.DS_Storebin0 -> 6148 bytes
-rw-r--r--fuel/docs/src/build-instructions.rst182
-rw-r--r--fuel/docs/src/installation-instructions.rst497
-rw-r--r--fuel/docs/src/release-notes.rst205
-rw-r--r--fuel/include/build.sh.debug355
-rw-r--r--fuel/prototypes/auto-deploy/README.rst24
-rw-r--r--fuel/prototypes/auto-deploy/TODO.txt34
-rw-r--r--fuel/prototypes/auto-deploy/configs/ericsson_montreal/dea.yaml983
-rw-r--r--fuel/prototypes/auto-deploy/configs/lf_pod1/dea_ha.yaml969
-rw-r--r--fuel/prototypes/auto-deploy/configs/lf_pod1/dea_no-ha.yaml969
-rw-r--r--fuel/prototypes/auto-deploy/configs/lf_pod1/dha.yaml66
-rw-r--r--fuel/prototypes/auto-deploy/configs/lf_pod1/fuel-opnfv.xml132
-rw-r--r--fuel/prototypes/auto-deploy/configs/lf_pod1/jump1_networking.txt4
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/create_templates.sh189
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/generate_fuel_node_info.py36
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/generate_node_info.py61
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/reap_fuel_settings.py47
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/reap_network_scheme.py38
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/reap_network_settings.py48
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/reap_opnfv_astute.py49
-rwxr-xr-xfuel/prototypes/auto-deploy/create_templates/reap_settings.py37
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/deploy.sh193
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/dha-adapters/dhaParse.py87
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/dha-adapters/ipmi.sh449
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/dha-adapters/libvirt.sh334
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/functions/common.sh67
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/functions/dea-api.sh171
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/functions/deaParse.py85
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/functions/deploy_env.sh140
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/functions/install_iso.sh91
-rw-r--r--fuel/prototypes/auto-deploy/deploy/functions/isolinux.cfg.patch14
-rw-r--r--fuel/prototypes/auto-deploy/deploy/functions/ks.cfg.patch19
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh85
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant0.sh40
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant1.sh67
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant2.sh98
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant_fuel_settings.py50
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant_interfaces.py77
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant_network_scheme.py42
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant_network_settings.py52
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant_opnfv_settings.py42
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/tools/transplant_settings.py36
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/verify_dea.sh79
-rwxr-xr-xfuel/prototypes/auto-deploy/deploy/verify_dha.sh125
-rw-r--r--fuel/prototypes/auto-deploy/documentation/1-introduction.txt36
-rw-r--r--fuel/prototypes/auto-deploy/documentation/2-dea.txt1082
-rw-r--r--fuel/prototypes/auto-deploy/documentation/3-dha.txt65
-rw-r--r--fuel/prototypes/auto-deploy/documentation/4-dha-adapter-api.txt128
-rw-r--r--fuel/prototypes/auto-deploy/documentation/5-dea-api.txt47
-rw-r--r--fuel/prototypes/auto-deploy/examples/ipmi/README.txt10
-rw-r--r--fuel/prototypes/auto-deploy/examples/ipmi/conf/README.txt12
-rw-r--r--fuel/prototypes/auto-deploy/examples/ipmi/conf/dea.yaml983
-rw-r--r--fuel/prototypes/auto-deploy/examples/ipmi/conf/dha.yaml52
-rw-r--r--fuel/prototypes/auto-deploy/examples/ipmi/conf/vm/vFuel115
-rwxr-xr-xfuel/prototypes/auto-deploy/examples/ipmi/install-ubuntu-packages.sh16
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/README.txt25
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/dea.yaml975
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/dha.yaml49
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel112
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel25
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel35
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel412
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute4107
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute5106
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/controller1106
-rw-r--r--fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/fuel-master102
-rwxr-xr-xfuel/prototypes/auto-deploy/examples/libvirt/install-ubuntu-packages.sh16
-rwxr-xr-xfuel/prototypes/auto-deploy/examples/libvirt/setup_example_vms.sh105
-rwxr-xr-xfuel/prototypes/auto-deploy/examples/libvirt/tools/cleanup_example_vms.sh58
-rwxr-xr-xfuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh68
-rwxr-xr-xfuel/prototypes/auto-deploy/list_fixmes.sh19
-rw-r--r--onboarding.txt8
180 files changed, 23786 insertions, 0 deletions
diff --git a/fuel/.DS_Store b/fuel/.DS_Store
new file mode 100644
index 000000000..b1bc858e9
--- /dev/null
+++ b/fuel/.DS_Store
Binary files differ
diff --git a/fuel/README b/fuel/README
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/fuel/README
@@ -0,0 +1 @@
+
diff --git a/fuel/TODO b/fuel/TODO
new file mode 100644
index 000000000..e2d1b379c
--- /dev/null
+++ b/fuel/TODO
@@ -0,0 +1,5 @@
+#########################################################################
+# Contributors/version/date
+# jonas.bjurel@ericsson.com 0.2 2015.04.14
+#########################################################################
+Following items needs to be done to achieve an OPNFV/BGS ARNO Fuel Stack:
diff --git a/fuel/build/Makefile b/fuel/build/Makefile
new file mode 100644
index 000000000..ba4beaf39
--- /dev/null
+++ b/fuel/build/Makefile
@@ -0,0 +1,150 @@
+##############################################################################
+# 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
+############################################################################
+# BEGIN of variables to customize
+#
+#Input args
+export UNIT_TEST = FALSE
+export INTERACTIVE = TRUE
+export ISOSRC = file:$(shell pwd)/fuel-6.1.iso
+export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
+export PRODNO = "OPNFV_BGS"
+export REVSTATE = "P0000"
+export NEWISO = $(shell pwd)/release/opnfv-${REVSTATE}.iso
+
+# 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 CACHE_DIR := $(BUILD_BASE)/cache
+export VERSION_FILE := $(BUILD_BASE)/.versions
+export DOCKERIMG = opnfv.org/ubuntu-builder:14.04
+export TOPDIR := $(shell pwd)
+
+#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
+#############################################################################
+
+SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
+
+
+.PHONY: all
+all:
+ @docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1)
+ @echo "Versions of cached build results built by" $(shell hostname) "at" $(shell date -u) > $(VERSION_FILE)
+ @echo "cache.mk" $(shell md5sum $(BUILD_BASE)/cache.mk | cut -f1 -d " ") >> $(VERSION_FILE)
+ @echo "config.mk" $(shell md5sum $(BUILD_BASE)/config.mk | cut -f1 -d " ") >> $(VERSION_FILE)
+ @make -C docker
+ @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
+ cd /tmp && git clone $(FUEL_MAIN_REPO)
+ cd /tmp/fuel-main && git checkout $(FUEL_MAIN_TAG)
+ @echo "fuel" `git -C /tmp/fuel-main show | grep commit | head -1 | cut -d " " -f2` >> $(VERSION_FILE)
+ # Setup cgroups for docker-in-docker
+ sudo /root/enable_dockerx2
+ # Temporary patch to accomodate for new Ubuntu trusty devops keys not yet
+ # backported to fuel 6.0 or 6.1
+ cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/fuel-main_3.patch
+ # Patch for adding dosfstools, as Fuel 6.1 is running mkfs.vfat
+ cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/fuel-main_5.patch
+ # Remove Docker optimizations, otherwise multistrap will fail during
+ # Fuel build.
+ sudo rm -f /etc/apt/apt.conf.d/docker*
+ #
+ cd /tmp/fuel-main && ./prepare-build-env.sh
+ cd /tmp/fuel-main && make repos
+ # Patch for speeding up image creation in virtual environments,
+ # https://review.openstack.org/#/c/197943/
+ cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/fuel-agent_1.patch
+ cd /tmp/fuel-main/build/repos/nailgun && git config --global user.email "build$opnfv.org"
+ cd /tmp/fuel-main/build/repos/nailgun && git config --global user.name "OPNFV build"
+ cd /tmp/fuel-main/build/repos/nailgun && git add -u .
+ cd /tmp/fuel-main/build/repos/nailgun && git commit -m "Added patch"
+ #
+ cd /tmp/fuel-main && make iso
+ mv /tmp/fuel-main/build/artifacts/fuel*.iso .
+
+.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: build-clean $(SUBCLEAN)
+build-clean: $(SUBCLEAN)
+ $(MAKE) -C patch-packages -f Makefile clean
+ @rm -Rf release
+ @rm -Rf newiso
+ @rm -f $(NEWISO)
+
+.PHONY: clean $(SUBCLEAN)
+clean: clean-cache $(SUBCLEAN)
+ $(MAKE) -C patch-packages -f Makefile clean
+ @rm -f *.iso
+ @rm -Rf release
+ @rm -Rf newiso
+ @rm -f $(NEWISO)
+ @rm -f $(BUILD_BASE)/.versions
+
+$(SUBCLEAN): %.clean:
+ $(MAKE) -C $* -f Makefile clean
+
+# Todo: Make things smarter - we shouldn't need to clean everything
+# betwen make invocations.
+.PHONY: iso
+iso: build-clean $(ISOCACHE) $(SUBDIRS) patch-packages
+ 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)
+ docker/runcontext $(DOCKERIMG) bash
diff --git a/fuel/build/README b/fuel/build/README
new file mode 100644
index 000000000..a6e15694c
--- /dev/null
+++ b/fuel/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/fuel/build/add_opnfv_packages b/fuel/build/add_opnfv_packages
new file mode 100644
index 000000000..44af92ea7
--- /dev/null
+++ b/fuel/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/fuel/build/apply_patches b/fuel/build/apply_patches
new file mode 100644
index 000000000..6925ff6b7
--- /dev/null
+++ b/fuel/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/fuel/build/cache.mk b/fuel/build/cache.mk
new file mode 100644
index 000000000..b88ac2fc4
--- /dev/null
+++ b/fuel/build/cache.mk
@@ -0,0 +1,94 @@
+#############################################################################
+# 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
+CACHEVALIDATE := $(addsuffix .validate,$(SUBDIRS))
+CACHECLEAN := $(addsuffix .clean,$(CACHEFILES) $(CACHEDIRS))
+
+############################################################################
+# BEGIN of variables to customize
+#
+#CACHEDIRS := foo/bar
+
+CACHEFILES += .versions
+CACHEFILES += $(shell basename $(ISOSRC))
+#
+# END of variables to customize
+############################################################################
+
+.PHONY: prepare-cache
+prepare-cache: make-cache-dir $(CACHEDIRS) $(CACHEFILES)
+
+.PHONY: make-cache-dir
+make-cache-dir:
+ @rm -rf ${CACHE_DIR}
+ @mkdir ${CACHE_DIR}
+
+.PHONY: clean-cache
+clean-cache: $(CACHECLEAN)
+ @rm -rf ${CACHE_DIR}
+
+.PHONY: $(CACHEDIRS)
+$(CACHEDIRS):
+ @mkdir -p $(dir $(CACHE_DIR)/$@)
+ @if [ ! -d $(BUILD_BASE)/$@ ]; then\
+ mkdir -p $(BUILD_BASE)/$@;\
+ fi
+ @ln -s $(BUILD_BASE)/$@ $(CACHE_DIR)/$@
+
+.PHONY: $(CACHEFILES)
+$(CACHEFILES):
+ @mkdir -p $(dir $(CACHE_DIR)/$@)
+ @if [ ! -d $(dir $(BUILD_BASE)/$@) ]; then\
+ mkdir -p $(dir $(BUILD_BASE)/$@);\
+ fi
+
+ @if [ ! -f $(BUILD_BASE)/$@ ]; then\
+ echo " " > $(BUILD_BASE)/$@;\
+ ln -s $(BUILD_BASE)/$@ $(CACHE_DIR)/$@;\
+ rm -f $(BUILD_BASE)/$@;\
+ else\
+ ln -s $(BUILD_BASE)/$@ $(CACHE_DIR)/$@;\
+ fi
+
+.PHONY: validate-cache
+validate-cache: $(CACHEVALIDATE)
+ @if [ "$(shell md5sum $(BUILD_BASE)/config.mk | cut -f1 -d " ")" != "$(shell cat $(VERSION_FILE) | grep config.mk | awk '{print $$NF}')" ]; then\
+ echo "Cache does not match current config.mk definition, cache must be rebuilt";\
+ exit 1;\
+ fi;
+
+ @if [ "$(shell md5sum $(BUILD_BASE)/cache.mk | cut -f1 -d " ")" != "$(shell cat $(VERSION_FILE) | grep cache.mk | awk '{print $$NF}')" ]; then\
+ echo "Cache does not match current cache.mk definition, cache must be rebuilt";\
+ exit 1;\
+ fi;
+
+# Once the Make structure is refactored, this should go in as a validate-cache
+# taget in the fuel Makefile
+
+ @REMOTE_ID=$(shell git ls-remote $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG)^{} | awk '{print $$(NF-1)}'); \
+ if [ -z $$REMOTE_ID ] || [ $$REMOTE_ID = " " ]; \
+ then \
+ REMOTE_ID=$(shell git ls-remote $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG) | awk '{print $$(NF-1)}'); \
+ fi; \
+ if [[ $$REMOTE_ID != $(shell cat $(VERSION_FILE) | grep fuel | awk '{print $$NF}') ]]; \
+ then \
+ echo "Cache does not match upstream Fuel, cache must be rebuilt!"; \
+ exit 1; \
+ fi
+
+.PHONY: $(CACHEVALIDATE)
+$(CACHEVALIDATE): %.validate:
+ @echo VALIDATE $(CACHEVALIDATE)
+ $(MAKE) -C $* -f Makefile validate-cache
+
+.PHONY: $(CACHECLEAN)
+$(CACHECLEAN): %.clean:
+ rm -rf ${CACHE_DIR}/$*
diff --git a/fuel/build/config.mk b/fuel/build/config.mk
new file mode 100644
index 000000000..e9a5320f4
--- /dev/null
+++ b/fuel/build/config.mk
@@ -0,0 +1,20 @@
+##############################################################################
+# 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/stackforge/fuel-main
+FUEL_MAIN_TAG = stable/6.1
+
+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/fuel/build/docker/Makefile b/fuel/build/docker/Makefile
new file mode 100644
index 000000000..c2853c856
--- /dev/null
+++ b/fuel/build/docker/Makefile
@@ -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
+##############################################################################
+
+FILES = $(wildcard ubuntu-builder/*) runcontext
+
+.PHONY: all
+all: .docker
+
+.docker: $(FILES)
+ /usr/bin/docker build --rm=true --no-cache=true -t opnfv.org/ubuntu-builder:14.04 ubuntu-builder
+ /usr/bin/docker tag -f opnfv.org/ubuntu-builder:14.04 opnfv.org/ubuntu-builder
+ touch .docker
+
+.PHONY: clean
+clean:
+ rm .docker
diff --git a/fuel/build/docker/README b/fuel/build/docker/README
new file mode 100644
index 000000000..e5ccdfab6
--- /dev/null
+++ b/fuel/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/fuel/build/docker/runcontext b/fuel/build/docker/runcontext
new file mode 100755
index 000000000..52b46ad14
--- /dev/null
+++ b/fuel/build/docker/runcontext
@@ -0,0 +1,35 @@
+#!/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
+##############################################################################
+#
+context=$1
+shift
+GID=`id -g`
+USER=`whoami`
+res=`docker build -q --rm - <<EOF
+FROM $context
+RUN date || date
+RUN /root/setcontext $USER $UID $GID $HOME
+EOF`
+GITROOT=`git rev-parse --show-toplevel`
+CID=`echo $res | sed 's/.* //'`
+
+ RUN_CONTEXT_OPT="--privileged=true --rm -i -e HOME=$HOME -u $USER -w $PWD -v ${HOME}/.ssh:${HOME}/.ssh -v $GITROOT:$GITROOT"
+
+if [ "${INTERACTIVE}" != "FALSE" ]; then
+ RUN_CONTEXT_OPT+=" -t"
+fi
+
+echo command: docker run ${RUN_CONTEXT_OPT} $CID "$@"
+docker run ${RUN_CONTEXT_OPT} $CID "$@"
+
+rc=$?
+docker rmi -f $CID > /dev/null
+exit $rc
diff --git a/fuel/build/docker/ubuntu-builder/Dockerfile b/fuel/build/docker/ubuntu-builder/Dockerfile
new file mode 100644
index 000000000..81cdc43fb
--- /dev/null
+++ b/fuel/build/docker/ubuntu-builder/Dockerfile
@@ -0,0 +1,28 @@
+#!/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
+RUN apt-get update
+RUN apt-get install -y software-properties-common python-software-properties \
+ make python-setuptools python-all dpkg-dev debhelper \
+ fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \
+ ca-certificates sudo apt-utils lsb-release dosfstools
+
+RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
+RUN chmod 0440 /etc/sudoers.d/open-sudo
+RUN chmod 4755 /bin/fusermount
+
+ADD ./setcontext /root/setcontext
+RUN chmod +x /root/setcontext
+ADD ./enable_dockerx2 /root/enable_dockerx2
+RUN chmod +x /root/enable_dockerx2
+
+VOLUME /var/lib/docker
diff --git a/fuel/build/docker/ubuntu-builder/enable_dockerx2 b/fuel/build/docker/ubuntu-builder/enable_dockerx2
new file mode 100644
index 000000000..1511c70ea
--- /dev/null
+++ b/fuel/build/docker/ubuntu-builder/enable_dockerx2
@@ -0,0 +1,20 @@
+#!/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
+##############################################################################
+#
+# Needed to expose underlying cgroups to container
+echo "running x2" > /x2
+mount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
+mount -t securityfs none /sys/kernel/security
+
+for mnt in $(cut -d: -f2 /proc/1/cgroup); do
+ mkdir /sys/fs/cgroup/$mnt
+ mount -n -t cgroup -o $mnt cgroup /sys/fs/cgroup/$mnt
+done
diff --git a/fuel/build/docker/ubuntu-builder/setcontext b/fuel/build/docker/ubuntu-builder/setcontext
new file mode 100755
index 000000000..bc28994a9
--- /dev/null
+++ b/fuel/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/fuel/build/f_example_control_bond/Makefile b/fuel/build/f_example_control_bond/Makefile
new file mode 100644
index 000000000..0949737bc
--- /dev/null
+++ b/fuel/build/f_example_control_bond/Makefile
@@ -0,0 +1,28 @@
+##############################################################################
+# 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 tmp
+ @rm -rf release
+
+.PHONY: validate-cache
+validate-cache:
+ @echo "No cache validation schema available for $(shell pwd)"
+ @echo "Continuing ..."
+
+.PHONY: release
+release:
+ @cp -Rvp puppet/modules/* $(PUPPET_DEST)
diff --git a/fuel/build/f_example_control_bond/README b/fuel/build/f_example_control_bond/README
new file mode 100644
index 000000000..4449b2ff2
--- /dev/null
+++ b/fuel/build/f_example_control_bond/README
@@ -0,0 +1,56 @@
+##############################################################################
+# 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 an example of a modification of the bridge and bonding of interfaces.
+Rationale: Fuel currently don't support bonding of the "Admin" network, which
+becomes a problem if you want to co-locate the single "Admin" and the redundant
+bonded "Management" network on one and the same physical network in order to minimize
+number of NICs, switches and cables.
+This example show how you can modify the bridge and bonding settings and scripts to
+achieve co-location. Of course the FUEL GUI becomes shorted in this respect, I.e.
+the "admin" and "management" network cant be dragged across the NICs in the GUI.
+
+The f_example_control_bond has the following structure:
+.
++--------+----------+-----------+
+ | | |
+ puppet/ Makefile README
+ | (this file)
+ |
+ |
+ modules/
+ |
+ |
+ |
+ opnfv/
+ |
+ +--------------+
+ | |
+ files/ manifests/
+ | |
+ | |
+ | |
+ control-bond control-bond.pp
+
+Makefile:
+Invoked by the git root Makefile, copies the files up to the release build
+directory.
+
+control-bond:
+The control-bond file is the .init file orchestrating the interface-, bridge-
+and bond actions required for enabling the control bond
+
+control-bond.pp:
+The control-bond.pp is the pupet manifest orchestrating the placement and
+configuration of the control-bond shell script file.
+
+To activate this example feature, add "SUBDIRS += f_example_control_bond" in the git root Makefile.
+
+
diff --git a/fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond b/fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond
new file mode 100644
index 000000000..bf2930d73
--- /dev/null
+++ b/fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond
@@ -0,0 +1,90 @@
+##############################################################################
+# 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
+##############################################################################
+
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: control-bond
+# Required-Start: $remote_fs $all
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Bonds eth0 and eth1 and changes bridge configuration.
+### END INIT INFO
+
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+VSCTL=/usr/bin/ovs-vsctl
+APPCTL=/usr/bin/ovs-appctl
+
+
+add_control_bond() {
+ logger "Starting addition of control-bond"
+ $VSCTL --may-exist br-fw-admin
+ $VSCTL --may-exist br-mgmt
+ $VSCTL add-bond br-fw-admin bond-control eth0 eth1
+
+ $VSCTL set port br-mgmt tag=66
+ $APPCTL bond/set-active-slave bond-control eth0
+
+ $VSCTL add-port br-fw-admin admin-to-mgmt
+ $VSCTL add-port br-mgmt mgmt-to-admin
+ $VSCTL set interface admin-to-mgmt type=patch
+ $VSCTL set interface mgmt-to-admin type=patch
+
+ $VSCTL set interface admin-to-mgmt options:peer=mgmt-to-admin
+ $VSCTL set interface mgmt-to-admin options:peer=admin-to-mgmt
+
+ $VSCTL set port admin-to-mgmt trunk=66
+ $VSCTL set port mgmt-to-admin trunk=66
+ logger "Finished addition of control-bond"
+}
+
+status_control_bond() {
+ if [ ! -f $VSCTL ]; then
+ return 1
+ else
+ $VSCTL show | grep -q "admin-to-mgmt"
+ return $?
+ fi
+}
+
+case "$1" in
+ start)
+ status_control_bond
+ if [ $? -eq 0 ]; then
+ exit 0
+ else
+ add_control_bond
+ fi
+ ;;
+ restart|reload|force-reload)
+ echo "Error: argument '$1' not supported" >&2
+ exit 3
+ ;;
+ status)
+ status_control_bond
+ if [ $? -eq 0 ]; then
+ echo "The control-bond is enabled"
+ exit 0
+ else
+ echo "The control-bond is disabled"
+ exit 1
+ fi
+
+ ;;
+ stop)
+ echo "Stop is not supported"
+ exit 0
+ ;;
+ *)
+ echo "Usage: $0 start|status" >&2
+ exit 3
+ ;;
+esac
diff --git a/fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp b/fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp
new file mode 100644
index 000000000..22fe78171
--- /dev/null
+++ b/fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp
@@ -0,0 +1,56 @@
+##############################################################################
+# 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
+##############################################################################
+
+# Class: opnfv::control-bond
+#
+# Bridge control and management networks together using OVS.
+#
+#
+
+class opnfv::control-bond {
+ notify { '*** In Opnfv::control-bond-start ***': }
+
+ file { "/etc/init.d/control-bond":
+ source => "puppet:///modules/opnfv/control-bond",
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ notify => Service["control-bond"]
+ }
+
+
+ service { "control-bond":
+ ensure => running,
+ require => [ File["/etc/init.d/control-bond"], Service["openvswitch-service"] ],
+ }
+
+ # Only start scripts - we don't want to bring down
+ # bridge during shutdown
+
+ file { "/etc/rc2.d/S18control-bond":
+ ensure => 'link',
+ target => '/etc/init.d/control-bond',
+ }
+
+ file { "/etc/rc3.d/S18control-bond":
+ ensure => 'link',
+ target => '/etc/init.d/control-bond',
+ }
+
+ file { "/etc/rc4.d/S18control-bond":
+ ensure => 'link',
+ target => '/etc/init.d/control-bond',
+ }
+
+ file { "/etc/rc5.d/S18control-bond":
+ ensure => 'link',
+ target => '/etc/init.d/control-bond',
+ }
+}
diff --git a/fuel/build/f_example_packadd/Makefile b/fuel/build/f_example_packadd/Makefile
new file mode 100644
index 000000000..a64293dcb
--- /dev/null
+++ b/fuel/build/f_example_packadd/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
+##############################################################################
+
+TOP := $(shell pwd)
+PACKAGE := foobar
+VERSION := 1.0-1
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all: release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ @mkdir -p tmp/src
+ @mkdir -p release/pool/main
+ @cp -r $(DEB_NAME) tmp/src
+ @gzip -9 tmp/src/$(DEB_NAME)/usr/share/doc/$(PACKAGE)/changelog.Debian
+ @fakeroot dpkg-deb --build tmp/src/$(DEB_NAME)
+ @lintian tmp/src/$(DEB_NAME)
+ @cp tmp/src/$(DEB_NAME) release/pool/main
+
+.PHONY: clean
+clean:
+ @rm -rf tmp
+ @rm -rf release
+ @rm -f ../release/packages/ubuntu/pool/main/$(DEB_NAME)
+
+.PHONY: validate-cache
+validate-cache:
+ @echo "No cache validation schema available for $(shell pwd)"
+ @echo "Continuing ..."
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+ @cp -Rvp puppet/modules/* $(PUPPET_DEST)
diff --git a/fuel/build/f_example_packadd/README b/fuel/build/f_example_packadd/README
new file mode 100644
index 000000000..55fa7c1a1
--- /dev/null
+++ b/fuel/build/f_example_packadd/README
@@ -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
+##############################################################################
+
+This is an example of a an addition of an arbitrary debian package: foobar
+It adds the debian package foobar_1.0-1 to the fuel .iso image and deploys it
+to the controllers and the computes.
+
+The f_example_packadd has the following structure:
+.
++--------+----------+-----------+------------+
+ | | | |
+ puppet/ Makefile README foobar_1.0-1/
+ | (this file) (deb pack)
+ |
+ |
+ modules/
+ |
+ |
+ |
+ opnfv/
+ |
+ |
+ |
+ manifests/
+ |
+ |
+ |
+ foobar.pp
+
+Makefile:
+Invoked by the git root Makefile, based on the foobar_1.0-1 deb pack artifacts, and the pupet manifests, it builds a deb package
+and adds it together with the manifest to a fuel build artifact directory, such that it eventually gets built into the new fuel .iso
+
+foobar_1.0-1:
+Contains arbitrary debian package artifacts
+
+foobar.pp:
+Controls the installation and configuration of foobar
+
+To activate this example feature, add "SUBDIRS += f_example_packadd" in the git root Makefile.
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles
new file mode 100644
index 000000000..bad6a0ef5
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles
@@ -0,0 +1 @@
+/etc/foobar/foobar.conf
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control
new file mode 100644
index 000000000..f3f0eb603
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control
@@ -0,0 +1,10 @@
+Package: foobar
+Version: 1.0-1
+Section: utils
+Priority: optional
+Architecture: amd64
+Depends: python2.7
+Maintainer: Main Tainer <maintainer@somwhere.org>
+Description: foo bar daemon
+ This is a daemon for the Foobar service.
+ Foo is bar!
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst
new file mode 100755
index 000000000..f48f26075
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst
@@ -0,0 +1,2 @@
+#!/bin/bash -e
+date
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf b/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf
new file mode 100644
index 000000000..e0eee5c7a
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf
@@ -0,0 +1,2 @@
+# Foobar config file
+foo=bar
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar b/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar
new file mode 100755
index 000000000..c9651a463
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo Hello from the foobar package
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian
new file mode 100644
index 000000000..fe776f33e
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian
@@ -0,0 +1,5 @@
+foobar (1.0-1) precise-proposed; urgency=low
+
+ * Genesis
+
+ -- Main Tainer <maintainer@somewhere.org> Tue, 23 Sep 2014 11:13:27 +0200
diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright
new file mode 100644
index 000000000..4279ce4e2
--- /dev/null
+++ b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright
@@ -0,0 +1,18 @@
+foobar - a test daemon
+Copyright (C) 2014 Main Tainer
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License with
+your Debian GNU system, in /usr/share/common-licenses/GPL, or with the
+Debian GNU gnupg source package as the file COPYING. If not, see
+<http://www.gnu.org/licenses/> or write to the Free Software Foundation,
+Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp b/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp
new file mode 100644
index 000000000..c6219baa8
--- /dev/null
+++ b/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp
@@ -0,0 +1,7 @@
+class opnfv::foobar {
+ if $::osfamily == 'Debian' {
+ package { 'foobar':
+ ensure => installed,
+ }
+ }
+}
diff --git a/fuel/build/f_isoroot/Makefile b/fuel/build/f_isoroot/Makefile
new file mode 100644
index 000000000..a9b12d927
--- /dev/null
+++ b/fuel/build/f_isoroot/Makefile
@@ -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
+##############################################################################
+
+SUBDIRS = f_kscfg f_bootstrap f_repobuild f_odlpluginbuild
+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
+
+validate-cache:
+ @echo "No cache validation schema available for $(shell pwd)"
+ @echo "Continuing ..."
+
+.PHONY: release
+release:clean $(SUBDIRS)
+ @cp -Rvp release/* ../release/isoroot
diff --git a/fuel/build/f_isoroot/README b/fuel/build/f_isoroot/README
new file mode 100644
index 000000000..eb54c0827
--- /dev/null
+++ b/fuel/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/fuel/build/f_isoroot/f_bootstrap/Makefile b/fuel/build/f_isoroot/f_bootstrap/Makefile
new file mode 100644
index 000000000..7404319d9
--- /dev/null
+++ b/fuel/build/f_isoroot/f_bootstrap/Makefile
@@ -0,0 +1,29 @@
+##############################################################################
+# 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
+ @cp bootstrap_admin_node.sh release
+ @cp bootstrap_admin_node.sh.orig release
+
+.PHONY: clean
+clean:
+ @rm -rf release
+
+.PHONY: release
+release:all
+ @cp -Rvp release/* ../release
diff --git a/fuel/build/f_isoroot/f_bootstrap/README b/fuel/build/f_isoroot/f_bootstrap/README
new file mode 100644
index 000000000..5da954ca4
--- /dev/null
+++ b/fuel/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/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
new file mode 100755
index 000000000..8bdf5667c
--- /dev/null
+++ b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
@@ -0,0 +1,172 @@
+#!/bin/bash
+FUEL_RELEASE=$(grep release: /etc/fuel/version.yaml | cut -d: -f2 | tr -d '" ')
+
+function countdown() {
+ local i
+ sleep 1
+ for ((i=$1-1; i>=1; i--)); do
+ printf '\b\b%02d' "$i"
+ sleep 1
+ done
+}
+
+function fail() {
+ echo "ERROR: Fuel node deployment FAILED! Check /var/log/puppet/bootstrap_admin_node.log for details" 1>&2
+ exit 1
+}
+# LANG variable is a workaround for puppet-3.4.2 bug. See LP#1312758 for details
+export LANG=en_US.UTF8
+showmenu="no"
+if [ -f /root/.showfuelmenu ]; then
+ . /root/.showfuelmenu
+fi
+
+echo -n "Applying default Fuel settings..."
+fuelmenu --save-only --iface=eth0
+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
+
+if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
+ fuelmenu
+ else
+ #Give user 15 seconds to enter fuelmenu or else continue
+ echo
+ echo -n "Press a key to enter Fuel Setup (or press ESC to skip)... 15"
+ countdown 15 & pid=$!
+ if ! read -s -n 1 -t 15 key; then
+ echo -e "\nSkipping Fuel Setup..."
+ else
+ { kill "$pid"; wait $!; } 2>/dev/null
+ case "$key" in
+ $'\e') echo "Skipping Fuel Setup.."
+ ;;
+ *) echo -e "\nEntering Fuel Setup..."
+ fuelmenu
+ ;;
+ esac
+ fi
+fi
+
+
+#Reread /etc/sysconfig/network to inform puppet of changes
+. /etc/sysconfig/network
+hostname "$HOSTNAME"
+
+service docker start
+
+if [ -f /root/.build_images ]; then
+ #Fail on all errors
+ set -e
+ trap fail EXIT
+
+ echo "Loading Fuel base image for Docker..."
+ docker load -i /var/www/nailgun/docker/images/fuel-images.tar
+
+ echo "Building Fuel Docker images..."
+ WORKDIR=$(mktemp -d /tmp/docker-buildXXX)
+ SOURCE=/var/www/nailgun/docker
+ REPO_CONT_ID=$(docker -D run -d -p 80 -v /var/www/nailgun:/var/www/nailgun fuel/centos sh -c 'mkdir /var/www/html/os;ln -sf /var/www/nailgun/centos/x86_64 /var/www/html/os/x86_64;/usr/sbin/apachectl -DFOREGROUND')
+ RANDOM_PORT=$(docker port $REPO_CONT_ID 80 | cut -d':' -f2)
+
+ for imagesource in /var/www/nailgun/docker/sources/*; do
+ if ! [ -f "$imagesource/Dockerfile" ]; then
+ echo "Skipping ${imagesource}..."
+ continue
+ fi
+ image=$(basename "$imagesource")
+ cp -R "$imagesource" $WORKDIR/$image
+ mkdir -p $WORKDIR/$image/etc
+ cp -R /etc/puppet /etc/fuel $WORKDIR/$image/etc
+ sed -e "s/_PORT_/${RANDOM_PORT}/" -i $WORKDIR/$image/Dockerfile
+ sed -e 's/production:.*/production: "docker-build"/' -i $WORKDIR/$image/etc/fuel/version.yaml
+ docker build -t fuel/${image}_${FUEL_RELEASE} $WORKDIR/$image
+ done
+ docker rm -f $REPO_CONT_ID
+ rm -rf "$WORKDIR"
+
+ #Remove trap for normal deployment
+ trap - EXIT
+ set +e
+else
+ echo "Loading docker images. (This may take a while)"
+ docker load -i /var/www/nailgun/docker/images/fuel-images.tar
+fi
+
+# apply puppet
+puppet apply --detailed-exitcodes -d -v /etc/puppet/modules/nailgun/examples/host-only.pp
+if [ $? -ge 4 ];then
+ fail
+fi
+rmdir /var/log/remote && ln -s /var/log/docker-logs/remote /var/log/remote
+
+dockerctl check || fail
+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
+
+# Enable updates repository
+cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-updates.repo << EOF
+[mos${FUEL_RELEASE}-updates]
+name=mos${FUEL_RELEASE}-updates
+baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/updates/
+gpgcheck=0
+skip_if_unavailable=1
+EOF
+
+# Enable security repository
+cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-security.repo << EOF
+[mos${FUEL_RELEASE}-security]
+name=mos${FUEL_RELEASE}-security
+baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/security/
+gpgcheck=0
+skip_if_unavailable=1
+EOF
+
+#Check if repo is accessible
+echo "Checking for access to updates repository..."
+repourl=$(grep baseurl /etc/yum.repos.d/*updates* 2>/dev/null | cut -d'=' -f2- | head -1)
+if urlaccesscheck check "$repourl" ; then
+ UPDATE_ISSUES=0
+else
+ UPDATE_ISSUES=1
+fi
+
+if [ $UPDATE_ISSUES -eq 1 ]; then
+ warning="WARNING: There are issues connecting to Fuel update repository.\
+\nPlease fix your connection and update this node with \`yum update\`\
+\nThen run \`dockerctl destroy all; bootstrap_admin_node.sh;\`\
+\nto repeat bootstrap on Fuel Master with the latest updates.\
+\nFor more information, check out Fuel documentation at:\
+\nhttp://docs.mirantis.com/fuel"
+else
+ warning="WARNING: There may be updates available for Fuel.\
+\nYou should update this node with \`yum update\`. If there are available\
+\n updates, run \`dockerctl destroy all; bootstrap_admin_node.sh;\`\
+\nto repeat bootstrap on Fuel Master with the latest updates.\
+\nFor more information, check out Fuel documentation at:\
+\nhttp://docs.mirantis.com/fuel"
+fi
+echo
+echo "*************************************************"
+echo -e "$warning"
+echo "*************************************************"
+echo "Sending notification to Fuel UI..."
+fuel notify --topic warning --send "$warning"
+echo "Fuel node deployment complete!"
diff --git a/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
new file mode 100755
index 000000000..8d21c1e72
--- /dev/null
+++ b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
@@ -0,0 +1,152 @@
+#!/bin/bash
+FUEL_RELEASE=$(grep release: /etc/fuel/version.yaml | cut -d: -f2 | tr -d '" ')
+
+function countdown() {
+ local i
+ sleep 1
+ for ((i=$1-1; i>=1; i--)); do
+ printf '\b\b%02d' "$i"
+ sleep 1
+ done
+}
+
+function fail() {
+ echo "ERROR: Fuel node deployment FAILED! Check /var/log/puppet/bootstrap_admin_node.log for details" 1>&2
+ exit 1
+}
+# LANG variable is a workaround for puppet-3.4.2 bug. See LP#1312758 for details
+export LANG=en_US.UTF8
+showmenu="no"
+if [ -f /root/.showfuelmenu ]; then
+ . /root/.showfuelmenu
+fi
+
+echo -n "Applying default Fuel settings..."
+fuelmenu --save-only --iface=eth0
+echo "Done!"
+
+if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
+ fuelmenu
+ else
+ #Give user 15 seconds to enter fuelmenu or else continue
+ echo
+ echo -n "Press a key to enter Fuel Setup (or press ESC to skip)... 15"
+ countdown 15 & pid=$!
+ if ! read -s -n 1 -t 15 key; then
+ echo -e "\nSkipping Fuel Setup..."
+ else
+ { kill "$pid"; wait $!; } 2>/dev/null
+ case "$key" in
+ $'\e') echo "Skipping Fuel Setup.."
+ ;;
+ *) echo -e "\nEntering Fuel Setup..."
+ fuelmenu
+ ;;
+ esac
+ fi
+fi
+
+
+#Reread /etc/sysconfig/network to inform puppet of changes
+. /etc/sysconfig/network
+hostname "$HOSTNAME"
+
+service docker start
+
+if [ -f /root/.build_images ]; then
+ #Fail on all errors
+ set -e
+ trap fail EXIT
+
+ echo "Loading Fuel base image for Docker..."
+ docker load -i /var/www/nailgun/docker/images/fuel-images.tar
+
+ echo "Building Fuel Docker images..."
+ WORKDIR=$(mktemp -d /tmp/docker-buildXXX)
+ SOURCE=/var/www/nailgun/docker
+ REPO_CONT_ID=$(docker -D run -d -p 80 -v /var/www/nailgun:/var/www/nailgun fuel/centos sh -c 'mkdir /var/www/html/os;ln -sf /var/www/nailgun/centos/x86_64 /var/www/html/os/x86_64;/usr/sbin/apachectl -DFOREGROUND')
+ RANDOM_PORT=$(docker port $REPO_CONT_ID 80 | cut -d':' -f2)
+
+ for imagesource in /var/www/nailgun/docker/sources/*; do
+ if ! [ -f "$imagesource/Dockerfile" ]; then
+ echo "Skipping ${imagesource}..."
+ continue
+ fi
+ image=$(basename "$imagesource")
+ cp -R "$imagesource" $WORKDIR/$image
+ mkdir -p $WORKDIR/$image/etc
+ cp -R /etc/puppet /etc/fuel $WORKDIR/$image/etc
+ sed -e "s/_PORT_/${RANDOM_PORT}/" -i $WORKDIR/$image/Dockerfile
+ sed -e 's/production:.*/production: "docker-build"/' -i $WORKDIR/$image/etc/fuel/version.yaml
+ docker build -t fuel/${image}_${FUEL_RELEASE} $WORKDIR/$image
+ done
+ docker rm -f $REPO_CONT_ID
+ rm -rf "$WORKDIR"
+
+ #Remove trap for normal deployment
+ trap - EXIT
+ set +e
+else
+ echo "Loading docker images. (This may take a while)"
+ docker load -i /var/www/nailgun/docker/images/fuel-images.tar
+fi
+
+# apply puppet
+puppet apply --detailed-exitcodes -d -v /etc/puppet/modules/nailgun/examples/host-only.pp
+if [ $? -ge 4 ];then
+ fail
+fi
+rmdir /var/log/remote && ln -s /var/log/docker-logs/remote /var/log/remote
+
+dockerctl check || fail
+bash /etc/rc.local
+
+# Enable updates repository
+cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-updates.repo << EOF
+[mos${FUEL_RELEASE}-updates]
+name=mos${FUEL_RELEASE}-updates
+baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/updates/
+gpgcheck=0
+skip_if_unavailable=1
+EOF
+
+# Enable security repository
+cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-security.repo << EOF
+[mos${FUEL_RELEASE}-security]
+name=mos${FUEL_RELEASE}-security
+baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/security/
+gpgcheck=0
+skip_if_unavailable=1
+EOF
+
+#Check if repo is accessible
+echo "Checking for access to updates repository..."
+repourl=$(grep baseurl /etc/yum.repos.d/*updates* 2>/dev/null | cut -d'=' -f2- | head -1)
+if urlaccesscheck check "$repourl" ; then
+ UPDATE_ISSUES=0
+else
+ UPDATE_ISSUES=1
+fi
+
+if [ $UPDATE_ISSUES -eq 1 ]; then
+ warning="WARNING: There are issues connecting to Fuel update repository.\
+\nPlease fix your connection and update this node with \`yum update\`\
+\nThen run \`dockerctl destroy all; bootstrap_admin_node.sh;\`\
+\nto repeat bootstrap on Fuel Master with the latest updates.\
+\nFor more information, check out Fuel documentation at:\
+\nhttp://docs.mirantis.com/fuel"
+else
+ warning="WARNING: There may be updates available for Fuel.\
+\nYou should update this node with \`yum update\`. If there are available\
+\n updates, run \`dockerctl destroy all; bootstrap_admin_node.sh;\`\
+\nto repeat bootstrap on Fuel Master with the latest updates.\
+\nFor more information, check out Fuel documentation at:\
+\nhttp://docs.mirantis.com/fuel"
+fi
+echo
+echo "*************************************************"
+echo -e "$warning"
+echo "*************************************************"
+echo "Sending notification to Fuel UI..."
+fuel notify --topic warning --send "$warning"
+echo "Fuel node deployment complete!"
diff --git a/fuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh b/fuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh
new file mode 100755
index 000000000..7ac896589
--- /dev/null
+++ b/fuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh
@@ -0,0 +1,4 @@
+#/bin/sh
+date
+echo "This is an example file run at post-bootstrap."
+exit 0
diff --git a/fuel/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh b/fuel/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh
new file mode 100755
index 000000000..427a55add
--- /dev/null
+++ b/fuel/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh
@@ -0,0 +1,19 @@
+#/bin/sh
+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
+echo "Done installing pre-build repo"
diff --git a/fuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh b/fuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh
new file mode 100755
index 000000000..ac427bf87
--- /dev/null
+++ b/fuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh
@@ -0,0 +1,4 @@
+#/bin/sh
+date
+echo "This is an example file run at pre-bootstrap."
+exit 0
diff --git a/fuel/build/f_isoroot/f_kscfg/Makefile b/fuel/build/f_isoroot/f_kscfg/Makefile
new file mode 100644
index 000000000..38305fd50
--- /dev/null
+++ b/fuel/build/f_isoroot/f_kscfg/Makefile
@@ -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
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all:
+ @mkdir -p release
+ @cp ks.cfg release
+ @cp ks.cfg.orig release
+
+.PHONY: clean
+clean:
+ @rm -rf release
+
+.PHONY: release
+release: all
+ @cp -Rvp release/* ../release
diff --git a/fuel/build/f_isoroot/f_kscfg/README b/fuel/build/f_isoroot/f_kscfg/README
new file mode 100644
index 000000000..c85efde77
--- /dev/null
+++ b/fuel/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/fuel/build/f_isoroot/f_kscfg/ks.cfg b/fuel/build/f_isoroot/f_kscfg/ks.cfg
new file mode 100644
index 000000000..12cd1abab
--- /dev/null
+++ b/fuel/build/f_isoroot/f_kscfg/ks.cfg
@@ -0,0 +1,598 @@
+install
+text
+%include /tmp/source.ks
+reboot --eject
+lang en_US.UTF-8
+keyboard us
+rootpw r00tme
+timezone --utc Etc/UTC
+firewall --disabled
+selinux --disabled
+# ignore unsupported hardware warning
+unsupported_hardware
+# SKIP CONFIGURING X
+skipx
+# NEVER ever place zerombr here, it breaks automated installation
+%include /tmp/bootloader.ks
+%include /tmp/partition.ks
+
+# PREINSTALL SECTION
+# HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE
+# INSTALLATION PROCESS ITSELF
+%pre
+#!/bin/sh
+
+# hard drives
+drives=""
+removable_drives=""
+for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do
+ if !(blkid | grep -q "${drv}.*Fuel"); then
+ if (grep -q 0 /sys/block/${drv}/removable); then
+ drives="${drives} ${drv}"
+ else
+ removable_drives="${removable_drives} ${drv}"
+ fi
+ fi
+done
+default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+installdrive="undefined"
+forceformat="no"
+for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+set ${drives} ${removable_drives}
+numdrives=`echo $#`
+
+tgtdrive="${installdrive}"
+
+function confirm_format {
+ check_drive="$1"
+ local confirm_format="no"
+
+ if [[ "$forceformat" == "yes" ]] ; then
+ return 0
+ fi
+
+ if parted -s /dev/$check_drive print &>/dev/null ; then
+ echo
+ echo "$check_drive drive contains partition table:"
+ parted -s /dev/$check_drive print
+ echo
+ read -p "Are you sure you want to erase ALL data on disk $check_drive? (y/N)" confirm_format
+ if [[ "$confirm_format" == "y" ]] || [[ "$confirm_format" == "Y" ]] || [[ "$forceformat" == "yes" ]]; then
+ return 0
+ else
+ return 1
+ fi
+ else
+ return 0
+ fi
+}
+
+format_confirmed="no"
+
+if [ $numdrives -lt 1 ]; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ clear
+ echo
+ echo '********************************************************************'
+ echo '* E R R O R *'
+ echo '* *'
+ echo '* There is no suitable media available for installation. *'
+ echo '* Please attach a drive and try again. *'
+ echo '* *'
+ echo '********************************************************************'
+ echo
+ read -p "Press Enter to shut down the system: " _
+ poweroff
+fi
+
+if [ ${numdrives} -gt 1 ] || [ `echo ${drives} | wc -w` -eq 0 ] ; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ while [ "${tgtdrive}" = "undefined" ]; do
+ clear
+ echo
+ echo '********************************************************************************'
+ echo '* W A R N I N G *'
+ echo '* *'
+ echo '* Which of the detected hard drives do you want to be used as *'
+ echo '* the installation target? *'
+ echo '* *'
+ echo '********************************************************************************'
+ echo
+ echo "Possible choices"
+ echo "Persistent drives: ${drives}"
+ echo "Removable drives: ${removable_drives}"
+ echo
+ if [ `echo ${drives} | wc -w` -eq 1 ] ; then
+ read -t 30 -p "Choose hard drive: " tgtdrive || tgtdrive=$default_drive
+ else
+ read -p "Choose hard drive: " tgtdrive
+ fi
+ match="no"
+ for drive in ${drives[@]} ${removable_drives[@]}; do
+ if [[ "$drive" == "$tgtdrive" ]] && match="yes" ; then
+ if confirm_format $tgtdrive ; then
+ format_confirmed="yes"
+ break
+ else
+ tgtdrive="undefined"
+ read -p "You may select another disk. Press Enter to continue." _
+ fi
+ fi
+ done
+ if [[ "$match" == "no" ]]; then
+ tgtdrive="undefined"
+ read -p "Invalid choice. Press Enter to continue." _
+ fi
+ done
+ clear
+ chvt 1
+else
+ tgtdrive=`echo ${drives} | sed -e "s/^\s*//" -e "s/\s*$//"`
+fi
+
+if [ "$format_confirmed" != "yes" ] ; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ if ! confirm_format $tgtdrive ; then
+ clear
+ echo
+ echo '********************************************************************'
+ echo '* E R R O R *'
+ echo '* *'
+ echo '* Disk $tgtdrive contains active partition(s). *'
+ echo '* Installation cannot continue without confirmation. *'
+ echo '* *'
+ echo '********************************************************************'
+ echo
+ read -p "Press Enter to restart: " _
+ reboot
+ fi
+ chvt 1
+fi
+
+# verify tgtdrive is at least 41GB
+tgtdrivesize=$(( $(cat "/sys/class/block/${tgtdrive}/size") / 2 / 1024 ))
+if [ $tgtdrivesize -lt 41984 ]; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ clear
+ echo
+ echo '********************************************************************'
+ echo '* E R R O R *'
+ echo '* *'
+ echo '* Your disk is under 41GB in size. Installation cannot continue. *'
+ echo '* Restart installation with a larger disk. *'
+ echo '* *'
+ echo '********************************************************************'
+ echo
+ read -p "Press Enter to restart: " _
+ reboot
+fi
+
+# paths in /dev have "/" instead of "!" for cciss devices
+tgtdrive=$(echo $tgtdrive | sed -e 's/!/\//')
+
+# source
+if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
+ echo "harddrive --partition=LABEL="OpenStack_Fuel" --dir=/" > /tmp/source.ks
+elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
+ echo "harddrive --partition=UUID=will_be_substituted_with_actual_uuid --dir=/" > /tmp/source.ks
+else
+ echo "cdrom" > /tmp/source.ks
+fi
+
+vgremove -ff os
+dd if=/dev/zero of=/dev/${tgtdrive} bs=10M count=10
+sleep 3
+hdparm -z /dev/${tgtdrive}
+parted -s /dev/${tgtdrive} mklabel gpt
+parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 0 24
+parted -s /dev/${tgtdrive} set 1 bios_grub on
+parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary fat16 24 224
+parted -s /dev/${tgtdrive} set 2 boot on
+parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 224 424
+sleep 3
+hdparm -z /dev/${tgtdrive}
+
+# partition
+
+# This adds support for the p seperator required for cciss devices
+if echo ${tgtdrive} | grep -q -e cciss ; then
+ bootdev=${tgtdrive}p
+else
+ bootdev=${tgtdrive}
+fi
+echo > /tmp/partition.ks
+echo "partition /boot --onpart=/dev/${bootdev}3" >> /tmp/partition.ks
+echo "partition /boot/efi --onpart=/dev/${bootdev}2" >> /tmp/partition.ks
+echo "partition pv.001 --ondisk=${tgtdrive} --size=41000 --grow" >> /tmp/partition.ks
+echo "volgroup os pv.001" >> /tmp/partition.ks
+echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks
+echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks
+echo "logvol /var --vgname=os --size=10000 --percent 30 --grow --name=var --fstype=ext4" >> /tmp/partition.ks
+echo "logvol /var/lib/docker --vgname=os --size=17000 --percent 20 --grow --name=varlibdocker --fstype=ext4" >> /tmp/partition.ks
+echo "logvol /var/log --vgname=os --size=4096 --percent 50 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks
+
+
+# bootloader
+echo "bootloader --location=partition --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
+
+# Anaconda can not install grub 0.97 on disks which are >4T.
+# The reason is that grub does not support such large geometries
+# and it simply thinks that the cylinder number has negative value.
+# Here we just set geometry manually so that grub thinks that disk
+# size is equal to 1G.
+# 130 cylinders * (16065 * 512 = 8225280 bytes) = 1G
+echo "%post --nochroot --log=/mnt/sysimage/root/anaconda-post-partition.log" > /tmp/post_partition.ks
+echo "echo \"device (hd0) /dev/${tgtdrive}\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo \"geometry (hd0) 130 255 63\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo \"root (hd0,2)\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch" >> /tmp/post_partition.ks
+
+%end
+
+%packages --nobase --excludedocs
+@Core
+fuel
+fuel-library
+fuel-dockerctl
+authconfig
+bind-utils
+cronie
+crontabs
+curl
+daemonize
+dhcp
+docker-io
+fuel-bootstrap-image
+fuel-createmirror
+fuel-target-centos-images
+fuel-package-updates
+fuelmenu
+fuel-docker-images
+gdisk
+lrzip
+lsof
+man
+mlocate
+nmap-ncat
+ntp
+ntpdate
+openssh-clients
+policycoreutils
+python-daemon
+rsync
+ruby21-puppet
+ruby21-rubygem-netaddr
+ruby21-rubygem-openstack
+selinux-policy-targeted
+strace
+subscription-manager
+sysstat
+system-config-firewall-base
+tcpdump
+telnet
+vim-enhanced
+virt-what
+wget
+yum
+yum-plugin-priorities
+
+%include /tmp/post_partition.ks
+
+# POSTINSTALL SECTION
+# HERE ARE COMMANDS THAT WILL BE LAUNCHED JUST AFTER
+# INSTALLATION ITSELF COMPLETED
+%post
+echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules
+chmod +x /etc/rc.modules
+echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf
+mkdir -p /var/log/coredump
+echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf
+chmod 777 /var/log/coredump
+echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf
+
+# Mount installation media in chroot
+%post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log
+#!/bin/sh
+
+set -x
+
+SOURCE="/mnt/sysimage/tmp/source"
+
+for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+mkdir -p "${SOURCE}"
+
+case "${repo}" in
+ nfs:*)
+ nfs_url="${repo#nfs:}"
+ mount -t nfs "${nfs_url}" "${SOURCE}"
+ ;;
+ *)
+ if [ -d "/mnt/source" ]; then
+ mount -o bind "/mnt/source" "${SOURCE}"
+ fi
+ ;;
+esac
+
+%post --log=/root/anaconda-post-after-chroot.log
+#!/bin/bash
+
+set -x
+
+function save_cfg {
+ scrFile="/etc/sysconfig/network-scripts/ifcfg-$device"
+ search="domain $domain\nsearch $domain"
+ sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
+ grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
+ echo "${search}\nnameserver 127.0.0.1" > /etc/resolv.conf
+ [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/resolv.conf
+ [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/dnsmasq.upstream
+ [ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
+ [ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
+
+ echo DEVICE=$device > $scrFile
+ echo ONBOOT=yes >> $scrFile
+ echo NM_CONTROLLED=no >> $scrFile
+ echo HWADDR=$hwaddr >> $scrFile
+ echo USERCTL=no >> $scrFile
+ echo PEERDNS=no >> $scrFile
+ if [ $ip ]; then
+ echo BOOTPROTO=static >> $scrFile
+ echo IPADDR=$ip >> $scrFile
+ echo NETMASK=$netmask >> $scrFile
+ else
+ echo BOOTPROTO=dhcp >> $scrFile
+ fi
+ scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
+ #Ignore gateway and set up DHCP if it is used, otherwise apply it
+ if [ $dhcp_interface ] && [ "$dhcp_interface" != "$device" ]; then
+ echo "DEVICE=$dhcp_interface" > $scrDHCPFile
+ echo "BOOTPROTO=dhcp" >> $scrDHCPFile
+ echo "ONBOOT=yes" >> $scrDHCPFile
+ echo "USERCTL=no" >> $scrDHCPFile
+ else
+ echo GATEWAY=$gw >> /etc/sysconfig/network
+ fi
+ [ -n "$build_images" -a "$build_images" != "0" ] && echo -e "$build_images" > /root/.build_images
+}
+
+# Default FQDN
+hostname="nailgun.mirantis.com"
+
+for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+hostname=$hostname
+domain=${hostname#*.}
+ip=$ip
+netmask=$netmask
+gw=$gw
+device="eth0"
+hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+dhcp_interface=$dhcp_interface
+build_images=$build_images
+save_cfg
+
+# Mounting installation source
+SOURCE=/tmp/source
+FS=/tmp/fs
+
+echo
+mkdir -p ${SOURCE}
+mkdir -p ${FS}
+
+if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
+ mount /dev/disk/by-label/"OpenStack_Fuel" ${SOURCE}
+elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
+ mount /dev/disk/by-uuid/will_be_substituted_with_actual_uuid ${FS}
+ mount -o loop ${FS}/nailgun.iso ${SOURCE}
+fi
+
+OPENSTACK_VERSION=`cat ${SOURCE}/openstack_version`
+
+# ----------------------
+# UNPACKING REPOSITORIES
+# ----------------------
+
+wwwdir="/var/www/nailgun"
+repodir="${wwwdir}/${OPENSTACK_VERSION}"
+
+# Copying Centos files
+mkdir -p ${repodir}/centos/x86_64
+cp -r ${SOURCE}/images ${repodir}/centos/x86_64
+cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64
+cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64
+cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64
+cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
+
+# Copying Ubuntu files
+mkdir -p ${repodir}/ubuntu/x86_64/images
+cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
+cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
+
+# We do not ship debian-installer kernel and initrd on ISO.
+# But we still need to be able to create ubuntu cobbler distro
+# which requires kernel and initrd to be available. So, we
+# just touch these files to work around cobbler's limitation.
+touch ${repodir}/ubuntu/x86_64/images/linux
+touch ${repodir}/ubuntu/x86_64/images/initrd.gz
+
+# make links for backward compatibility
+ln -s ${repodir}/centos ${wwwdir}/centos
+ln -s ${repodir}/ubuntu ${wwwdir}/ubuntu
+
+# --------------------------
+# UNPACKING PUPPET MANIFESTS
+# --------------------------
+
+# create folders
+#mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/
+#mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/
+#rm -rf /etc/puppet/modules/
+
+# TODO(ikalnitsky): investigate why we need this
+#cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/
+
+# place modules and manifests
+#tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules
+#cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp
+cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/${OPENSTACK_VERSION}/manifests/
+
+# make links for backward compatibility
+#pushd /etc/puppet
+#ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests
+#ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules
+#popd
+
+cp ${SOURCE}/send2syslog.py /bin/send2syslog.py
+mkdir -p /var/lib/hiera
+touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
+
+# Prepare local repository specification
+rm /etc/yum.repos.d/CentOS*.repo
+cat > /etc/yum.repos.d/nailgun.repo << EOF
+[nailgun]
+name=Nailgun Local Repo
+baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64
+gpgcheck=0
+EOF
+
+# Disable subscription-manager plugins
+sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/product-id.conf || :
+sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf || :
+
+# Disable GSSAPI in ssh server config
+sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config
+
+# Enable MOTD banner in sshd
+sed -i -e "s/^\s*PrintMotd no/PrintMotd yes/g" /etc/ssh/sshd_config
+
+# Add note regarding local repos creation to MOTD
+cat >> /etc/motd << EOF
+
+All environments use online repositories by default.
+Use the following commands to create local repositories
+on master node and change default repository settings:
+
+* CentOS: fuel-package-updates (see --help for options)
+* Ubuntu: fuel-createmirror (see --help for options)
+
+Please refer to the following guide for more information:
+https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror
+
+EOF
+
+# Copying bootstrap_admin_node.sh, chmod it and
+# adding /etc/init/bootstrap_admin_node.conf
+cp ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh
+chmod 0777 /usr/local/sbin/bootstrap_admin_node.sh
+cp ${SOURCE}/bootstrap_admin_node.conf /etc/init/bootstrap_admin_node.conf
+echo "ENABLED=1" > /etc/sysconfig/bootstrap_admin_node
+
+# Copying version.yaml file. It contains COMMIT_SHA of last commit.
+RELEASE=$(awk '/release/{gsub(/"/, "");print $2}' ${SOURCE}/version.yaml)
+mkdir -p /etc/nailgun /etc/fuel/${RELEASE} /etc/fuel/release_versions
+cp ${SOURCE}/version.yaml /etc/nailgun/version.yaml
+cp ${SOURCE}/version.yaml /etc/fuel/${RELEASE}/version.yaml
+ln -s /etc/fuel/${RELEASE}/version.yaml /etc/fuel/version.yaml
+cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat ${SOURCE}/openstack_version`.yaml
+
+# Generete Fuel UUID
+uuidgen > /etc/fuel/fuel-uuid
+
+###Run fuel menu
+[ -z "$showmenu" ] && showmenu="no"
+cat > /root/.showfuelmenu << EOF
+#Set to yes to run Fuel Setup
+#Set to no to accept default settings
+showmenu=$showmenu
+EOF
+
+# Prepare custom /etc/issue logon banner and script for changing IP in it
+cat > /etc/issue << EOF
+#########################################
+# Welcome to the Fuel server #
+#########################################
+Server is running on \m platform
+
+Fuel UI is available on:
+http://:8000
+
+Default administrator login: root
+Default administrator password: r00tme
+
+Default Fuel UI login: admin
+Default Fuel UI password: admin
+
+Please change root password on first login.
+
+EOF
+
+
+cat >> '/etc/rc.local' << EOF
+first=yes
+for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
+if [ "\$first" = "yes" ]; then
+ ipstr="Fuel UI is available on: http://\$ip:8000"
+ first=no
+else
+ ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000")
+fi
+done
+tmpissue=\$(mktemp)
+while read -r line; do
+ if [[ "\$line" =~ "Fuel UI is available on" ]]; then
+ echo -e "\$ipstr" >> \$tmpissue
+ elif [[ "\$line" =~ :8000$ ]]; then
+ :
+ else
+ echo -e "\$line" >> \$tmpissue
+ fi
+done < /etc/issue
+mv "\$tmpissue" /etc/issue
+
+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
+######### OPNFV addition END ############
+
+# Unmounting source
+umount -f ${SOURCE}
+rm -rf ${SOURCE}
+
+umount -f ${FS} || true
+rm -rf ${FS}
+
+echo "tos orphan 7" >> /etc/ntp.conf
+
+# Do not show error message on ntpdate failure. Customers should not be confused
+# if admin node does not have access to the internet time servers.
+sed -i /etc/rc.d/init.d/ntpdate -e 's/\([ $RETVAL -eq 0 ] && success || \)failure/\1success/'
+
+# Disabling splash
+sed -i --follow-symlinks -e '/^\skernel/ s/rhgb//' /etc/grub.conf
+sed -i --follow-symlinks -e '/^\skernel/ s/quiet//' /etc/grub.conf
+
+# Disabling console clearing
+sed -i 's/getty/getty --noclear/' /etc/init/tty.conf
+
+# Disabling starting first console from start-ttys service
+sed -i --follow-symlinks -e 's/ACTIVE_CONSOLES=.*/ACTIVE_CONSOLES=\/dev\/tty\[2-6\]/' /etc/sysconfig/init
+
+# Copying default bash settings to the root directory
+cp -f /etc/skel/.bash* /root/
+
+# Blacklist i2c_piix4 module for VirtualBox so it does not create kernel errors
+[[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf
+
+%end \ No newline at end of file
diff --git a/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig b/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig
new file mode 100644
index 000000000..cf8cf80d1
--- /dev/null
+++ b/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig
@@ -0,0 +1,592 @@
+install
+text
+%include /tmp/source.ks
+reboot --eject
+lang en_US.UTF-8
+keyboard us
+rootpw r00tme
+timezone --utc Etc/UTC
+firewall --disabled
+selinux --disabled
+# ignore unsupported hardware warning
+unsupported_hardware
+# SKIP CONFIGURING X
+skipx
+# NEVER ever place zerombr here, it breaks automated installation
+%include /tmp/bootloader.ks
+%include /tmp/partition.ks
+
+# PREINSTALL SECTION
+# HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE
+# INSTALLATION PROCESS ITSELF
+%pre
+#!/bin/sh
+
+# hard drives
+drives=""
+removable_drives=""
+for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do
+ if !(blkid | grep -q "${drv}.*Fuel"); then
+ if (grep -q 0 /sys/block/${drv}/removable); then
+ drives="${drives} ${drv}"
+ else
+ removable_drives="${removable_drives} ${drv}"
+ fi
+ fi
+done
+default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+installdrive="undefined"
+forceformat="no"
+for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+set ${drives} ${removable_drives}
+numdrives=`echo $#`
+
+tgtdrive="${installdrive}"
+
+function confirm_format {
+ check_drive="$1"
+ local confirm_format="no"
+
+ if [[ "$forceformat" == "yes" ]] ; then
+ return 0
+ fi
+
+ if parted -s /dev/$check_drive print &>/dev/null ; then
+ echo
+ echo "$check_drive drive contains partition table:"
+ parted -s /dev/$check_drive print
+ echo
+ read -p "Are you sure you want to erase ALL data on disk $check_drive? (y/N)" confirm_format
+ if [[ "$confirm_format" == "y" ]] || [[ "$confirm_format" == "Y" ]] || [[ "$forceformat" == "yes" ]]; then
+ return 0
+ else
+ return 1
+ fi
+ else
+ return 0
+ fi
+}
+
+format_confirmed="no"
+
+if [ $numdrives -lt 1 ]; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ clear
+ echo
+ echo '********************************************************************'
+ echo '* E R R O R *'
+ echo '* *'
+ echo '* There is no suitable media available for installation. *'
+ echo '* Please attach a drive and try again. *'
+ echo '* *'
+ echo '********************************************************************'
+ echo
+ read -p "Press Enter to shut down the system: " _
+ poweroff
+fi
+
+if [ ${numdrives} -gt 1 ] || [ `echo ${drives} | wc -w` -eq 0 ] ; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ while [ "${tgtdrive}" = "undefined" ]; do
+ clear
+ echo
+ echo '********************************************************************************'
+ echo '* W A R N I N G *'
+ echo '* *'
+ echo '* Which of the detected hard drives do you want to be used as *'
+ echo '* the installation target? *'
+ echo '* *'
+ echo '********************************************************************************'
+ echo
+ echo "Possible choices"
+ echo "Persistent drives: ${drives}"
+ echo "Removable drives: ${removable_drives}"
+ echo
+ if [ `echo ${drives} | wc -w` -eq 1 ] ; then
+ read -t 30 -p "Choose hard drive: " tgtdrive || tgtdrive=$default_drive
+ else
+ read -p "Choose hard drive: " tgtdrive
+ fi
+ match="no"
+ for drive in ${drives[@]} ${removable_drives[@]}; do
+ if [[ "$drive" == "$tgtdrive" ]] && match="yes" ; then
+ if confirm_format $tgtdrive ; then
+ format_confirmed="yes"
+ break
+ else
+ tgtdrive="undefined"
+ read -p "You may select another disk. Press Enter to continue." _
+ fi
+ fi
+ done
+ if [[ "$match" == "no" ]]; then
+ tgtdrive="undefined"
+ read -p "Invalid choice. Press Enter to continue." _
+ fi
+ done
+ clear
+ chvt 1
+else
+ tgtdrive=`echo ${drives} | sed -e "s/^\s*//" -e "s/\s*$//"`
+fi
+
+if [ "$format_confirmed" != "yes" ] ; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ if ! confirm_format $tgtdrive ; then
+ clear
+ echo
+ echo '********************************************************************'
+ echo '* E R R O R *'
+ echo '* *'
+ echo '* Disk $tgtdrive contains active partition(s). *'
+ echo '* Installation cannot continue without confirmation. *'
+ echo '* *'
+ echo '********************************************************************'
+ echo
+ read -p "Press Enter to restart: " _
+ reboot
+ fi
+ chvt 1
+fi
+
+# verify tgtdrive is at least 41GB
+tgtdrivesize=$(( $(cat "/sys/class/block/${tgtdrive}/size") / 2 / 1024 ))
+if [ $tgtdrivesize -lt 41984 ]; then
+ exec < /dev/tty3 > /dev/tty3 2>&1
+ chvt 3
+ clear
+ echo
+ echo '********************************************************************'
+ echo '* E R R O R *'
+ echo '* *'
+ echo '* Your disk is under 41GB in size. Installation cannot continue. *'
+ echo '* Restart installation with a larger disk. *'
+ echo '* *'
+ echo '********************************************************************'
+ echo
+ read -p "Press Enter to restart: " _
+ reboot
+fi
+
+# paths in /dev have "/" instead of "!" for cciss devices
+tgtdrive=$(echo $tgtdrive | sed -e 's/!/\//')
+
+# source
+if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
+ echo "harddrive --partition=LABEL="OpenStack_Fuel" --dir=/" > /tmp/source.ks
+elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
+ echo "harddrive --partition=UUID=will_be_substituted_with_actual_uuid --dir=/" > /tmp/source.ks
+else
+ echo "cdrom" > /tmp/source.ks
+fi
+
+vgremove -ff os
+dd if=/dev/zero of=/dev/${tgtdrive} bs=10M count=10
+sleep 3
+hdparm -z /dev/${tgtdrive}
+parted -s /dev/${tgtdrive} mklabel gpt
+parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 0 24
+parted -s /dev/${tgtdrive} set 1 bios_grub on
+parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary fat16 24 224
+parted -s /dev/${tgtdrive} set 2 boot on
+parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 224 424
+sleep 3
+hdparm -z /dev/${tgtdrive}
+
+# partition
+
+# This adds support for the p seperator required for cciss devices
+if echo ${tgtdrive} | grep -q -e cciss ; then
+ bootdev=${tgtdrive}p
+else
+ bootdev=${tgtdrive}
+fi
+echo > /tmp/partition.ks
+echo "partition /boot --onpart=/dev/${bootdev}3" >> /tmp/partition.ks
+echo "partition /boot/efi --onpart=/dev/${bootdev}2" >> /tmp/partition.ks
+echo "partition pv.001 --ondisk=${tgtdrive} --size=41000 --grow" >> /tmp/partition.ks
+echo "volgroup os pv.001" >> /tmp/partition.ks
+echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks
+echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks
+echo "logvol /var --vgname=os --size=10000 --percent 30 --grow --name=var --fstype=ext4" >> /tmp/partition.ks
+echo "logvol /var/lib/docker --vgname=os --size=17000 --percent 20 --grow --name=varlibdocker --fstype=ext4" >> /tmp/partition.ks
+echo "logvol /var/log --vgname=os --size=4096 --percent 50 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks
+
+
+# bootloader
+echo "bootloader --location=partition --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
+
+# Anaconda can not install grub 0.97 on disks which are >4T.
+# The reason is that grub does not support such large geometries
+# and it simply thinks that the cylinder number has negative value.
+# Here we just set geometry manually so that grub thinks that disk
+# size is equal to 1G.
+# 130 cylinders * (16065 * 512 = 8225280 bytes) = 1G
+echo "%post --nochroot --log=/mnt/sysimage/root/anaconda-post-partition.log" > /tmp/post_partition.ks
+echo "echo \"device (hd0) /dev/${tgtdrive}\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo \"geometry (hd0) 130 255 63\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo \"root (hd0,2)\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
+echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch" >> /tmp/post_partition.ks
+
+%end
+
+%packages --nobase --excludedocs
+@Core
+fuel
+fuel-library
+fuel-dockerctl
+authconfig
+bind-utils
+cronie
+crontabs
+curl
+daemonize
+dhcp
+docker-io
+fuel-bootstrap-image
+fuel-createmirror
+fuel-target-centos-images
+fuel-package-updates
+fuelmenu
+fuel-docker-images
+gdisk
+lrzip
+lsof
+man
+mlocate
+nmap-ncat
+ntp
+ntpdate
+openssh-clients
+policycoreutils
+python-daemon
+rsync
+ruby21-puppet
+ruby21-rubygem-netaddr
+ruby21-rubygem-openstack
+selinux-policy-targeted
+strace
+subscription-manager
+sysstat
+system-config-firewall-base
+tcpdump
+telnet
+vim-enhanced
+virt-what
+wget
+yum
+yum-plugin-priorities
+
+%include /tmp/post_partition.ks
+
+# POSTINSTALL SECTION
+# HERE ARE COMMANDS THAT WILL BE LAUNCHED JUST AFTER
+# INSTALLATION ITSELF COMPLETED
+%post
+echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules
+chmod +x /etc/rc.modules
+echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf
+mkdir -p /var/log/coredump
+echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf
+chmod 777 /var/log/coredump
+echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf
+
+# Mount installation media in chroot
+%post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log
+#!/bin/sh
+
+set -x
+
+SOURCE="/mnt/sysimage/tmp/source"
+
+for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+mkdir -p "${SOURCE}"
+
+case "${repo}" in
+ nfs:*)
+ nfs_url="${repo#nfs:}"
+ mount -t nfs "${nfs_url}" "${SOURCE}"
+ ;;
+ *)
+ if [ -d "/mnt/source" ]; then
+ mount -o bind "/mnt/source" "${SOURCE}"
+ fi
+ ;;
+esac
+
+%post --log=/root/anaconda-post-after-chroot.log
+#!/bin/bash
+
+set -x
+
+function save_cfg {
+ scrFile="/etc/sysconfig/network-scripts/ifcfg-$device"
+ search="domain $domain\nsearch $domain"
+ sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
+ grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
+ echo "${search}\nnameserver 127.0.0.1" > /etc/resolv.conf
+ [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/resolv.conf
+ [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/dnsmasq.upstream
+ [ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
+ [ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
+
+ echo DEVICE=$device > $scrFile
+ echo ONBOOT=yes >> $scrFile
+ echo NM_CONTROLLED=no >> $scrFile
+ echo HWADDR=$hwaddr >> $scrFile
+ echo USERCTL=no >> $scrFile
+ echo PEERDNS=no >> $scrFile
+ if [ $ip ]; then
+ echo BOOTPROTO=static >> $scrFile
+ echo IPADDR=$ip >> $scrFile
+ echo NETMASK=$netmask >> $scrFile
+ else
+ echo BOOTPROTO=dhcp >> $scrFile
+ fi
+ scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
+ #Ignore gateway and set up DHCP if it is used, otherwise apply it
+ if [ $dhcp_interface ] && [ "$dhcp_interface" != "$device" ]; then
+ echo "DEVICE=$dhcp_interface" > $scrDHCPFile
+ echo "BOOTPROTO=dhcp" >> $scrDHCPFile
+ echo "ONBOOT=yes" >> $scrDHCPFile
+ echo "USERCTL=no" >> $scrDHCPFile
+ else
+ echo GATEWAY=$gw >> /etc/sysconfig/network
+ fi
+ [ -n "$build_images" -a "$build_images" != "0" ] && echo -e "$build_images" > /root/.build_images
+}
+
+# Default FQDN
+hostname="nailgun.mirantis.com"
+
+for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+hostname=$hostname
+domain=${hostname#*.}
+ip=$ip
+netmask=$netmask
+gw=$gw
+device="eth0"
+hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+dhcp_interface=$dhcp_interface
+build_images=$build_images
+save_cfg
+
+# Mounting installation source
+SOURCE=/tmp/source
+FS=/tmp/fs
+
+echo
+mkdir -p ${SOURCE}
+mkdir -p ${FS}
+
+if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
+ mount /dev/disk/by-label/"OpenStack_Fuel" ${SOURCE}
+elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
+ mount /dev/disk/by-uuid/will_be_substituted_with_actual_uuid ${FS}
+ mount -o loop ${FS}/nailgun.iso ${SOURCE}
+fi
+
+OPENSTACK_VERSION=`cat ${SOURCE}/openstack_version`
+
+# ----------------------
+# UNPACKING REPOSITORIES
+# ----------------------
+
+wwwdir="/var/www/nailgun"
+repodir="${wwwdir}/${OPENSTACK_VERSION}"
+
+# Copying Centos files
+mkdir -p ${repodir}/centos/x86_64
+cp -r ${SOURCE}/images ${repodir}/centos/x86_64
+cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64
+cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64
+cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64
+cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
+
+# Copying Ubuntu files
+mkdir -p ${repodir}/ubuntu/x86_64/images
+cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
+cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
+
+# We do not ship debian-installer kernel and initrd on ISO.
+# But we still need to be able to create ubuntu cobbler distro
+# which requires kernel and initrd to be available. So, we
+# just touch these files to work around cobbler's limitation.
+touch ${repodir}/ubuntu/x86_64/images/linux
+touch ${repodir}/ubuntu/x86_64/images/initrd.gz
+
+# make links for backward compatibility
+ln -s ${repodir}/centos ${wwwdir}/centos
+ln -s ${repodir}/ubuntu ${wwwdir}/ubuntu
+
+# --------------------------
+# UNPACKING PUPPET MANIFESTS
+# --------------------------
+
+# create folders
+#mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/
+#mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/
+#rm -rf /etc/puppet/modules/
+
+# TODO(ikalnitsky): investigate why we need this
+#cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/
+
+# place modules and manifests
+#tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules
+#cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp
+cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/${OPENSTACK_VERSION}/manifests/
+
+# make links for backward compatibility
+#pushd /etc/puppet
+#ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests
+#ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules
+#popd
+
+cp ${SOURCE}/send2syslog.py /bin/send2syslog.py
+mkdir -p /var/lib/hiera
+touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
+
+# Prepare local repository specification
+rm /etc/yum.repos.d/CentOS*.repo
+cat > /etc/yum.repos.d/nailgun.repo << EOF
+[nailgun]
+name=Nailgun Local Repo
+baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64
+gpgcheck=0
+EOF
+
+# Disable subscription-manager plugins
+sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/product-id.conf || :
+sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf || :
+
+# Disable GSSAPI in ssh server config
+sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config
+
+# Enable MOTD banner in sshd
+sed -i -e "s/^\s*PrintMotd no/PrintMotd yes/g" /etc/ssh/sshd_config
+
+# Add note regarding local repos creation to MOTD
+cat >> /etc/motd << EOF
+
+All environments use online repositories by default.
+Use the following commands to create local repositories
+on master node and change default repository settings:
+
+* CentOS: fuel-package-updates (see --help for options)
+* Ubuntu: fuel-createmirror (see --help for options)
+
+Please refer to the following guide for more information:
+https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror
+
+EOF
+
+# Copying bootstrap_admin_node.sh, chmod it and
+# adding /etc/init/bootstrap_admin_node.conf
+cp ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh
+chmod 0777 /usr/local/sbin/bootstrap_admin_node.sh
+cp ${SOURCE}/bootstrap_admin_node.conf /etc/init/bootstrap_admin_node.conf
+echo "ENABLED=1" > /etc/sysconfig/bootstrap_admin_node
+
+# Copying version.yaml file. It contains COMMIT_SHA of last commit.
+RELEASE=$(awk '/release/{gsub(/"/, "");print $2}' ${SOURCE}/version.yaml)
+mkdir -p /etc/nailgun /etc/fuel/${RELEASE} /etc/fuel/release_versions
+cp ${SOURCE}/version.yaml /etc/nailgun/version.yaml
+cp ${SOURCE}/version.yaml /etc/fuel/${RELEASE}/version.yaml
+ln -s /etc/fuel/${RELEASE}/version.yaml /etc/fuel/version.yaml
+cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat ${SOURCE}/openstack_version`.yaml
+
+# Generete Fuel UUID
+uuidgen > /etc/fuel/fuel-uuid
+
+###Run fuel menu
+[ -z "$showmenu" ] && showmenu="no"
+cat > /root/.showfuelmenu << EOF
+#Set to yes to run Fuel Setup
+#Set to no to accept default settings
+showmenu=$showmenu
+EOF
+
+# Prepare custom /etc/issue logon banner and script for changing IP in it
+cat > /etc/issue << EOF
+#########################################
+# Welcome to the Fuel server #
+#########################################
+Server is running on \m platform
+
+Fuel UI is available on:
+http://:8000
+
+Default administrator login: root
+Default administrator password: r00tme
+
+Default Fuel UI login: admin
+Default Fuel UI password: admin
+
+Please change root password on first login.
+
+EOF
+
+
+cat >> '/etc/rc.local' << EOF
+first=yes
+for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
+if [ "\$first" = "yes" ]; then
+ ipstr="Fuel UI is available on: http://\$ip:8000"
+ first=no
+else
+ ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000")
+fi
+done
+tmpissue=\$(mktemp)
+while read -r line; do
+ if [[ "\$line" =~ "Fuel UI is available on" ]]; then
+ echo -e "\$ipstr" >> \$tmpissue
+ elif [[ "\$line" =~ :8000$ ]]; then
+ :
+ else
+ echo -e "\$line" >> \$tmpissue
+ fi
+done < /etc/issue
+mv "\$tmpissue" /etc/issue
+
+EOF
+
+
+# Unmounting source
+umount -f ${SOURCE}
+rm -rf ${SOURCE}
+
+umount -f ${FS} || true
+rm -rf ${FS}
+
+echo "tos orphan 7" >> /etc/ntp.conf
+
+# Do not show error message on ntpdate failure. Customers should not be confused
+# if admin node does not have access to the internet time servers.
+sed -i /etc/rc.d/init.d/ntpdate -e 's/\([ $RETVAL -eq 0 ] && success || \)failure/\1success/'
+
+# Disabling splash
+sed -i --follow-symlinks -e '/^\skernel/ s/rhgb//' /etc/grub.conf
+sed -i --follow-symlinks -e '/^\skernel/ s/quiet//' /etc/grub.conf
+
+# Disabling console clearing
+sed -i 's/getty/getty --noclear/' /etc/init/tty.conf
+
+# Disabling starting first console from start-ttys service
+sed -i --follow-symlinks -e 's/ACTIVE_CONSOLES=.*/ACTIVE_CONSOLES=\/dev\/tty\[2-6\]/' /etc/sysconfig/init
+
+# Copying default bash settings to the root directory
+cp -f /etc/skel/.bash* /root/
+
+# Blacklist i2c_piix4 module for VirtualBox so it does not create kernel errors
+[[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf
+
+%end \ No newline at end of file
diff --git a/fuel/build/f_isoroot/f_odlpluginbuild/Makefile b/fuel/build/f_isoroot/f_odlpluginbuild/Makefile
new file mode 100644
index 000000000..ce9cd73e1
--- /dev/null
+++ b/fuel/build/f_isoroot/f_odlpluginbuild/Makefile
@@ -0,0 +1,38 @@
+##############################################################################
+# 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)
+DOCKNAME = fuelrepo
+DOCKVERSION = 1.0
+ODL_BRANCH="juno/lithium-sr1"
+ODL_REPO="https://github.com/stackforge/fuel-plugin-opendaylight.git"
+
+.PHONY: all
+all: .odlbuild
+
+.PHONY: clean
+clean:
+ # Deliberately not cleaning nailgun directory to speed up multiple builds
+ @rm -f ../release/opnfv/opendaylight*.rpm
+
+.PHONY: release
+release:.odlbuild
+ @rm -f ../release/opnfv/opendaylight*.rpm
+ @mkdir -p ../release/opnfv
+ @cp opendaylight*.rpm ../release/opnfv/
+
+.odlbuild:
+ rm -rf fuel-plugin-opendaylight
+ sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev
+ sudo gem install fpm
+ sudo pip install fuel-plugin-builder
+ git clone -b ${ODL_BRANCH} ${ODL_REPO}
+ INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-opendaylight/
+ mv fuel-plugin-opendaylight/opendaylight*.rpm .
+ rm -rf fuel-plugin-opendaylight
diff --git a/fuel/build/f_isoroot/f_repobuild/Makefile b/fuel/build/f_isoroot/f_repobuild/Makefile
new file mode 100644
index 000000000..6bfbd35c1
--- /dev/null
+++ b/fuel/build/f_isoroot/f_repobuild/Makefile
@@ -0,0 +1,56 @@
+##############################################################################
+# 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)
+DOCKNAME = fuelrepo
+DOCKVERSION = 1.0
+
+# try to choose close ubuntu mirror which support rsync protocol
+# https://bugs.launchpad.net/fuel/+bug/1459252
+MIRROR_URLS := $(shell curl -s http://mirrors.ubuntu.com/mirrors.txt)
+MIRROR_HOSTS := $(shell for url in ${MIRROR_URLS}; do echo $$url | cut -d'/' -f3; done)
+RSYNC_HOST := $(shell for host in ${MIRROR_HOSTS}; do rsync -4 --contimeout 5 --no-motd --list-only "$${host}::ubuntu/." &> /dev/null && echo $$host && break; done)
+
+.PHONY: all
+all: .nailgun
+
+.nailgun:
+ sudo apt-get update
+ sudo apt-get upgrade -y
+ sudo apt-get install -y rsync python python-yaml dpkg-dev openssl
+ rm -rf tmpiso tmpdir
+ mkdir tmpiso
+ fuseiso ${ISOCACHE} tmpiso
+ cp tmpiso/ubuntu/pool/main/f/fuel-createmirror/fuel-createmirror_6.1*.deb .
+ fusermount -u tmpiso
+ rm -rf tmpiso
+ sudo dpkg -i fuel-createmirror_6.1*.deb
+ sudo sed -i 's/DOCKER_MODE=true/DOCKER_MODE=false/' /etc/fuel-createmirror/common.cfg
+ sudo sed -i 's/DEBUG="no"/DEBUG="yes"/' /etc/fuel-createmirror/ubuntu.cfg
+ sudo sed -i 's/MIRROR_UBUNTU_HOST="archive.ubuntu.com"/MIRROR_UBUNTU_HOST="${RSYNC_HOST}"/' /etc/fuel-createmirror/common.cfg
+ rm -Rf nailgun
+ sudo mkdir -p /var/www
+ sudo su - -c /opt/fuel-createmirror-6.1/fuel-createmirror
+ sudo chmod -R 755 /var/www/nailgun
+ cp -Rp /var/www/nailgun .
+ touch .nailgun
+
+.PHONY: clean
+clean:
+ # Deliberately not cleaning nailgun directory to speed up multiple builds
+ @rm -rf ../release/opnfv/nailgun fuel-createmirror_6.1*.deb
+
+.PHONY: release
+release:.nailgun
+ @rm -Rf ../release/opnfv/nailgun
+ @mkdir -p ../release/opnfv
+ @cp -Rp nailgun ../release/opnfv/nailgun
+
diff --git a/fuel/build/fuel-agent_1.patch b/fuel/build/fuel-agent_1.patch
new file mode 100644
index 000000000..b0808966f
--- /dev/null
+++ b/fuel/build/fuel-agent_1.patch
@@ -0,0 +1,36 @@
+*** build/repos/nailgun/fuel_agent/fuel_agent/manager.py.orig Thu Sep 24 11:08:38 2015
+--- build/repos/nailgun/fuel_agent/fuel_agent/manager.py Thu Sep 24 11:10:25 2015
+***************
+*** 541,546 ****
+--- 541,552 ----
+ fs_options=fs.options,
+ fs_label=fs.label,
+ dev=str(fs.device))
++ if fs.type == 'ext4':
++ LOG.debug('Trying to disable journaling for ext4 '
++ 'in order to speed up the build')
++ utils.execute('tune2fs', '-O', '^has_journal',
++ str(fs.device))
++
+
+ # mounting all images into chroot tree
+ self.mount_target(chroot, treat_mtab=False, pseudo=False)
+***************
+*** 631,636 ****
+--- 637,652 ----
+ self.umount_target(chroot, pseudo=False, try_lazy_umount=False)
+
+ for image in self.driver.image_scheme.images:
++ # find fs with the same loop device object
++ # as image.target_device
++ fs = self.driver.partition_scheme.fs_by_device(
++ image.target_device)
++
++ if fs.type == 'ext4':
++ LOG.debug('Trying to re-enable journaling for ext4')
++ utils.execute('tune2fs', '-O', 'has_journal',
++ str(fs.device))
++
+ LOG.debug('Deattaching loop device from file: %s',
+ image.img_tmp_file)
+ bu.deattach_loop(str(image.target_device))
diff --git a/fuel/build/fuel-main_3.patch b/fuel/build/fuel-main_3.patch
new file mode 100644
index 000000000..8341d72d6
--- /dev/null
+++ b/fuel/build/fuel-main_3.patch
@@ -0,0 +1,19 @@
+*** prepare-build-env.sh.orig Tue Sep 8 08:47:46 2015
+--- prepare-build-env.sh Tue Sep 8 08:48:22 2015
+***************
+*** 41,47 ****
+
+ trusty)
+ GEMPKG="ruby ruby-dev"
+! sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D5A05778
+ echo "deb http://mirror.fuel-infra.org/devops/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/fuel-devops.list
+ sudo apt-get update && sudo apt-get -y install nodejs nodejs-legacy npm
+ ;;
+--- 41,47 ----
+
+ trusty)
+ GEMPKG="ruby ruby-dev"
+! sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 1D2B45A2
+ echo "deb http://mirror.fuel-infra.org/devops/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/fuel-devops.list
+ sudo apt-get update && sudo apt-get -y install nodejs nodejs-legacy npm
+ ;;
diff --git a/fuel/build/fuel-main_5.patch b/fuel/build/fuel-main_5.patch
new file mode 100644
index 000000000..ec75626d0
--- /dev/null
+++ b/fuel/build/fuel-main_5.patch
@@ -0,0 +1,19 @@
+*** prepare-build-env.sh.orig Tue Sep 8 10:29:08 2015
+--- prepare-build-env.sh Tue Sep 8 10:30:21 2015
+***************
+*** 43,49 ****
+ GEMPKG="ruby ruby-dev"
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 1D2B45A2
+ echo "deb http://mirror.fuel-infra.org/devops/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/fuel-devops.list
+! sudo apt-get update && sudo apt-get -y install nodejs nodejs-legacy npm
+ ;;
+
+ precise)
+--- 43,49 ----
+ GEMPKG="ruby ruby-dev"
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 1D2B45A2
+ echo "deb http://mirror.fuel-infra.org/devops/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/fuel-devops.list
+! sudo apt-get update && sudo apt-get -y install nodejs nodejs-legacy npm dosfstools xorriso
+ ;;
+
+ precise)
diff --git a/fuel/build/install/apt-ftparchive-deb.conf b/fuel/build/install/apt-ftparchive-deb.conf
new file mode 100644
index 000000000..0d15aec6f
--- /dev/null
+++ b/fuel/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/fuel/build/install/apt-ftparchive-release.conf b/fuel/build/install/apt-ftparchive-release.conf
new file mode 100644
index 000000000..02706bd7d
--- /dev/null
+++ b/fuel/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/fuel/build/install/apt-ftparchive-udeb.conf b/fuel/build/install/apt-ftparchive-udeb.conf
new file mode 100644
index 000000000..3b5b239a6
--- /dev/null
+++ b/fuel/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/fuel/build/install/install.sh b/fuel/build/install/install.sh
new file mode 100755
index 000000000..f0bb84914
--- /dev/null
+++ b/fuel/build/install/install.sh
@@ -0,0 +1,477 @@
+#!/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 "Making 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 \
+ -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
+}
+
+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 MOS 5.1 iso at $ORIGISO"
+ rm $CONF
+ exit 1
+ fi
+
+ make_iso
+else
+ echo "Unknown mode: $MODE"
+ exit 1
+fi
diff --git a/fuel/build/install/uninstall.sh b/fuel/build/install/uninstall.sh
new file mode 100755
index 000000000..a9e74bc39
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/Makefile b/fuel/build/patch-packages/Makefile
new file mode 100644
index 000000000..339c9e7cf
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/tools/correct_deps b/fuel/build/patch-packages/tools/correct_deps
new file mode 100755
index 000000000..cfb7d538f
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/tools/deb_pack b/fuel/build/patch-packages/tools/deb_pack
new file mode 100755
index 000000000..f5d42dec3
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/tools/deb_unpack b/fuel/build/patch-packages/tools/deb_unpack
new file mode 100755
index 000000000..aaa60b743
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/tools/udeb_pack b/fuel/build/patch-packages/tools/udeb_pack
new file mode 100755
index 000000000..e961a7320
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/tools/udeb_unpack b/fuel/build/patch-packages/tools/udeb_unpack
new file mode 100755
index 000000000..ed9cd21aa
--- /dev/null
+++ b/fuel/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/fuel/build/patch-packages/tr_example/Makefile b/fuel/build/patch-packages/tr_example/Makefile
new file mode 100644
index 000000000..b7cab3590
--- /dev/null
+++ b/fuel/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/fuel/ci/README b/fuel/ci/README
new file mode 100644
index 000000000..aab823bc0
--- /dev/null
+++ b/fuel/ci/README
@@ -0,0 +1,106 @@
+##############################################################################
+# 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 genesis/fuel/ci directory holds all Fuel@OPNFV 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
+
+For more info on usage:
+./build.sh -h
+sudo ./deploy.sh -h
+python deploy.py -h
+
+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]
+
+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
+
+
+
+* EXAMPLES:
+
+- Install Fuel Master and deploy OPNFV Cloud from scratch on Hardware Environment:
+
+ sudo ./deploy.sh -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr
+
+
+- Install Fuel Master and deploy OPNFV Cloud from scratch on Virtual Environment:
+
+ sudo ./deploy.sh -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images
+
+
+- Deploy OPNFV Cloud on an already active Environment where Fuel Master VM is running so no need to install Fuel again:
+
+ sudo ./deploy.sh -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
+
+ => with plugin installation
+ sudo ./deploy.sh -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
+
+ => with cleanup after deployment is finished
+ sudo ./deploy.sh -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -c
+
+ => no healthcheck after deployment is completed
+ sudo ./deploy.sh -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -nh
+
+
+- Install Fuel Master only (and Node VMs when using virtual environment):
+
+ => for virtual environment:
+ sudo ./deploy.sh -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images
+
+ => for hardware environment:
+ sudo ./deploy.sh -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr
+
+
+- Cleanup a running OPNFV environment:
+
+ sudo ./deploy.sh -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 \ No newline at end of file
diff --git a/fuel/ci/build.sh b/fuel/ci/build.sh
new file mode 100755
index 000000000..f8e164a76
--- /dev/null
+++ b/fuel/ci/build.sh
@@ -0,0 +1,473 @@
+#!/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
+##############################################################################
+
+trap 'echo "Exiting ..."; \
+if [ -f ${LOCK_FILE} ]; then \
+ if [ $(cat ${LOCK_FILE}) -eq $$ ]; then \
+ rm -f ${LOCK_FILE}; \
+ fi; \
+fi;' EXIT
+
+############################################################################
+# BEGIN of usage description
+#
+usage ()
+{
+cat << EOF
+$0 Builds the Fuel@OPNFV stack
+
+usage: $0 [-s spec-file] [-c cache-URI] [-l log-file] [-f Flags] build-directory
+
+OPTIONS:
+ -s spec-file ($BUILD_SPEC), define the build-spec file, default ../build/config.mk
+ -c cache base URI ($BUILD_CACHE_URI), specifies the base URI to a build cache to be used/updated - the name is automatically generated from the md5sum of the spec-file, http://, ftp://, file://[absolute path] suported.
+
+ -l log-file ($BUILD_LOG), 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.
+ -t run small build-script unit test.
+ -T run large build-script unit test.
+ -f build flags ($BUILD_FLAGS):
+ o s: Do nothing, succeed
+ o f: Do nothing, fail
+ o t: run build unit tests
+ o i: run interactive (-t flag to docker run)
+ o P: Populate a new local cache and push it to the (-c cache-URI) cache artifactory if -c option is present, currently file://, http:// and ftp:// are supported
+ o d: Detatch - NOT YET SUPPORTED
+
+ build-directory ($BUILD_DIR), specifies the directory for the output artifacts (.iso file).
+
+ -h help, prints this help text
+
+Description:
+build.sh builds opnfv .iso artifact.
+To reduce build time it uses build cache on a local or remote location. The 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, if -c is not provided the cache will stay local.
+2) If the cache is invalidated by one of the following conditions:
+ - The config spec md5sum does not compare to the md5sum for the spec which the cache was built.
+ - The git Commit-Id on the remote repos/HEAD defined in the spec file does not correspont with the Commit-Id for what the cache was built with.
+3) A valid cache does not exist on the specified -c cache-base-URI.
+
+The cache URI object name is fuel_cache-"md5sum(spec file)"
+
+Logging 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)
+ o 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 string xor function
+#
+function xor()
+{
+ local res=(`echo "$1" | sed "s/../0x& /g"`)
+ shift 1
+ while [[ "$1" ]]; do
+ local one=(`echo "$1" | sed "s/../0x& /g"`)
+ local count1=${#res[@]}
+ if [ $count1 -lt ${#one[@]} ]
+ then
+ count1=${#one[@]}
+ fi
+ for (( i = 0; i < $count1; i++ ))
+ do
+ res[$i]=$((${one[$i]:-0} ^ ${res[$i]:-0}))
+ done
+ shift 1
+ done
+ printf "%02x" "${res[@]}"
+}
+#
+# END of string xor function
+############################################################################
+
+############################################################################
+# BEGIN of variables to customize
+#
+BUILD_BASE=$(readlink -e ../build/)
+RESULT_DIR="${BUILD_BASE}/release"
+BUILD_SPEC="${BUILD_BASE}/config.mk"
+CACHE_DIR="cache"
+LOCAL_CACHE_ARCH_NAME="fuel-cache"
+
+REMOTE_ACCESS_METHD=curl
+INCLUDE_DIR=../include
+#
+# END of variables to customize
+############################################################################
+
+############################################################################
+# BEGIN of script assigned variables
+#
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+LOCK_FILE="${SCRIPT_DIR}/.build.lck"
+CACHE_TMP="${SCRIPT_DIR}/tmp"
+TEST_SUCCEED=0
+TEST_FAIL=0
+UNIT_TEST=0
+UPDATE_CACHE=0
+POPULATE_CACHE=0
+RECURSIVE=0
+DETACH=0
+DEBUG=0
+INTEGRATION_TEST=0
+FULL_INTEGRATION_TEST=0
+INTERACTIVE=0
+BUILD_CACHE_URI=
+BUILD_SPEC=
+BUILD_DIR=
+BUILD_LOG=
+BUILD_VERSION=
+MAKE_ARGS=
+FUEL_GIT_SRC="$(make -f ../build/config.mk get-fuel-repo | cut -d " " -f1)"
+FUEL_GIT_BRANCH="$(make -f ../build/config.mk get-fuel-repo | cut -d " " -f2)"
+CACHE_MD5=$(md5sum ../build/cache.mk | cut -f1 -d " ")
+CONFIG_MD5=$(md5sum ../build/config.mk | cut -f1 -d " ")
+FUEL_COMMIT_ID=$(git ls-remote $FUEL_GIT_SRC -t $FUEL_GIT_BRANCH | cut -d $'\t' -f1)
+REMOTE_CACHE_ARCH_HASH_TMP="$(xor $CACHE_MD5 $CONFIG_MD5)"
+REMOTE_CACHE_ARCH_HASH="$(xor $REMOTE_CACHE_ARCH_HASH_TMP $FUEL_COMMIT_ID)"
+REMOTE_CACHE_ARCH_NAME="fuel_cache-$REMOTE_CACHE_ARCH_HASH"
+#
+# END of script assigned variables
+############################################################################
+
+############################################################################
+# BEGIN of include pragmas
+#
+source ${INCLUDE_DIR}/build.sh.debug
+#
+# END of include
+############################################################################
+
+############################################################################
+# BEGIN of main
+#
+while getopts "s:c:v:f:l:r:RtTh" OPTION
+do
+ case $OPTION in
+ h)
+ usage
+ rc=0
+ exit $rc
+ ;;
+
+ s)
+ BUILD_SPEC=${OPTARG}
+ ;;
+
+ c)
+ BUILD_CACHE_URI=${OPTARG}
+ ;;
+
+ l)
+ BUILD_LOG=${OPTARG}
+ ;;
+
+ v)
+ BUILD_VERSION=${OPTARG}
+ ;;
+
+ f)
+ BUILD_FLAGS=${OPTARG}
+ ;;
+
+ r) REMOTE_ACCESS_METHD=${OPTARG}
+ ;;
+
+ R)
+ RECURSIVE=1
+ ;;
+
+ t)
+ INTEGRATION_TEST=1
+ ;;
+
+ T)
+ INTEGRATION_TEST=1
+ FULL_INTEGRATION_TEST=1
+ ;;
+
+ *)
+ echo "${OPTION} is not a valid argument"
+ rc=100
+ exit $rc
+ ;;
+ esac
+done
+
+if [ -z $BUILD_DIR ]; then
+ BUILD_DIR=$(echo $@ | cut -d ' ' -f ${OPTIND})
+fi
+
+for ((i=0; i<${#BUILD_FLAGS};i++)); do
+ case ${BUILD_FLAGS:$i:1} in
+ s)
+ rc=0
+ exit $rc
+ ;;
+
+ f)
+ rc=1
+ exit $rc
+ ;;
+
+ t)
+ UNIT_TEST=1
+ ;;
+
+ i)
+ INTERACTIVE=1
+ ;;
+
+ P)
+ POPULATE_CACHE=1
+ ;;
+
+ d)
+ DETACH=1
+ echo "Detach is not yet supported - exiting ...."
+ rc=100
+ exit $rc
+ ;;
+
+ D)
+ DEBUG=1
+ ;;
+
+ *)
+ echo "${BUILD_FLAGS:$i:1} is not a valid build flag - exiting ...."
+ rc=100
+ exit $rc
+ ;;
+ esac
+done
+
+if [ ${INTEGRATION_TEST} -eq 1 ]; then
+ integration-test
+ rc=0
+ exit $rc
+fi
+
+if [ ! -f ${BUILD_SPEC} ]; then
+ echo "spec file does not exist: $BUILD_SPEC - exiting ...."
+ rc=100
+ exit $rc
+fi
+
+if [ -z ${BUILD_DIR} ]; then
+ echo "Missing build directory - exiting ...."
+ rc=100
+ exit $rc
+fi
+
+if [ ! -z ${BUILD_LOG} ]; then
+ if [[ ${RECURSIVE} -ne 1 ]]; then
+ set +e
+ eval $0 -R $@ > ${BUILD_LOG} 2>&1
+ rc=$?
+ set -e
+ if [ $rc -ne 0]; then
+ exit $rc
+ fi
+ fi
+fi
+
+if [ ${TEST_SUCCEED} -eq 1 ]; then
+ sleep 1
+ rc=0
+ exit $rc
+fi
+
+if [ ${TEST_FAIL} -eq 1 ]; then
+ sleep 1
+ rc=1
+ exit $rc
+fi
+
+if [ -e ${LOCK_FILE} ]; then
+ echo "A build job is already running, exiting....."
+ rc=101
+ exit $rc
+fi
+
+echo $$ > ${LOCK_FILE}
+
+if [ ! -z ${BUILD_CACHE_URI} ]; then
+ if [ ${POPULATE_CACHE} -ne 1 ]; then
+ rm -rf ${CACHE_TMP}/cache
+ mkdir -p ${CACHE_TMP}/cache
+ echo "Downloading cache archive ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME} ..."
+ set +e
+ ${REMOTE_ACCESS_METHD} -o ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME}.tgz
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Remote cache does not exist, or is not accessible - a new cache will be built ..."
+ POPULATE_CACHE=1
+ else
+ echo "Unpacking cache archive ..."
+ set +e
+ tar -C ${CACHE_TMP}/cache -xvf ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "WARNING: The cache seems to be corrupt or has trailing garbage, will try to use brute force"
+ echo "Info about the cache below:"
+ set +e
+ file ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz
+ tar -C ${CACHE_TMP}/cache -tvf ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz
+ set -e
+ echo "Current time is: `date`"
+ set +e
+ pushd ${CACHE_TMP}/cache
+ gunzip -dcq ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz | tar -xvf -
+ rc=$?
+ set -e
+ popd
+ if [ $rc -ne 0 ]; then
+ echo "ERROR: Not able to resolve the cache corruption"
+ POPULATE_CACHE=1
+ else
+ echo "The chache corruption was resolved"
+ cp ${CACHE_TMP}/cache/cache/.versions ${BUILD_BASE}/.
+ set +e
+ make -C ${BUILD_BASE} validate-cache;
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Cache invalid - a new cache will be built "
+ POPULATE_CACHE=1
+ else
+ echo "Cache is up to date and will be used"
+ cp -rf ${CACHE_TMP}/cache/cache/. ${BUILD_BASE}
+ fi
+ fi
+ else
+ echo "Cache archive is intact"
+ cp ${CACHE_TMP}/cache/cache/.versions ${BUILD_BASE}/.
+ set +e
+ make -C ${BUILD_BASE} validate-cache;
+ rc=$?
+ set -e
+
+ if [ $rc -ne 0 ]; then
+ echo "Cache invalid - a new cache will be built "
+ POPULATE_CACHE=1
+ else
+ echo "Cache is up to date and will be used"
+ cp -rf ${CACHE_TMP}/cache/cache/. ${BUILD_BASE}
+ fi
+ fi
+ rm -rf ${CACHE_TMP}/cache
+ fi
+ fi
+fi
+
+if [ ${POPULATE_CACHE} -eq 1 ]; then
+ if [ ${DEBUG} -eq 0 ]; then
+ set +e
+ cd ${BUILD_BASE} && make clean
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build - make clean failed, exiting ..."
+ rc=100
+ exit $rc
+ fi
+ fi
+fi
+
+if [ ! -z ${BUILD_VERSION} ]; then
+ MAKE_ARGS+="REVSTATE=${BUILD_VERSION} "
+fi
+
+if [ ${UNIT_TEST} -eq 1 ]; then
+ MAKE_ARGS+="UNIT_TEST=TRUE "
+else
+ MAKE_ARGS+="UNIT_TEST=FALSE "
+fi
+
+if [ ${INTERACTIVE} -eq 1 ]; then
+ MAKE_ARGS+="INTERACTIVE=TRUE "
+else
+ MAKE_ARGS+="INTERACTIVE=FALSE "
+fi
+
+MAKE_ARGS+=all
+
+if [ ${DEBUG} -eq 0 ]; then
+ set +e
+ cd ${BUILD_BASE} && make ${MAKE_ARGS}
+ rc=$?
+ set -e
+ if [ $rc -gt 0 ]; then
+ echo "Build: make all failed, exiting ..."
+ rc=200
+ exit $rc
+ fi
+else
+ debug_make
+fi
+set +e
+make -C ${BUILD_BASE} prepare-cache
+rc=$?
+set -e
+
+if [ $rc -gt 0 ]; then
+ echo "Build: make prepare-cache failed - exiting ..."
+ rc=100
+ exit $rc
+fi
+echo "Copying built OPNFV .iso file to target directory ${BUILD_DIR} ..."
+rm -rf ${BUILD_DIR}
+mkdir -p ${BUILD_DIR}
+cp ${BUILD_BASE}/.versions ${BUILD_DIR}
+cp ${RESULT_DIR}/*.iso* ${BUILD_DIR}
+
+if [ $POPULATE_CACHE -eq 1 ]; then
+ if [ ! -z ${BUILD_CACHE_URI} ]; then
+ echo "Building cache ..."
+ tar --dereference -C ${BUILD_BASE} -caf ${BUILD_BASE}/${LOCAL_CACHE_ARCH_NAME}.tgz ${CACHE_DIR}
+ set +e
+ tar -C ${CACHE_TMP}/cache -tvf ${BUILD_BASE}/${LOCAL_CACHE_ARCH_NAME}.tgz
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "WARNING the cache archive generated seems to be corrupt, or containing trailing garbage"
+ else
+ echo "The Cache archive build is intact"
+ fi
+ echo "Uploading cache ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME}"
+ ${REMOTE_ACCESS_METHD} -T ${BUILD_BASE}/${LOCAL_CACHE_ARCH_NAME}.tgz ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME}.tgz
+ rm ${BUILD_BASE}/${LOCAL_CACHE_ARCH_NAME}.tgz
+ fi
+fi
+echo "Success!!!"
+exit 0
+#
+# END of main
+############################################################################
diff --git a/fuel/ci/deploy.sh b/fuel/ci/deploy.sh
new file mode 100755
index 000000000..d5b70d0d6
--- /dev/null
+++ b/fuel/ci/deploy.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -o errexit
+topdir=$(dirname $(readlink -f $BASH_SOURCE))
+deploydir=$(cd ${topdir}/../deploy; pwd)
+pushd ${deploydir} > /dev/null
+echo -e "python deploy.py $@\n"
+python deploy.py $@
+popd > /dev/null \ No newline at end of file
diff --git a/fuel/deploy/README b/fuel/deploy/README
new file mode 100644
index 000000000..167078bf8
--- /dev/null
+++ b/fuel/deploy/README
@@ -0,0 +1,186 @@
+
+======== PREREQUISITES ========
+
+the following dependencies and python modules are required to be installed:
+
+- for Ubuntu:
+
+sudo apt-get install -y libvirt-bin qemu-kvm python-pip fuseiso mkisofs
+sudo apt-get install -y python-dev libz-dev libxml2-dev libxslt-dev
+sudo pip install pyyaml netaddr paramiko lxml scp pycrypto ecdsa
+
+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:
+
+ * SR1 configuration files
+
+ => templates/virtual_environment/conf/ha
+ dea.yaml
+ dha.yaml
+
+
+ * ARNO configuration files
+
+ => templates/virtual_environment/old_conf/ha
+ dea.yaml
+ dha.yaml
+
+ => templates/virtual_environment/old_conf/multinode
+ dea.yaml
+ dha.yaml
+
+
+- If you wish to deploy OPNFV cloud environment on hardware
+ use as example the following configuration files:
+
+ * SR1 configuration files
+
+ => templates/hardware_environment/conf/ericsson_montreal_lab/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
+
+
+ * ARNO configuration files
+
+ => templates/hardware_environment/old_conf/ericsson_montreal_lab/ha
+ dea.yaml
+ dha.yaml
+
+ => templates/hardware_environment/old_conf/ericsson_montreal_lab/multinode
+ dea.yaml
+ dha.yaml
+
+ => templates/hardware_environment/old_conf/linux_foundation_lab/ha
+ dea.yaml
+ dha.yaml
+
+ => templates/hardware_environment/old_conf/linux_foundation_lab/multinode
+ 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]
+
+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
+
+
+* 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
+
+
+- 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
+
+
+- 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
+
+ => with plugin installation
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
+
+ => with cleanup after deployment is finished
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -c
+
+ => no healthcheck after deployment is completed
+ sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -nh
+
+
+- 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
+
+ => 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
+
+
+- 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/fuel/deploy/__init__.py b/fuel/deploy/__init__.py
new file mode 100644
index 000000000..fb73157f9
--- /dev/null
+++ b/fuel/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/fuel/deploy/cloud/configure_environment.py b/fuel/deploy/cloud/configure_environment.py
new file mode 100644
index 000000000..2d68c1ba8
--- /dev/null
+++ b/fuel/deploy/cloud/configure_environment.py
@@ -0,0 +1,78 @@
+###############################################################################
+# 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 common
+
+from configure_settings import ConfigureSettings
+from configure_network import ConfigureNetwork
+from configure_nodes import ConfigureNodes
+
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+exec_cmd = common.exec_cmd
+parse = common.parse
+err = common.err
+log = common.log
+delete = common.delete
+create_dir_if_not_exists = common.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_mode = self.dea.get_env_mode()
+ env_net_segment_type = self.dea.get_env_net_segment_type()
+ log('Creating environment %s release %s, mode %s, network-mode neutron'
+ ', net-segment-type %s'
+ % (env_name, self.release_id, env_mode, env_net_segment_type))
+ exec_cmd('fuel env create --name %s --release %s --mode %s '
+ '--network-mode neutron --net-segment-type %s'
+ % (env_name, self.release_id, env_mode, 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/fuel/deploy/cloud/configure_network.py b/fuel/deploy/cloud/configure_network.py
new file mode 100644
index 000000000..00278949d
--- /dev/null
+++ b/fuel/deploy/cloud/configure_network.py
@@ -0,0 +1,74 @@
+###############################################################################
+# 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 common
+import yaml
+import io
+
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+exec_cmd = common.exec_cmd
+parse = common.parse
+err = common.err
+check_file_exists = common.check_file_exists
+log = common.log
+backup = common.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/fuel/deploy/cloud/configure_nodes.py b/fuel/deploy/cloud/configure_nodes.py
new file mode 100644
index 000000000..e76d222c0
--- /dev/null
+++ b/fuel/deploy/cloud/configure_nodes.py
@@ -0,0 +1,114 @@
+###############################################################################
+# 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 common
+import yaml
+import io
+import glob
+
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+exec_cmd = common.exec_cmd
+parse = common.parse
+err = common.err
+check_file_exists = common.check_file_exists
+log = common.log
+backup = common.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')
+ for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ exec_cmd('fuel node set --node-id %s --role %s --env %s'
+ % (node_id, roles_blade[0], self.env_id))
+
+ self.download_deployment_config()
+ for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ self.download_interface_config(node_id)
+ self.modify_node_interface(node_id, roles_blade)
+ self.modify_node_network_schemes(node_id, roles_blade)
+ self.upload_interface_config(node_id)
+ 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)
+ for node_file in glob.glob(deployment_dir + '/*_%s.yaml' % 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 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 net_name in interface_config[interface['name']]:
+ net = {}
+ net['id'] = net_name_id[net_name]
+ net['name'] = net_name
+ interface['assigned_networks'].append(net)
+
+ with io.open(interface_yaml, 'w') as stream:
+ yaml.dump(interfaces, stream, default_flow_style=False)
diff --git a/fuel/deploy/cloud/configure_settings.py b/fuel/deploy/cloud/configure_settings.py
new file mode 100644
index 000000000..fa918fd3d
--- /dev/null
+++ b/fuel/deploy/cloud/configure_settings.py
@@ -0,0 +1,59 @@
+###############################################################################
+# 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 common
+import yaml
+import io
+
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+exec_cmd = common.exec_cmd
+parse = common.parse
+err = common.err
+check_file_exists = common.check_file_exists
+log = common.log
+backup = common.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)
+ backup(settings_yaml)
+
+ settings = self.dea.get_property('settings')
+
+ with io.open(settings_yaml, 'w') as stream:
+ yaml.dump(settings, stream, default_flow_style=False)
diff --git a/fuel/deploy/cloud/deploy.py b/fuel/deploy/cloud/deploy.py
new file mode 100644
index 000000000..705dda59c
--- /dev/null
+++ b/fuel/deploy/cloud/deploy.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
+###############################################################################
+
+
+import os
+import yaml
+import io
+import glob
+
+import common
+from dea import DeploymentEnvironmentAdapter
+from configure_environment import ConfigureEnvironment
+from deployment import Deployment
+
+YAML_CONF_DIR = '/var/lib/opnfv'
+
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+exec_cmd = common.exec_cmd
+parse = common.parse
+err = common.err
+check_file_exists = common.check_file_exists
+log = common.log
+commafy = common.commafy
+ArgParser = common.ArgParser
+
+
+class Deploy(object):
+
+ def __init__(self, dea_file, blade_node_file, no_health_check):
+ self.dea = DeploymentEnvironmentAdapter(dea_file)
+ self.blade_node_file = blade_node_file
+ self.no_health_check = no_health_check
+ self.macs_per_blade = {}
+ self.blades = self.dea.get_node_ids()
+ self.blade_node_dict = {}
+ self.node_roles_dict = {}
+ self.env_id = None
+ self.wanted_release = self.dea.get_property('wanted_release')
+
+ def get_blade_node_mapping(self):
+ with io.open(self.blade_node_file, 'r') as stream:
+ self.blade_node_dict = yaml.load(stream)
+
+ def assign_roles_to_cluster_node_ids(self):
+ self.node_roles_dict = {}
+ for blade, node in self.blade_node_dict.iteritems():
+ roles = commafy(self.dea.get_node_role(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)
+ dep.deploy()
+
+ def deploy(self):
+
+ self.get_blade_node_mapping()
+
+ 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('dea_file', action='store',
+ help='Deployment Environment Adapter: dea.yaml')
+ parser.add_argument('blade_node_file', action='store',
+ help='Blade Node mapping: blade_node.yaml')
+ args = parser.parse_args()
+ check_file_exists(args.dea_file)
+ check_file_exists(args.blade_node_file)
+ return (args.dea_file, args.blade_node_file, args.no_health_check)
+
+
+def main():
+ dea_file, blade_node_file, no_health_check = parse_arguments()
+ deploy = Deploy(dea_file, blade_node_file, no_health_check)
+ deploy.deploy()
+
+if __name__ == '__main__':
+ main()
diff --git a/fuel/deploy/cloud/deployment.py b/fuel/deploy/cloud/deployment.py
new file mode 100644
index 000000000..90f24fd0b
--- /dev/null
+++ b/fuel/deploy/cloud/deployment.py
@@ -0,0 +1,97 @@
+###############################################################################
+# 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 common
+import os
+import shutil
+import glob
+import yaml
+import io
+import time
+
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+exec_cmd = common.exec_cmd
+run_proc = common.run_proc
+parse = common.parse
+err = common.err
+log = common.log
+
+
+class Deployment(object):
+
+ def __init__(self, dea, yaml_config_dir, env_id, node_id_roles_dict,
+ no_health_check):
+ 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
+
+ def run_deploy(self):
+ WAIT_LOOP = 180
+ SLEEP_TIME = 60
+ LOG_FILE = 'cloud.log'
+
+ log('Starting deployment of environment %s' % self.env_id)
+ run_proc('fuel --env %s deploy-changes | strings | tee %s'
+ % (self.env_id, LOG_FILE))
+
+ ready = False
+ for i in range(WAIT_LOOP):
+ env = parse(exec_cmd('fuel env --env %s' % self.env_id))
+ log('Environment status: %s' % env[0][E['status']])
+ r, _ = exec_cmd('tail -2 %s | head -1' % LOG_FILE, False)
+ if r:
+ log(r)
+ if env[0][E['status']] == 'operational':
+ ready = True
+ break
+ elif (env[0][E['status']] == 'error'
+ or env[0][E['status']] == 'stopped'):
+ break
+ else:
+ time.sleep(SLEEP_TIME)
+ exec_cmd('rm %s' % LOG_FILE)
+
+ if ready:
+ log('Environment %s successfully deployed' % self.env_id)
+ else:
+ err('Deployment failed, environment %s is not operational'
+ % self.env_id)
+
+ def verify_node_status(self):
+ node_list = parse(exec_cmd('fuel node list'))
+ 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)
+
+ 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!')
+
+ def deploy(self):
+ self.run_deploy()
+ self.verify_node_status()
+ if not self.no_health_check:
+ self.health_check()
diff --git a/fuel/deploy/common.py b/fuel/deploy/common.py
new file mode 100644
index 000000000..2a8c0d149
--- /dev/null
+++ b/fuel/deploy/common.py
@@ -0,0 +1,153 @@
+###############################################################################
+# 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 subprocess
+import sys
+import os
+import logging
+import argparse
+import shutil
+import stat
+import errno
+
+N = {'id': 0, 'status': 1, 'name': 2, 'cluster': 3, 'ip': 4, 'mac': 5,
+ 'roles': 6, 'pending_roles': 7, 'online': 8}
+E = {'id': 0, 'status': 1, 'name': 2, 'mode': 3, 'release_id': 4,
+ 'changes': 5, 'pending_release_id': 6}
+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)
+out_handler = logging.FileHandler('autodeploy.log', mode='w')
+out_handler.setFormatter(formatter)
+LOG.addHandler(out_handler)
+os.chmod('autodeploy.log', stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
+
+def exec_cmd(cmd, check=True):
+ process = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ shell=True)
+ response = process.communicate()[0].strip()
+ return_code = process.returncode
+ if check:
+ if return_code > 0:
+ err(response)
+ else:
+ 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 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):
+ LOG.error('%s\n' % message)
+ 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.path.isfile(file_path):
+ 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():
+ r = exec_cmd('whoami')
+ if r != 'root':
+ 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/fuel/deploy/dea.py b/fuel/deploy/dea.py
new file mode 100644
index 000000000..5f1a41547
--- /dev/null
+++ b/fuel/deploy/dea.py
@@ -0,0 +1,99 @@
+###############################################################################
+# 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_mode(self):
+ return self.get_property('environment')['mode']
+
+ 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_role(self, node_id):
+ return self.get_node_property(node_id, 'role')
+
+ 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(',')]
diff --git a/fuel/deploy/deploy.py b/fuel/deploy/deploy.py
new file mode 100644
index 000000000..178ae76e2
--- /dev/null
+++ b/fuel/deploy/deploy.py
@@ -0,0 +1,308 @@
+###############################################################################
+# 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 netaddr
+import yaml
+
+from dea import DeploymentEnvironmentAdapter
+from dha import DeploymentHardwareAdapter
+from install_fuel_master import InstallFuelMaster
+from deploy_env import CloudDeploy
+from execution_environment import ExecutionEnvironment
+import common
+
+log = common.log
+exec_cmd = common.exec_cmd
+err = common.err
+warn = common.warn
+check_file_exists = common.check_file_exists
+check_dir_exists = common.check_dir_exists
+create_dir_if_not_exists = common.create_dir_if_not_exists
+delete = common.delete
+check_if_root = common.check_if_root
+ArgParser = common.ArgParser
+
+FUEL_VM = 'fuel'
+PATCH_DIR = 'fuel_patch'
+WORK_DIR = '~/deploy'
+CWD = os.getcwd()
+
+
+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):
+ 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.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 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)
+ fuel.install()
+
+ def patch_iso(self, new_iso):
+ tmp_orig_dir = '%s/origiso' % self.tmp_dir
+ tmp_new_dir = '%s/newiso' % self.tmp_dir
+ self.copy(tmp_orig_dir, tmp_new_dir)
+ self.patch(tmp_new_dir, new_iso)
+
+ 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))
+ with cd(tmp_orig_dir):
+ exec_cmd('find . | cpio -pd %s' % tmp_new_dir)
+ with cd(tmp_new_dir):
+ exec_cmd('fusermount -u %s' % tmp_orig_dir)
+ 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 netmask %s' % isolinux))
+ self.update_fuel_isolinux(isolinux)
+ log('isolinux.cfg after: %s'
+ % exec_cmd('grep netmask %s' % isolinux))
+
+ 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 '
+ '-x "lost+found:" -o %s .'
+ % (iso_linux_bin, new_iso))
+
+ def update_fuel_isolinux(self, file):
+ with io.open(file) as f:
+ data = f.read()
+ for key, val in self.fuel_conf.iteritems():
+ pattern = r'%s=[^ ]\S+' % key
+ replace = '%s=%s' % (key, val)
+ data = re.sub(pattern, replace, data)
+ with io.open(file, 'w') as f:
+ f.write(data)
+
+ def deploy_env(self):
+ dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'],
+ self.fuel_username, self.fuel_password,
+ self.dea_file, WORK_DIR, self.no_health_check)
+ 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.setup_execution_environment()
+ self.create_tmp_dir()
+ self.install_fuel_master()
+ if not self.fuel_only:
+ return self.deploy_env()
+ return True
+
+ 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
+ return True
+
+def check_bridge(pxe_bridge, dha_path):
+ 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='store',
+ default='pxebr',
+ 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')
+
+ args = parser.parse_args()
+ log(args)
+
+ check_file_exists(args.dha_file)
+
+ if not args.cleanup_only:
+ check_file_exists(args.dea_file)
+ check_fuel_plugins_dir(args.fuel_plugins_dir)
+
+ if not args.no_fuel and not args.cleanup_only:
+ log('Using OPNFV ISO file: %s' % args.iso_file)
+ check_file_exists(args.iso_file)
+ log('Using image directory: %s' % args.storage_dir)
+ create_dir_if_not_exists(args.storage_dir)
+ check_bridge(args.pxe_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': args.iso_file, 'dea_file': args.dea_file,
+ 'dha_file': args.dha_file,
+ 'fuel_plugins_dir': args.fuel_plugins_dir}
+ return kwargs
+
+
+def main():
+ kwargs = parse_arguments()
+
+ d = AutoDeploy(**kwargs)
+ sys.exit(d.run())
+
+if __name__ == '__main__':
+ main()
diff --git a/fuel/deploy/deploy_env.py b/fuel/deploy/deploy_env.py
new file mode 100644
index 000000000..be8bed342
--- /dev/null
+++ b/fuel/deploy/deploy_env.py
@@ -0,0 +1,246 @@
+###############################################################################
+# 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
+
+from ssh_client import SSHClient
+import common
+
+exec_cmd = common.exec_cmd
+err = common.err
+check_file_exists = common.check_file_exists
+log = common.log
+parse = common.parse
+commafy = common.commafy
+N = common.N
+E = common.E
+R = common.R
+RO = common.RO
+
+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, work_dir, no_health_check):
+ 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.work_dir = work_dir
+ self.no_health_check = no_health_check
+ self.file_dir = os.path.dirname(os.path.realpath(__file__))
+ self.ssh = SSHClient(self.fuel_ip, self.fuel_username,
+ self.fuel_password)
+ self.blade_node_file = '%s/blade_node.yaml' % self.file_dir
+ 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 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.dea_file, self.work_dir)
+ s.scp_put(self.blade_node_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)
+ 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))
+ blade_node_file = '%s/%s' % (
+ self.work_dir, os.path.basename(self.blade_node_file))
+ with self.ssh as s:
+ status = s.run(
+ 'python %s %s %s %s' % (
+ deploy_app, ('-nh' if self.no_health_check else ''),
+ dea_file, blade_node_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.blade_node_file, 'w') as stream:
+ yaml.dump(self.blade_node_dict, 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' 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] = 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 deploy(self):
+
+ self.set_boot_order_nodes()
+
+ self.check_prerequisites()
+
+ self.get_mac_addresses()
+
+ self.wait_for_discovered_blades()
+
+ self.upload_cloud_deployment_files()
+
+ return self.run_cloud_deploy(CLOUD_DEPLOY_FILE)
diff --git a/fuel/deploy/dha.py b/fuel/deploy/dha.py
new file mode 100644
index 000000000..1feee6039
--- /dev/null
+++ b/fuel/deploy/dha.py
@@ -0,0 +1,34 @@
+###############################################################################
+# 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
+
+
+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)
+
+ return super(DeploymentHardwareAdapter, cls).__new__(cls)
diff --git a/fuel/deploy/dha_adapters/__init__.py b/fuel/deploy/dha_adapters/__init__.py
new file mode 100644
index 000000000..fb73157f9
--- /dev/null
+++ b/fuel/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/fuel/deploy/dha_adapters/hardware_adapter.py b/fuel/deploy/dha_adapters/hardware_adapter.py
new file mode 100644
index 000000000..29e04f182
--- /dev/null
+++ b/fuel/deploy/dha_adapters/hardware_adapter.py
@@ -0,0 +1,59 @@
+###############################################################################
+# 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']
diff --git a/fuel/deploy/dha_adapters/hp_adapter.py b/fuel/deploy/dha_adapters/hp_adapter.py
new file mode 100644
index 000000000..51f55f32b
--- /dev/null
+++ b/fuel/deploy/dha_adapters/hp_adapter.py
@@ -0,0 +1,36 @@
+###############################################################################
+# 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 common
+from ipmi_adapter import IpmiAdapter
+from ssh_client import SSHClient
+
+log = common.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 = 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/fuel/deploy/dha_adapters/ipmi_adapter.py b/fuel/deploy/dha_adapters/ipmi_adapter.py
new file mode 100644
index 000000000..25aa36ec9
--- /dev/null
+++ b/fuel/deploy/dha_adapters/ipmi_adapter.py
@@ -0,0 +1,118 @@
+###############################################################################
+# 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 common
+import time
+from hardware_adapter import HardwareAdapter
+
+log = common.log
+exec_cmd = common.exec_cmd
+err = common.err
+
+
+class IpmiAdapter(HardwareAdapter):
+
+ def __init__(self, yaml_path):
+ super(IpmiAdapter, self).__init__(yaml_path)
+
+ 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')
+ return ip, username, password
+
+ def ipmi_cmd(self, node_id):
+ ip, username, password = self.get_access_info(node_id)
+ cmd = 'ipmitool -I lanplus -A password'
+ cmd += ' -H %s -U %s -P %s' % (ip, username, password)
+ 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):
+ WAIT_LOOP = 200
+ SLEEP_TIME = 3
+ log('Power ON Node %s' % node_id)
+ cmd_prefix = self.ipmi_cmd(node_id)
+ state = exec_cmd('%s chassis power status' % cmd_prefix)
+ if state == 'Chassis Power is off':
+ exec_cmd('%s chassis power on' % cmd_prefix)
+ done = False
+ for i in range(WAIT_LOOP):
+ state, _ = exec_cmd('%s chassis power status' % cmd_prefix,
+ False)
+ if state == 'Chassis Power is on':
+ done = True
+ break
+ else:
+ time.sleep(SLEEP_TIME)
+ if not done:
+ err('Could Not Power ON Node %s' % node_id)
+
+ def node_power_off(self, node_id):
+ WAIT_LOOP = 200
+ SLEEP_TIME = 3
+ log('Power OFF Node %s' % node_id)
+ cmd_prefix = self.ipmi_cmd(node_id)
+ state = exec_cmd('%s chassis power status' % cmd_prefix)
+ if state == 'Chassis Power is on':
+ done = False
+ exec_cmd('%s chassis power off' % cmd_prefix)
+ for i in range(WAIT_LOOP):
+ state, _ = exec_cmd('%s chassis power status' % cmd_prefix,
+ False)
+ if state == 'Chassis Power is off':
+ done = True
+ break
+ else:
+ time.sleep(SLEEP_TIME)
+ if not done:
+ err('Could Not Power OFF Node %s' % node_id)
+
+ def node_reset(self, node_id):
+ WAIT_LOOP = 600
+ log('RESET Node %s' % node_id)
+ cmd_prefix = self.ipmi_cmd(node_id)
+ state = exec_cmd('%s chassis power status' % cmd_prefix)
+ if state == 'Chassis Power is on':
+ was_shut_off = False
+ done = False
+ exec_cmd('%s chassis power reset' % cmd_prefix)
+ for i in range(WAIT_LOOP):
+ state, _ = exec_cmd('%s chassis power status' % cmd_prefix,
+ False)
+ if state == 'Chassis Power is off':
+ was_shut_off = True
+ elif state == 'Chassis Power is on' and was_shut_off:
+ done = True
+ break
+ time.sleep(1)
+ if not done:
+ err('Could Not RESET Node %s' % node_id)
+ else:
+ err('Cannot RESET Node %s because it\'s not Active, state: %s'
+ % (node_id, state))
+
+ 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)
+ elif dev == 'iso':
+ exec_cmd('%s chassis bootdev cdrom' % cmd_prefix)
+ elif dev == 'disk':
+ exec_cmd('%s chassis bootdev disk options=persistent'
+ % cmd_prefix)
diff --git a/fuel/deploy/dha_adapters/libvirt_adapter.py b/fuel/deploy/dha_adapters/libvirt_adapter.py
new file mode 100644
index 000000000..b285c1676
--- /dev/null
+++ b/fuel/deploy/dha_adapters/libvirt_adapter.py
@@ -0,0 +1,136 @@
+###############################################################################
+# 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 common
+from lxml import etree
+from hardware_adapter import HardwareAdapter
+
+log = common.log
+exec_cmd = common.exec_cmd
+err = common.err
+
+DEV = {'pxe': 'network',
+ 'disk': 'hd',
+ 'iso': 'cdrom'}
+
+
+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 = exec_cmd('mktemp -d')
+ 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)
+ exec_cmd('rm -fr %s' % 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('ls -l %s' % disk_file).split()[4]
+ exec_cmd('rm -f %s' % disk_file)
+ exec_cmd('fallocate -l %s %s' % (disk_size, disk_file))
+
+ 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']
diff --git a/fuel/deploy/environments/__init__.py b/fuel/deploy/environments/__init__.py
new file mode 100644
index 000000000..fb73157f9
--- /dev/null
+++ b/fuel/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/fuel/deploy/environments/execution_environment.py b/fuel/deploy/environments/execution_environment.py
new file mode 100644
index 000000000..63be5cd11
--- /dev/null
+++ b/fuel/deploy/environments/execution_environment.py
@@ -0,0 +1,78 @@
+###############################################################################
+# 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 common
+from dha_adapters.libvirt_adapter import LibvirtAdapter
+
+exec_cmd = common.exec_cmd
+err = common.err
+log = common.log
+check_dir_exists = common.check_dir_exists
+check_file_exists = common.check_file_exists
+check_if_root = common.check_if_root
+
+
+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 %s' % vm_name, False)
+ for file in disk_files:
+ exec_cmd('rm -f %s' % file)
+
+ def define_vm(self, vm_name, temp_vm_file, disk_path):
+ 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)
+ 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/fuel/deploy/environments/libvirt_environment.py b/fuel/deploy/environments/libvirt_environment.py
new file mode 100644
index 000000000..785eeca7b
--- /dev/null
+++ b/fuel/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
+
+import common
+from execution_environment import ExecutionEnvironment
+
+exec_cmd = common.exec_cmd
+err = common.err
+log = common.log
+check_dir_exists = common.check_dir_exists
+check_file_exists = common.check_file_exists
+check_if_root = common.check_if_root
+
+
+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):
+ if node_id == self.fuel_node_id:
+ disk_size = disk_sizes['fuel']
+ else:
+ roles = self.dea.get_node_role(node_id)
+ role = 'controller' if 'controller' in roles else 'compute'
+ disk_size = disk_sizes[role]
+ exec_cmd('fallocate -l %s %s' % (disk_size, disk_path))
+
+ def create_vms(self):
+ temp_dir = exec_cmd('mktemp -d')
+ 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))
+ self.define_vm(vm_name, temp_vm_file, disk_path)
+ exec_cmd('rm -fr %s' % 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/fuel/deploy/environments/virtual_fuel.py b/fuel/deploy/environments/virtual_fuel.py
new file mode 100644
index 000000000..cb8be6371
--- /dev/null
+++ b/fuel/deploy/environments/virtual_fuel.py
@@ -0,0 +1,70 @@
+###############################################################################
+# 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 common
+from execution_environment import ExecutionEnvironment
+
+exec_cmd = common.exec_cmd
+log = common.log
+check_file_exists = common.check_file_exists
+check_if_root = common.check_if_root
+
+
+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
+
+ def set_vm_nic(self, temp_vm_file):
+ with open(temp_vm_file) as f:
+ vm_xml = etree.parse(f)
+ interfaces = vm_xml.xpath('/domain/devices/interface')
+ for interface in interfaces:
+ interface.getparent().remove(interface)
+ interface = etree.Element('interface')
+ interface.set('type', 'bridge')
+ source = etree.SubElement(interface, 'source')
+ source.set('bridge', self.pxe_bridge)
+ model = etree.SubElement(interface, 'model')
+ model.set('type', 'virtio')
+ devices = vm_xml.xpath('/domain/devices')
+ if devices:
+ device = devices[0]
+ device.append(interface)
+ with open(temp_vm_file, 'w') as f:
+ vm_xml.write(f, pretty_print=True, xml_declaration=True)
+
+ def create_vm(self):
+ temp_dir = exec_cmd('mktemp -d')
+ vm_name = self.dha.get_node_property(self.fuel_node_id, 'libvirtName')
+ vm_template = '%s/%s' % (self.root_dir,
+ self.dha.get_node_property(
+ self.fuel_node_id, 'libvirtTemplate'))
+ check_file_exists(vm_template)
+ disk_path = '%s/%s.raw' % (self.storage_dir, vm_name)
+ disk_sizes = self.dha.get_disks()
+ disk_size = disk_sizes['fuel']
+ exec_cmd('fallocate -l %s %s' % (disk_size, disk_path))
+ temp_vm_file = '%s/%s' % (temp_dir, vm_name)
+ exec_cmd('cp %s %s' % (vm_template, temp_vm_file))
+ self.set_vm_nic(temp_vm_file)
+ self.define_vm(vm_name, temp_vm_file, disk_path)
+ exec_cmd('rm -fr %s' % temp_dir)
+
+ 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/fuel/deploy/execution_environment.py b/fuel/deploy/execution_environment.py
new file mode 100644
index 000000000..e671463e4
--- /dev/null
+++ b/fuel/deploy/execution_environment.py
@@ -0,0 +1,46 @@
+###############################################################################
+# 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
+
+import common
+from environments.libvirt_environment import LibvirtEnvironment
+from environments.virtual_fuel import VirtualFuel
+
+exec_cmd = common.exec_cmd
+err = common.err
+log = common.log
+check_dir_exists = common.check_dir_exists
+check_file_exists = common.check_file_exists
+check_if_root = common.check_if_root
+ArgParser = common.ArgParser
+
+
+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 == 'ipmi' or type == 'hp':
+ return VirtualFuel(storage_dir, pxe_bridge, dha_path, root_dir)
+
+ return super(ExecutionEnvironment, cls).__new__(cls)
diff --git a/fuel/deploy/fuel_patch/ks.cfg.patch b/fuel/deploy/fuel_patch/ks.cfg.patch
new file mode 100644
index 000000000..189695792
--- /dev/null
+++ b/fuel/deploy/fuel_patch/ks.cfg.patch
@@ -0,0 +1,19 @@
+*** ks.cfg.orig Wed Apr 15 21:47:09 2015
+--- ks.cfg Wed Apr 15 21:47:24 2015
+***************
+*** 35,41 ****
+ default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+ installdrive="undefined"
+! forceformat="no"
+ for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+ set ${drives} ${removable_drives}
+--- 35,41 ----
+ default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+ installdrive="undefined"
+! forceformat="yes"
+ for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+ set ${drives} ${removable_drives}
diff --git a/fuel/deploy/install_fuel_master.py b/fuel/deploy/install_fuel_master.py
new file mode 100644
index 000000000..0e3c1c044
--- /dev/null
+++ b/fuel/deploy/install_fuel_master.py
@@ -0,0 +1,218 @@
+###############################################################################
+# 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 common
+import time
+import os
+import glob
+from ssh_client import SSHClient
+from dha_adapters.libvirt_adapter import LibvirtAdapter
+
+log = common.log
+err = common.err
+clean = common.clean
+delete = common.delete
+
+TRANSPLANT_FUEL_SETTINGS = 'transplant_fuel_settings.py'
+BOOTSTRAP_ADMIN = '/usr/local/sbin/bootstrap_admin_node'
+FUEL_CLIENT_CONFIG = '/etc/fuel/client/config.yaml'
+PLUGINS_DIR = '~/plugins'
+LOCAL_PLUGIN_FOLDER = '/opt/opnfv'
+
+
+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):
+ 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.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)
+
+ 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 settings')
+ self.inject_own_astute_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 complete')
+ self.wait_until_installation_completed()
+
+ log('Waiting for one minute for Fuel to stabilize')
+ time.sleep(60)
+
+ self.delete_deprecated_fuel_client_config_from_fuel_6_1()
+
+ 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)
+ else:
+ s.exec_cmd('cp %s/*.rpm %s' % (LOCAL_PLUGIN_FOLDER,
+ PLUGINS_DIR))
+
+ def install_plugins(self):
+ log('Installing Fuel Plugins')
+ with self.ssh as s:
+ r = s.exec_cmd('find %s -type f -name \'*.rpm\'' % PLUGINS_DIR)
+ for f in r.splitlines():
+ log('Found plugin %s, installing ...' % f)
+ r, e = s.exec_cmd('fuel plugins --install %s' % f, False)
+ if e and 'does not update installed package' not in r:
+ raise Exception('Installation of Fuel Plugin %s '
+ 'failed: %s' % (f, e))
+
+ def wait_for_node_up(self):
+ WAIT_LOOP = 60
+ SLEEP_TIME = 10
+ success = False
+ for i in range(WAIT_LOOP):
+ try:
+ self.ssh.open()
+ success = True
+ break
+ except Exception as e:
+ 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 = 'ps -ef'
+ SEARCH = 'fuelmenu'
+ fuel_menu_pid = None
+ with self.ssh:
+ for i in range(WAIT_LOOP):
+ ret = self.ssh.exec_cmd(CMD)
+ fuel_menu_pid = self.get_fuel_menu_pid(ret, SEARCH)
+ 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 get_fuel_menu_pid(self, printout, search):
+ for line in printout.splitlines():
+ if line.endswith(search):
+ return clean(line)[1]
+
+ 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_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 = 'ps -ef | grep %s | grep -v grep' % 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)
+ log('Remove ISO directory %s' % self.iso_dir)
+ delete(self.iso_dir)
+
+ def delete_deprecated_fuel_client_config_from_fuel_6_1(self):
+ with self.ssh as s:
+ response, error = s.exec_cmd('fuel -v', False)
+ if (error and
+ 'DEPRECATION WARNING' in error and
+ '6.1.0' 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/fuel/deploy/reap.py b/fuel/deploy/reap.py
new file mode 100644
index 000000000..c72b33cf9
--- /dev/null
+++ b/fuel/deploy/reap.py
@@ -0,0 +1,339 @@
+###############################################################################
+# 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 common
+import time
+import os
+import yaml
+import glob
+import shutil
+
+N = common.N
+E = common.E
+R = common.R
+ArgParser = common.ArgParser
+exec_cmd = common.exec_cmd
+parse = common.parse
+err = common.err
+log = common.log
+delete = common.delete
+commafy = common.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
+# - 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': '30G',
+ 'controller': '30G',
+ 'compute': '30G'}
+
+
+class Reap(object):
+
+ def __init__(self, dea_file, dha_file, comment):
+ self.dea_file = dea_file
+ self.dha_file = dha_file
+ self.comment = comment
+ 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) > 1:
+ err('Not exactly one environment')
+ 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 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_%s.yaml'
+ % (self.temp_dir, self.env_id,
+ main_role, 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)
+ 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']],
+ 'mode': self.env[E['mode']],
+ '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']:
+ del fuel['ADMIN_NETWORK'][key]
+ 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 = exec_cmd('mktemp -d')
+ 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()
+ self.download_config('deployment')
+ self.download_config('settings')
+ self.download_config('network')
+
+ 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)
+ 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()
+ self.finale()
+
+
+def usage():
+ print '''
+ Usage:
+ python reap.py <dea_file> <dha_file> <comment>
+ '''
+
+
+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')
+ args = parser.parse_args()
+ return (args.dea_file, args.dha_file, args.comment)
+
+
+def main():
+ dea_file, dha_file, comment = parse_arguments()
+
+ r = Reap(dea_file, dha_file, comment)
+ r.reap()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/fuel/deploy/ssh_client.py b/fuel/deploy/ssh_client.py
new file mode 100644
index 000000000..0f6b8c7ea
--- /dev/null
+++ b/fuel/deploy/ssh_client.py
@@ -0,0 +1,97 @@
+###############################################################################
+# 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 paramiko
+import common
+import scp
+
+TIMEOUT = 600
+log = common.log
+err = common.err
+
+
+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()
+ err(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()) 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()) as _scp:
+ _scp.put(local, remote, dir)
+ except Exception as e:
+ err(e)
diff --git a/fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dea.yaml b/fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dea.yaml
new file mode 100644
index 000000000..23b2809ae
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dea.yaml
@@ -0,0 +1,844 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version:
+created:
+comment: Config for Ericsson Montreal Lab - HA deployment with Ceph and Opendaylight
+environment:
+ name: opnfv
+ mode: ha
+ net_segment_type: gre
+wanted_release: Juno on Ubuntu 14.04.1
+nodes:
+- id: 1
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 2
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 3
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 4
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 5
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 6
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+fuel:
+ ADMIN_NETWORK:
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ dhcp_pool_start: 10.20.0.3
+ dhcp_pool_end: 10.20.0.254
+ DNS_UPSTREAM: 10.118.32.193
+ DNS_DOMAIN: opnfvericsson.ca
+ DNS_SEARCH: opnfvericsson.ca
+ FUEL_ACCESS:
+ user: admin
+ password: admin
+ HOSTNAME: opnfv
+ NTP1: 10.118.34.219
+ NTP2:
+ NTP3:
+interfaces_1:
+ eth0:
+ - fuelweb_admin
+ eth2:
+ - public
+ - management
+ - storage
+ - private
+transformations_1:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-ex
+ - action: add-br
+ name: br-floating
+ provider: ovs
+ - action: add-patch
+ bridges:
+ - br-floating
+ - br-ex
+ mtu: 65000
+ provider: ovs
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth2.320
+ - action: add-port
+ bridge: br-storage
+ name: eth2.220
+ - action: add-port
+ bridge: br-mesh
+ name: eth2.20
+ - action: add-port
+ bridge: br-ex
+ name: eth0
+transformations_2:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth2.320
+ - action: add-port
+ bridge: br-storage
+ name: eth2.220
+ - action: add-port
+ bridge: br-mesh
+ name: eth2.20
+network:
+ management_vip: 192.168.0.2
+ management_vrouter_vip: 192.168.0.3
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 10.118.32.193
+ floating_ranges:
+ - - 10.118.34.226
+ - 10.118.34.230
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ net_l23_provider: ovs
+ segmentation_type: gre
+ vlan_range:
+ - 2022
+ - 2023
+ networks:
+ - cidr: 10.118.34.192/24
+ gateway: 10.118.34.193
+ ip_ranges:
+ - - 10.118.34.220
+ - 10.118.34.225
+ 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.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.2
+ - 192.168.2.254
+ meta:
+ assign_vip: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: private
+ render_type: cidr
+ seg_type: gre
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 20
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.254
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: 101
+ name: management
+ vlan_start: 320
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 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: 220
+ - cidr: 10.20.0.0/16
+ 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
+ public_vip: 10.118.34.220
+ public_vrouter_vip: 10.118.34.221
+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:
+ label: 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$)(?![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$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ 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
+ type: checkbox
+ value: false
+ weight: 40
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: textarea
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ 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.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ libvirt_type:
+ 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: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ puppet_debug:
+ description: Debug puppet logging mode provides more information, but requires
+ more disk space.
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ use_vcenter:
+ type: hidden
+ value: false
+ weight: 30
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ regex:
+ error: Invalid IP address list
+ source: ^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})*$
+ type: text
+ value: 10.118.32.193
+ weight: 10
+ metadata:
+ label: Host OS DNS Servers
+ weight: 90
+ 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:
+ label: External MongoDB
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.mongo.value == false
+ weight: 20
+ 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
+ external_ntp:
+ metadata:
+ label: Host OS NTP Servers
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP server list
+ regex:
+ error: Invalid NTP server list
+ source: ^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$
+ type: text
+ value: 10.118.34.219
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90
+ nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ murano_settings:
+ metadata:
+ label: Murano Settings
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.murano.value == false
+ weight: 20
+ murano_repo_url:
+ description: ''
+ label: Murano Repository URL
+ type: text
+ value: http://storage.apps.openstack.org/
+ weight: 10
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to support
+ networking over Mellanox NIC. Mellanox Neutron plugin will not be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ opendaylight:
+ metadata:
+ enabled: true
+ label: OpenDaylight plugin
+ plugin_id: 1
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ toggleable: true
+ weight: 70
+ 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
+ use_vxlan:
+ description: Configure neutron to use VXLAN tunneling
+ label: Use vxlan
+ restrictions:
+ - action: disable
+ condition: networking_parameters:segmentation_type == 'vlan'
+ message: Neutron with GRE segmentation required
+ type: checkbox
+ value: true
+ weight: 20
+ vni_range_end:
+ description: VXLAN VNI IDs range end
+ label: VNI range end
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10000'
+ weight: 31
+ vni_range_start:
+ description: VXLAN VNI IDs range start
+ label: VNI range start
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10'
+ weight: 30
+ provision:
+ metadata:
+ label: Provision
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: image
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: (DEPRECATED) Classic (use anaconda or debian-installer)
+ 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: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ repo_setup:
+ metadata:
+ always_editable: true
+ 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.
+
+ For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
+
+ '
+ extra_priority: null
+ type: custom_repo_configuration
+ value:
+ - name: ubuntu
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-updates
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-security
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: mos
+ priority: 1050
+ section: main restricted
+ suite: mos6.1
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/x86_64
+ - name: mos-updates
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-updates
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-security
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-security
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-holdback
+ priority: 1100
+ section: main restricted
+ suite: mos6.1-holdback
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: Auxiliary
+ priority: 1150
+ section: main restricted
+ suite: auxiliary
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/auxiliary
+ 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
+ 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:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.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
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ workloads_collector:
+ enabled:
+ type: hidden
+ value: true
+ metadata:
+ label: Workloads Collector User
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ password:
+ type: password
+ value: pBkLbu1k
+ tenant:
+ type: text
+ value: services
+ user:
+ type: text
+ value: fuel_stats_user
diff --git a/fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dha.yaml b/fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dha.yaml
new file mode 100644
index 000000000..ca446f680
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/dha.yaml
@@ -0,0 +1,54 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version:
+created:
+comment: Config for Ericsson Montreal Lab
+
+# Adapter to use for this definition
+adapter: hp
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 14:58:D0:54:7A:D8
+ ipmiIp: 10.118.32.198
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 2
+ pxeMac: 14:58:D0:55:E2:E0
+ ipmiIp: 10.118.32.202
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 3
+ pxeMac: 9C:B6:54:8A:25:C0
+ ipmiIp: 10.118.32.213
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 4
+ pxeMac: 14:58:D0:54:28:80
+ ipmiIp: 10.118.32.201
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 5
+ pxeMac: 14:58:D0:54:E7:88
+ ipmiIp: 10.118.32.203
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 6
+ pxeMac: 14:58:D0:54:7A:28
+ ipmiIp: 10.118.32.205
+ ipmiUser: <username>
+ ipmiPass: <password>
+# Adding the Fuel node as node id 7 which may not be correct - please
+# adjust as needed.
+- id: 7
+ libvirtName: fuel-opnfv
+ libvirtTemplate: templates/hardware_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+disks:
+ fuel: 50G \ No newline at end of file
diff --git a/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dea.yaml b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dea.yaml
new file mode 100644
index 000000000..db29fe977
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dea.yaml
@@ -0,0 +1,841 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version:
+created:
+comment: Config for LF POD1 - HA deployment with Ceph and Opendaylight
+environment:
+ name: opnfv
+ mode: ha
+ net_segment_type: gre
+wanted_release: Juno on Ubuntu 14.04.1
+nodes:
+- id: 1
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 2
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 3
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 4
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 5
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+fuel:
+ ADMIN_NETWORK:
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ dhcp_pool_start: 10.20.0.3
+ dhcp_pool_end: 10.20.0.254
+ DNS_UPSTREAM: 8.8.8.8
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ FUEL_ACCESS:
+ user: admin
+ password: admin
+ HOSTNAME: opnfv
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+interfaces_1:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+transformations_1:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-ex
+ - action: add-br
+ name: br-floating
+ provider: ovs
+ - action: add-patch
+ bridges:
+ - br-floating
+ - br-ex
+ mtu: 65000
+ provider: ovs
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth1.300
+ - action: add-port
+ bridge: br-storage
+ name: eth1.301
+ - action: add-port
+ bridge: br-mesh
+ name: eth1.302
+ - action: add-port
+ bridge: br-ex
+ name: eth0
+transformations_2:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth1.300
+ - action: add-port
+ bridge: br-storage
+ name: eth1.301
+ - action: add-port
+ bridge: br-mesh
+ name: eth1.302
+network:
+ management_vip: 192.168.0.2
+ management_vrouter_vip: 192.168.0.3
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ floating_ranges:
+ - - 172.30.9.160
+ - 172.30.9.254
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ net_l23_provider: ovs
+ segmentation_type: gre
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 172.30.9.0/24
+ gateway: 172.30.9.1
+ ip_ranges:
+ - - 172.30.9.64
+ - 172.30.9.159
+ 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.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.2
+ - 192.168.2.254
+ meta:
+ assign_vip: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: private
+ render_type: cidr
+ seg_type: gre
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 302
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: 101
+ name: management
+ vlan_start: 300
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 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: 301
+ - cidr: 10.20.0.0/16
+ 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
+ public_vip: 172.30.9.64
+ public_vrouter_vip: 172.30.9.65
+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:
+ label: 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$)(?![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$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ 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
+ type: checkbox
+ value: false
+ weight: 40
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: textarea
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ 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.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ libvirt_type:
+ 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: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ puppet_debug:
+ description: Debug puppet logging mode provides more information, but requires
+ more disk space.
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ use_vcenter:
+ type: hidden
+ value: false
+ weight: 30
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ regex:
+ error: Invalid IP address list
+ source: ^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})*$
+ type: text
+ value: 8.8.4.4, 8.8.8.8
+ weight: 10
+ metadata:
+ label: Host OS DNS Servers
+ weight: 90
+ 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:
+ label: External MongoDB
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.mongo.value == false
+ weight: 20
+ 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
+ external_ntp:
+ metadata:
+ label: Host OS NTP Servers
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP server list
+ regex:
+ error: Invalid NTP server list
+ source: ^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90
+ nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ murano_settings:
+ metadata:
+ label: Murano Settings
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.murano.value == false
+ weight: 20
+ murano_repo_url:
+ description: ''
+ label: Murano Repository URL
+ type: text
+ value: http://storage.apps.openstack.org/
+ weight: 10
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to support
+ networking over Mellanox NIC. Mellanox Neutron plugin will not be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ opendaylight:
+ metadata:
+ enabled: true
+ label: OpenDaylight plugin
+ plugin_id: 1
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ toggleable: true
+ weight: 70
+ 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
+ use_vxlan:
+ description: Configure neutron to use VXLAN tunneling
+ label: Use vxlan
+ restrictions:
+ - action: disable
+ condition: networking_parameters:segmentation_type == 'vlan'
+ message: Neutron with GRE segmentation required
+ type: checkbox
+ value: true
+ weight: 20
+ vni_range_end:
+ description: VXLAN VNI IDs range end
+ label: VNI range end
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10000'
+ weight: 31
+ vni_range_start:
+ description: VXLAN VNI IDs range start
+ label: VNI range start
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10'
+ weight: 30
+ provision:
+ metadata:
+ label: Provision
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: image
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: (DEPRECATED) Classic (use anaconda or debian-installer)
+ 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: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ repo_setup:
+ metadata:
+ always_editable: true
+ 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.
+
+ For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
+
+ '
+ extra_priority: null
+ type: custom_repo_configuration
+ value:
+ - name: ubuntu
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-updates
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-security
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: mos
+ priority: 1050
+ section: main restricted
+ suite: mos6.1
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/x86_64
+ - name: mos-updates
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-updates
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-security
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-security
+ type: deb
+ uri: hhttp://10.20.0.2:8080/mos-ubuntu
+ - name: mos-holdback
+ priority: 1100
+ section: main restricted
+ suite: mos6.1-holdback
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: Auxiliary
+ priority: 1150
+ section: main restricted
+ suite: auxiliary
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/auxiliary
+ 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
+ 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:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.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
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ workloads_collector:
+ enabled:
+ type: hidden
+ value: true
+ metadata:
+ label: Workloads Collector User
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ password:
+ type: password
+ value: pBkLbu1k
+ tenant:
+ type: text
+ value: services
+ user:
+ type: text
+ value: fuel_stats_user
diff --git a/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dha.yaml b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dha.yaml
new file mode 100644
index 000000000..724d6d833
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod1/dha.yaml
@@ -0,0 +1,49 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version:
+created:
+comment: Config for LF POD1
+
+# Adapter to use for this definition
+adapter: ipmi
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 00:25:b5:b0:00:ef
+ ipmiIp: 172.30.8.69
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 2
+ pxeMac: 00:25:b5:b0:00:cf
+ ipmiIp: 172.30.8.78
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 3
+ pxeMac: 00:25:b5:b0:00:8f
+ ipmiIp: 172.30.8.68
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 4
+ pxeMac: 00:25:b5:b0:00:6f
+ ipmiIp: 172.30.8.77
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 5
+ pxeMac: 00:25:b5:b0:00:4f
+ ipmiIp: 172.30.8.67
+ ipmiUser: admin
+ ipmiPass: octopus
+# Adding the Fuel node as node id 6 which may not be correct - please
+# adjust as needed.
+- id: 6
+ libvirtName: fuel-opnfv
+ libvirtTemplate: templates/hardware_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+disks:
+ fuel: 50G \ No newline at end of file
diff --git a/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml
new file mode 100644
index 000000000..81cbcbf5f
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml
@@ -0,0 +1,841 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version:
+created:
+comment: Config for LF POD2 - HA deployment with Ceph and Opendaylight
+environment:
+ name: opnfv
+ mode: ha
+ net_segment_type: gre
+wanted_release: Juno on Ubuntu 14.04.1
+nodes:
+- id: 1
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 2
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 3
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 4
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 5
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+fuel:
+ ADMIN_NETWORK:
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ dhcp_pool_start: 10.20.0.3
+ dhcp_pool_end: 10.20.0.254
+ DNS_UPSTREAM: 8.8.8.8
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ FUEL_ACCESS:
+ user: admin
+ password: admin
+ HOSTNAME: opnfv
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+interfaces_1:
+ eth0:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ eth2:
+ - public
+transformations_1:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-ex
+ - action: add-br
+ name: br-floating
+ provider: ovs
+ - action: add-patch
+ bridges:
+ - br-floating
+ - br-ex
+ mtu: 65000
+ provider: ovs
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth0.300
+ - action: add-port
+ bridge: br-storage
+ name: eth0.301
+ - action: add-port
+ bridge: br-mesh
+ name: eth0.302
+ - action: add-port
+ bridge: br-ex
+ name: eth2
+transformations_2:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth0.300
+ - action: add-port
+ bridge: br-storage
+ name: eth0.301
+ - action: add-port
+ bridge: br-mesh
+ name: eth0.302
+network:
+ management_vip: 192.168.1.2
+ management_vrouter_vip: 192.168.1.3
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ floating_ranges:
+ - - 172.30.10.160
+ - 172.30.10.254
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ net_l23_provider: ovs
+ segmentation_type: gre
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 172.30.10.0/24
+ gateway: 172.30.10.1
+ ip_ranges:
+ - - 172.30.10.64
+ - 172.30.10.159
+ 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.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.2
+ - 192.168.2.254
+ meta:
+ cidr: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: private
+ render_type: cidr
+ seg_type: gre
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 302
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 192.168.1.254
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: 101
+ name: management
+ vlan_start: 300
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.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: 301
+ - cidr: 10.20.0.0/16
+ 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
+ public_vip: 172.30.10.64
+ public_vrouter_vip: 172.30.10.65
+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:
+ label: 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$)(?![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$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ 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
+ type: checkbox
+ value: false
+ weight: 40
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: textarea
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ 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.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ libvirt_type:
+ 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: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ puppet_debug:
+ description: Debug puppet logging mode provides more information, but requires
+ more disk space.
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ use_vcenter:
+ type: hidden
+ value: false
+ weight: 30
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ regex:
+ error: Invalid IP address list
+ source: ^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})*$
+ type: text
+ value: 8.8.4.4, 8.8.8.8
+ weight: 10
+ metadata:
+ label: Host OS DNS Servers
+ weight: 90
+ 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:
+ label: External MongoDB
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.mongo.value == false
+ weight: 20
+ 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
+ external_ntp:
+ metadata:
+ label: Host OS NTP Servers
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP server list
+ regex:
+ error: Invalid NTP server list
+ source: ^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90
+ nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ murano_settings:
+ metadata:
+ label: Murano Settings
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.murano.value == false
+ weight: 20
+ murano_repo_url:
+ description: ''
+ label: Murano Repository URL
+ type: text
+ value: http://storage.apps.openstack.org/
+ weight: 10
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to support
+ networking over Mellanox NIC. Mellanox Neutron plugin will not be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ opendaylight:
+ metadata:
+ enabled: true
+ label: OpenDaylight plugin
+ plugin_id: 1
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ toggleable: true
+ weight: 70
+ 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
+ use_vxlan:
+ description: Configure neutron to use VXLAN tunneling
+ label: Use vxlan
+ restrictions:
+ - action: disable
+ condition: networking_parameters:segmentation_type == 'vlan'
+ message: Neutron with GRE segmentation required
+ type: checkbox
+ value: true
+ weight: 20
+ vni_range_end:
+ description: VXLAN VNI IDs range end
+ label: VNI range end
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10000'
+ weight: 31
+ vni_range_start:
+ description: VXLAN VNI IDs range start
+ label: VNI range start
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10'
+ weight: 30
+ provision:
+ metadata:
+ label: Provision
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: image
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: (DEPRECATED) Classic (use anaconda or debian-installer)
+ 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: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ repo_setup:
+ metadata:
+ always_editable: true
+ 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.
+
+ For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
+
+ '
+ extra_priority: null
+ type: custom_repo_configuration
+ value:
+ - name: ubuntu
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-updates
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-security
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: mos
+ priority: 1050
+ section: main restricted
+ suite: mos6.1
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/x86_64
+ - name: mos-updates
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-updates
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-security
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-security
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-holdback
+ priority: 1100
+ section: main restricted
+ suite: mos6.1-holdback
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: Auxiliary
+ priority: 1150
+ section: main restricted
+ suite: auxiliary
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/auxiliary
+ 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
+ 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:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.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
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ workloads_collector:
+ enabled:
+ type: hidden
+ value: true
+ metadata:
+ label: Workloads Collector User
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ password:
+ type: password
+ value: pBkLbu1k
+ tenant:
+ type: text
+ value: services
+ user:
+ type: text
+ value: fuel_stats_user
diff --git a/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dha.yaml b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dha.yaml
new file mode 100644
index 000000000..cfc97094c
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dha.yaml
@@ -0,0 +1,49 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version:
+created:
+comment: Config for LF POD2 and Opendaylight
+
+# Adapter to use for this definition
+adapter: ipmi
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 00:25:b5:a0:00:2a
+ ipmiIp: 172.30.8.75
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 2
+ pxeMac: 00:25:b5:a0:00:3a
+ ipmiIp: 172.30.8.65
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 3
+ pxeMac: 00:25:b5:a0:00:4a
+ ipmiIp: 172.30.8.74
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 4
+ pxeMac: 00:25:b5:a0:00:5a
+ ipmiIp: 172.30.8.73
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 5
+ pxeMac: 00:25:b5:a0:00:6a
+ ipmiIp: 172.30.8.72
+ ipmiUser: admin
+ ipmiPass: octopus
+# Adding the Fuel node as node id 6 which may not be correct - please
+# adjust as needed.
+- id: 6
+ libvirtName: fuel-opnfv
+ libvirtTemplate: templates/hardware_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+disks:
+ fuel: 50G \ No newline at end of file
diff --git a/fuel/deploy/templates/hardware_environment/conf/opnfv_box/dea.yaml b/fuel/deploy/templates/hardware_environment/conf/opnfv_box/dea.yaml
new file mode 100644
index 000000000..0895e4f1d
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/opnfv_box/dea.yaml
@@ -0,0 +1,842 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version:
+created:
+comment: Config for OPNFV BOX - HA deployment with Ceph
+environment:
+ name: opnfv_virt
+ mode: ha
+ net_segment_type: gre
+wanted_release: Juno on Ubuntu 14.04.1
+nodes:
+- id: 1
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 2
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 3
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 4
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 5
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+opnfv:
+ hosts:
+ - name:
+ address:
+ fqdn:
+fuel:
+ ADMIN_NETWORK:
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ dhcp_pool_start: 10.20.0.3
+ dhcp_pool_end: 10.20.0.254
+ DNS_UPSTREAM: 8.8.8.8
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ FUEL_ACCESS:
+ user: admin
+ password: admin
+ HOSTNAME: opnfv
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+interfaces_1:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+transformations_1:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-ex
+ - action: add-br
+ name: br-floating
+ provider: ovs
+ - action: add-patch
+ bridges:
+ - br-floating
+ - br-ex
+ mtu: 65000
+ provider: ovs
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth1.300
+ - action: add-port
+ bridge: br-storage
+ name: eth1.301
+ - action: add-port
+ bridge: br-mesh
+ name: eth1.302
+ - action: add-port
+ bridge: br-ex
+ name: eth0
+transformations_2:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth1.300
+ - action: add-port
+ bridge: br-storage
+ name: eth1.301
+ - action: add-port
+ bridge: br-mesh
+ name: eth1.302
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ floating_ranges:
+ - - 172.30.10.83
+ - 172.30.10.92
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ net_l23_provider: ovs
+ segmentation_type: gre
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 172.30.10.0/24
+ gateway: 172.30.10.1
+ ip_ranges:
+ - - 172.30.10.73
+ - 172.30.10.82
+ meta:
+ cidr: 172.30.10.0/24
+ configurable: true
+ floating_range_var: floating_ranges
+ ip_range:
+ - 172.30.10.73
+ - 172.30.10.82
+ 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.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.254
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: 300
+ name: management
+ vlan_start: 300
+ - 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: 301
+ name: storage
+ vlan_start: 301
+ - cidr: 192.168.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.1
+ - 192.168.2.254
+ meta:
+ assign_vip: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: private
+ render_type: cidr
+ seg_type: gre
+ use_gateway: false
+ vlan_start: 302
+ name: private
+ vlan_start: 302
+ - cidr: 10.20.0.0/24
+ gateway: 10.20.0.2
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.255.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:
+ access:
+ email:
+ description: Email address for Administrator
+ label: Email
+ regex:
+ error: Invalid email
+ source: ^\S+@\S+$
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: 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$)(?![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$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ 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
+ type: checkbox
+ value: false
+ weight: 40
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: textarea
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ 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.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ libvirt_type:
+ 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: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ puppet_debug:
+ description: Debug puppet logging mode provides more information, but requires
+ more disk space.
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ use_vcenter:
+ type: hidden
+ value: false
+ weight: 30
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ regex:
+ error: Invalid IP address list
+ source: ^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})*$
+ type: text
+ value: 8.8.4.4, 8.8.8.8
+ weight: 10
+ metadata:
+ label: Host OS DNS Servers
+ weight: 90
+ 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:
+ label: External MongoDB
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.mongo.value == false
+ weight: 20
+ 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
+ external_ntp:
+ metadata:
+ label: Host OS NTP Servers
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP server list
+ regex:
+ error: Invalid NTP server list
+ source: ^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90
+ nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ murano_settings:
+ metadata:
+ label: Murano Settings
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.murano.value == false
+ weight: 20
+ murano_repo_url:
+ description: ''
+ label: Murano Repository URL
+ type: text
+ value: http://storage.apps.openstack.org/
+ weight: 10
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to support
+ networking over Mellanox NIC. Mellanox Neutron plugin will not be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ opendaylight:
+ metadata:
+ enabled: true
+ label: OpenDaylight plugin
+ plugin_id: 1
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ toggleable: true
+ weight: 70
+ 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
+ use_vxlan:
+ description: Configure neutron to use VXLAN tunneling
+ label: Use vxlan
+ restrictions:
+ - action: disable
+ condition: networking_parameters:segmentation_type == 'vlan'
+ message: Neutron with GRE segmentation required
+ type: checkbox
+ value: true
+ weight: 20
+ vni_range_end:
+ description: VXLAN VNI IDs range end
+ label: VNI range end
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10000'
+ weight: 31
+ vni_range_start:
+ description: VXLAN VNI IDs range start
+ label: VNI range start
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10'
+ weight: 30
+ provision:
+ metadata:
+ label: Provision
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: image
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: (DEPRECATED) Classic (use anaconda or debian-installer)
+ 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: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ repo_setup:
+ metadata:
+ always_editable: true
+ 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.
+
+ For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
+
+ '
+ extra_priority: null
+ type: custom_repo_configuration
+ value:
+ - name: ubuntu
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-updates
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-security
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: mos
+ priority: 1050
+ section: main restricted
+ suite: mos6.1
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/x86_64
+ - name: mos-updates
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-updates
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-security
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-security
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-holdback
+ priority: 1100
+ section: main restricted
+ suite: mos6.1-holdback
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: Auxiliary
+ priority: 1150
+ section: main restricted
+ suite: auxiliary
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/auxiliary
+ 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
+ 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:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.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
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ workloads_collector:
+ enabled:
+ type: hidden
+ value: true
+ metadata:
+ label: Workloads Collector User
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ password:
+ type: password
+ value: pBkLbu1k
+ tenant:
+ type: text
+ value: services
+ user:
+ type: text
+ value: fuel_stats_user
diff --git a/fuel/deploy/templates/hardware_environment/conf/opnfv_box/dha.yaml b/fuel/deploy/templates/hardware_environment/conf/opnfv_box/dha.yaml
new file mode 100644
index 000000000..c2624f2ba
--- /dev/null
+++ b/fuel/deploy/templates/hardware_environment/conf/opnfv_box/dha.yaml
@@ -0,0 +1,49 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version:
+created:
+comment: Config for OPNFV BOX
+
+# Adapter to use for this definition
+adapter: ipmi
+
+# Node list.
+# Mandatory property is id, all other properties are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: b8:ae:ed:76:4d:a4
+ ipmiIp: <ipmi_ip>
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 2
+ pxeMac: b8:ae:ed:76:4d:94
+ ipmiIp: <ipmi_ip>
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 3
+ pxeMac: b8:ae:ed:76:4c:eb
+ ipmiIp: <ipmi_ip>
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 4
+ pxeMac: b8:ae:ed:76:37:62
+ ipmiIp: <ipmi_ip>
+ ipmiUser: <username>
+ ipmiPass: <password>
+- id: 5
+ pxeMac: b8:ae:ed:76:4d:95
+ ipmiIp: <ipmi_ip>
+ ipmiUser: <username>
+ ipmiPass: <password>
+# Adding the Fuel node as node id 6 which may not be correct - please
+# adjust as needed.
+- id: 6
+ libvirtName: fuel-opnfv
+ libvirtTemplate: templates/hardware_environment/vms/fuel.xml
+ isFuel: yes
+ username: root
+ password: r00tme
+
+disks:
+ fuel: 50G \ No newline at end of file
diff --git a/fuel/deploy/templates/hardware_environment/vms/fuel.xml b/fuel/deploy/templates/hardware_environment/vms/fuel.xml
new file mode 100644
index 000000000..e3e3f80bb
--- /dev/null
+++ b/fuel/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='raw'/>
+ <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='sv'>
+ <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> \ No newline at end of file
diff --git a/fuel/deploy/templates/virtual_environment/conf/dea.yaml b/fuel/deploy/templates/virtual_environment/conf/dea.yaml
new file mode 100644
index 000000000..bc9a1f931
--- /dev/null
+++ b/fuel/deploy/templates/virtual_environment/conf/dea.yaml
@@ -0,0 +1,838 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version:
+created:
+comment: Config for Virtual Environment - HA deployment with Ceph and Opendaylight
+environment:
+ name: opnfv_virt
+ mode: ha
+ net_segment_type: gre
+wanted_release: Juno on Ubuntu 14.04.1
+nodes:
+- id: 1
+ interfaces: interfaces_1
+ transformations: transformations_1
+ role: ceph-osd,controller
+- id: 2
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 3
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+- id: 4
+ interfaces: interfaces_1
+ transformations: transformations_2
+ role: ceph-osd,compute
+fuel:
+ ADMIN_NETWORK:
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ dhcp_pool_start: 10.20.0.3
+ dhcp_pool_end: 10.20.0.254
+ DNS_UPSTREAM: 10.118.32.193
+ DNS_DOMAIN: opnfvericsson.ca
+ DNS_SEARCH: opnfvericsson.ca
+ FUEL_ACCESS:
+ user: admin
+ password: admin
+ HOSTNAME: opnfv_virt
+ NTP1: 10.118.34.219
+ NTP2:
+ NTP3:
+interfaces_1:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+transformations_1:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-ex
+ - action: add-br
+ name: br-floating
+ provider: ovs
+ - action: add-patch
+ bridges:
+ - br-floating
+ - br-ex
+ mtu: 65000
+ provider: ovs
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth0.101
+ - action: add-port
+ bridge: br-storage
+ name: eth1.102
+ - action: add-port
+ bridge: br-mesh
+ name: eth2.103
+ - action: add-port
+ bridge: br-ex
+ name: eth3
+transformations_2:
+ transformations:
+ - action: add-br
+ name: br-fw-admin
+ - action: add-br
+ name: br-mgmt
+ - action: add-br
+ name: br-storage
+ - action: add-br
+ name: br-mesh
+ - action: add-port
+ bridge: br-fw-admin
+ name: eth0
+ - action: add-port
+ bridge: br-mgmt
+ name: eth0.101
+ - action: add-port
+ bridge: br-storage
+ name: eth1.102
+ - action: add-port
+ bridge: br-mesh
+ name: eth2.103
+network:
+ management_vip: 192.168.0.2
+ management_vrouter_vip: 192.168.0.3
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 10.118.32.193
+ 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
+ net_l23_provider: ovs
+ segmentation_type: gre
+ vlan_range:
+ - 1000
+ - 1030
+ 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.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vips:
+ - haproxy
+ - vrouter
+ vlan_start: 101
+ name: management
+ vlan_start: 101
+ - 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.2.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.2.2
+ - 192.168.2.254
+ meta:
+ cidr: 192.168.2.0/24
+ configurable: true
+ map_priority: 2
+ name: private
+ notation: cidr
+ render_addr_mask: private
+ render_type: cidr
+ seg_type: gre
+ use_gateway: false
+ vlan_start: 103
+ name: private
+ vlan_start: 103
+ - cidr: 10.20.0.0/16
+ 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
+ public_vip: 172.16.0.2
+ public_vrouter_vip: 172.16.0.3
+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:
+ label: 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$)(?![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$)(?![Gg]uest$)(?!.*
+ +.*$).+
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ 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
+ type: checkbox
+ value: false
+ weight: 40
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: textarea
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ 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.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: qemu
+ 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: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ puppet_debug:
+ description: Debug puppet logging mode provides more information, but requires
+ more disk space.
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ use_vcenter:
+ type: hidden
+ value: false
+ weight: 30
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ regex:
+ error: Invalid IP address list
+ source: ^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})*$
+ type: text
+ value: 10.118.32.193
+ weight: 10
+ metadata:
+ label: Host OS DNS Servers
+ weight: 90
+ 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:
+ label: External MongoDB
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.mongo.value == false
+ weight: 20
+ 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
+ external_ntp:
+ metadata:
+ label: Host OS NTP Servers
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP server list
+ regex:
+ error: Invalid NTP server list
+ source: ^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$
+ type: text
+ value: 10.118.34.219
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90
+ nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ murano_settings:
+ metadata:
+ label: Murano Settings
+ restrictions:
+ - action: hide
+ condition: settings:additional_components.murano.value == false
+ weight: 20
+ murano_repo_url:
+ description: ''
+ label: Murano Repository URL
+ type: text
+ value: http://storage.apps.openstack.org/
+ weight: 10
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to support
+ networking over Mellanox NIC. Mellanox Neutron plugin will not be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ opendaylight:
+ metadata:
+ enabled: true
+ label: OpenDaylight plugin
+ plugin_id: 1
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by OpenDaylight
+ toggleable: true
+ weight: 70
+ 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
+ use_vxlan:
+ description: Configure neutron to use VXLAN tunneling
+ label: Use vxlan
+ restrictions:
+ - action: disable
+ condition: networking_parameters:segmentation_type == 'vlan'
+ message: Neutron with GRE segmentation required
+ type: checkbox
+ value: true
+ weight: 20
+ vni_range_end:
+ description: VXLAN VNI IDs range end
+ label: VNI range end
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10000'
+ weight: 31
+ vni_range_start:
+ description: VXLAN VNI IDs range start
+ label: VNI range start
+ regex:
+ error: Invalid ID number
+ source: ^\d+$
+ restrictions:
+ - action: hide
+ condition: networking_parameters:segmentation_type == 'vlan'
+ type: text
+ value: '10'
+ weight: 30
+ provision:
+ metadata:
+ label: Provision
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: image
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: (DEPRECATED) Classic (use anaconda or debian-installer)
+ 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: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ repo_setup:
+ metadata:
+ always_editable: true
+ 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.
+
+ For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
+
+ '
+ extra_priority: null
+ type: custom_repo_configuration
+ value:
+ - name: ubuntu
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-updates
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: ubuntu-security
+ priority: null
+ section: main
+ suite: trusty
+ type: deb
+ uri: http://10.20.0.2:8080/ubuntu-part
+ - name: mos
+ priority: 1050
+ section: main restricted
+ suite: mos6.1
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/x86_64
+ - name: mos-updates
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-updates
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-security
+ priority: 1050
+ section: main restricted
+ suite: mos6.1-security
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: mos-holdback
+ priority: 1100
+ section: main restricted
+ suite: mos6.1-holdback
+ type: deb
+ uri: http://10.20.0.2:8080/mos-ubuntu
+ - name: Auxiliary
+ priority: 1150
+ section: main restricted
+ suite: auxiliary
+ type: deb
+ uri: http://10.20.0.2:8080/2014.2.2-6.1/ubuntu/auxiliary
+ 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
+ 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:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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_ceph:
+ description: Configures Cinder to store volumes in Ceph RBD images.
+ label: Ceph RBD for volumes (Cinder)
+ restrictions:
+ - settings:storage.volumes_lvm.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
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ workloads_collector:
+ enabled:
+ type: hidden
+ value: true
+ metadata:
+ label: Workloads Collector User
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 10
+ password:
+ type: password
+ value: pBkLbu1k
+ tenant:
+ type: text
+ value: services
+ user:
+ type: text
+ value: fuel_stats_user
diff --git a/fuel/deploy/templates/virtual_environment/conf/dha.yaml b/fuel/deploy/templates/virtual_environment/conf/dha.yaml
new file mode 100644
index 000000000..6d476b874
--- /dev/null
+++ b/fuel/deploy/templates/virtual_environment/conf/dha.yaml
@@ -0,0 +1,38 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version:
+created:
+comment: Config for Virtual Environment
+
+# 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: 50G
+ controller: 50G
+ compute: 50G
diff --git a/fuel/deploy/templates/virtual_environment/networks/fuel1.xml b/fuel/deploy/templates/virtual_environment/networks/fuel1.xml
new file mode 100644
index 000000000..7b2b15423
--- /dev/null
+++ b/fuel/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/fuel/deploy/templates/virtual_environment/networks/fuel2.xml b/fuel/deploy/templates/virtual_environment/networks/fuel2.xml
new file mode 100644
index 000000000..615c92094
--- /dev/null
+++ b/fuel/deploy/templates/virtual_environment/networks/fuel2.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel2</name>
+ <bridge name='fuel2' stp='on' delay='0'/>
+</network>
+
diff --git a/fuel/deploy/templates/virtual_environment/networks/fuel3.xml b/fuel/deploy/templates/virtual_environment/networks/fuel3.xml
new file mode 100644
index 000000000..2383e6c1f
--- /dev/null
+++ b/fuel/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/fuel/deploy/templates/virtual_environment/networks/fuel4.xml b/fuel/deploy/templates/virtual_environment/networks/fuel4.xml
new file mode 100644
index 000000000..5b69f912d
--- /dev/null
+++ b/fuel/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/fuel/deploy/templates/virtual_environment/vms/compute.xml b/fuel/deploy/templates/virtual_environment/vms/compute.xml
new file mode 100644
index 000000000..fbef4bda7
--- /dev/null
+++ b/fuel/deploy/templates/virtual_environment/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-1.0'>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='raw'/>
+ <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='virtio'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='virtio'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='virtio'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <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' keymap='sv'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/fuel/deploy/templates/virtual_environment/vms/controller.xml b/fuel/deploy/templates/virtual_environment/vms/controller.xml
new file mode 100644
index 000000000..3ff28218d
--- /dev/null
+++ b/fuel/deploy/templates/virtual_environment/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-1.0'>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='raw'/>
+ <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='virtio'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel2'/>
+ <model type='virtio'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel3'/>
+ <model type='virtio'/>
+ </interface>
+ <interface type='network'>
+ <source network='fuel4'/>
+ <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' keymap='sv'/>
+ <sound model='ich6'>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ </video>
+ <memballoon model='virtio'>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/fuel/deploy/templates/virtual_environment/vms/fuel.xml b/fuel/deploy/templates/virtual_environment/vms/fuel.xml
new file mode 100644
index 000000000..1a3286001
--- /dev/null
+++ b/fuel/deploy/templates/virtual_environment/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-1.0'>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='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='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='sv'>
+ <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/fuel/deploy/transplant_fuel_settings.py b/fuel/deploy/transplant_fuel_settings.py
new file mode 100644
index 000000000..d2aece87a
--- /dev/null
+++ b/fuel/deploy/transplant_fuel_settings.py
@@ -0,0 +1,61 @@
+###############################################################################
+# 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 common
+import io
+import yaml
+from dea import DeploymentEnvironmentAdapter
+
+check_file_exists = common.check_file_exists
+
+ASTUTE_YAML = '/etc/fuel/astute.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 transplant(dea, astute):
+ fuel_conf = dea.get_fuel_config()
+ for key in fuel_conf.iterkeys():
+ if key == 'ADMIN_NETWORK':
+ for skey in fuel_conf[key].iterkeys():
+ astute[key][skey] = fuel_conf[key][skey]
+ else:
+ astute[key] = fuel_conf[key]
+ return astute
+
+
+def main():
+ dea_file = parse_arguments()
+ check_file_exists(ASTUTE_YAML)
+ dea = DeploymentEnvironmentAdapter(dea_file)
+ with io.open(ASTUTE_YAML) as stream:
+ astute = yaml.load(stream)
+ transplant(dea, astute)
+ with io.open(ASTUTE_YAML, 'w') as stream:
+ yaml.dump(astute, stream, default_flow_style=False)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/fuel/docs/.DS_Store b/fuel/docs/.DS_Store
new file mode 100644
index 000000000..9a874b576
--- /dev/null
+++ b/fuel/docs/.DS_Store
Binary files differ
diff --git a/fuel/docs/src/build-instructions.rst b/fuel/docs/src/build-instructions.rst
new file mode 100644
index 000000000..790bcf513
--- /dev/null
+++ b/fuel/docs/src/build-instructions.rst
@@ -0,0 +1,182 @@
+============================================================================
+OPNFV Build instructions for - Fuel deployment tool - OPNFV Arno SR1 release
+============================================================================
+
+.. contents:: Table of Contents
+ :backlinks: none
+
+Abstract
+========
+
+This document describes how to build the Fuel deployment tool for the Arno SR1 release of OPNFV, the build system, dependencies and required system resources.
+
+License
+=======
+Arno SR1 release of OPNFV when using Fuel as a deployment tool DOCs (c) by Jonas Bjurel (Ericsson AB)
+
+Arno SR1 release of OPNFV when using Fuel as a deployment tool DOCs (c) are licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+
+
+Version history
+===============
+
++--------------------+--------------------+--------------------+----------------------+
+| **Date** | **Ver.** | **Author** | **Comment** |
+| | | | |
++--------------------+--------------------+--------------------+----------------------+
+| 2015-06-03 | 1.0.0 | Jonas Bjurel | Instructions for |
+| | | (Ericsson AB) | the Arno release |
++--------------------+--------------------+--------------------+----------------------+
+| 2015-09-24 | 1.1.0 | Jonas Bjurel | Instructions for |
+| | | (Ericsson AB) | the Arno SR1 release |
++--------------------+--------------------+--------------------+----------------------+
+
+Introduction
+============
+
+This document describes the build system used to build the Fuel deployment tool for the Arno SR1 release of OPNFV, required dependencies and minimum requirements on the host to be used for the buildsystem.
+
+The Fuel build system is desigened 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
+-----------------------------
+
+- An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
+
+- ~30 GB available disc
+
+- 4 GB RAM
+
+Minimum Software Requirements
+-----------------------------
+
+The build host should run Ubuntu 14.04 operating system.
+
+On the host, the following packages must be installed:
+
+- docker - see https://docs.docker.com/installation/ubuntulinux/ for installation notes for Ubuntu 14.04. Note: only use the Ubuntu stock distro of Docker (docker.io)
+
+- 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:
+
+<usermod -a -G docker [userid]>
+
+Also make sure to define relevant DNS servers part of the global dns chain in
+in your </etc/default/docker> configuration file, eg.
+
+<DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4">
+
+Then restart docker:
+
+<sudo service docker.io 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 linuxfoundation 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
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Now it is time to clone the code repository:
+
+<git clone ssh://'Linux foundation user'@gerrit.opnfv.org:29418/genesis>
+
+Now you should have the OPNFV genesis repository with the Fuel directories stored locally on your build host.
+
+Check out the Arno SR1 release:
+<cd genesis>
+<git checkout arno.2015.2.0>
+
+Building
+========
+
+There are two methods available for building Fuel:
+
+- A low level method using Make
+
+- An abstracted method using build.sh
+
+Configure your build environment
+-------------------------------------
+
+** Configuring the build environment should not be performed if building standard Arno release **
+
+Select the versions of the components you want to build by editing the fuel/build/config.mk file.
+
+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:
+
+ - If not already existing, initialize the docker build environment
+
+ - If not already done, build OpenDaylight from upstream (as defined by fuel-build config-spec)
+
+ - If not already done, build fuel from upstream (as defined by fuel-build/config-spec)
+
+ - 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.
+
+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 buildtime 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
+==========
+-
+
+:Authors: Jonas Bjurel (Ericsson)
+:Version: 1.1.0
+
+**Documentation tracking**
+
+Revision: _sha1_
+
+Build date: _date_
diff --git a/fuel/docs/src/installation-instructions.rst b/fuel/docs/src/installation-instructions.rst
new file mode 100644
index 000000000..aedbb53d5
--- /dev/null
+++ b/fuel/docs/src/installation-instructions.rst
@@ -0,0 +1,497 @@
+==================================================================================================
+OPNFV Installation instructions for the Arno release of OPNFV when using Fuel as a deployment tool
+==================================================================================================
+
+.. contents:: Table of Contents
+ :backlinks: none
+
+
+Abstract
+========
+
+This document describes how to install the Arno SR1 release of OPNFV when using Fuel as a deployment tool covering it's limitations, dependencies and required system resources.
+
+License
+=======
+Arno SR1 release of OPNFV when using Fuel as a deployment tool Docs (c) by Jonas Bjurel (Ericsson AB)
+
+Arno SR1 release of OPNFV when using Fuel as a deployment tool Docs are licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+Version history
+===============
+
++--------------------+--------------------+--------------------+--------------------+
+| **Date** | **Ver.** | **Author** | **Comment** |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+| 2015-06-03 | 1.0.0 | Jonas Bjurel | Installation |
+| | | (Ericsson AB) | instructions for |
+| | | | the Arno release |
+| | | | |
+| 2015-09-27 | 1.1.0 | Daniel Smith | ARNO SR1-RC1 |
+| | | (Ericsson AB) | update |
+| | | | |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+
+
+Introduction
+============
+
+This document describes providing guidelines on how to install and configure the Arno SR1 release of OPNFV when using Fuel as a deployment tool including required software and hardware configurations.
+
+Although the available installation options gives 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 Arno SR1 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 Arno SR1 release of OPNFV when 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 .iso image of the Arno SR1 release of OPNFV when using Fuel as a deployment tool can be found at http://artifacts.opnfv.org/arno.2015.2.0/fuel/arno.2015.2.0.fuel.iso
+
+
+Building the ISO image
+----------------------
+
+
+Alternatively, you may build the .iso from source by cloning the opnfv/genesis git repository. To retrieve the repository for the Arno release use the following command:
+
+- git clone https://<linux foundation uid>@gerrit.opnf.org/gerrit/genesis
+
+Check-out the Arno SR1 release tag to set the branch to the baseline required to replicate the Arno SR1 release:
+
+- cd genesis; git checkout stable/arno2015.2.0
+
+Go to the fuel directory and build the .iso:
+
+- cd fuel/build; make all
+
+For more information on how to build, please see "OPNFV Build instructions for - Arno SR1 release of OPNFV when using Fuel as a deployment tool which you retrieved with the repository at </genesis/fuel/docs/src/build-instructions.rst>
+
+Next, familiarize yourself with the Fuel 6.1 version by reading the following documents:
+
+- Fuel planning guide <https://docs.mirantis.com/openstack/fuel/fuel-6.1/planning-guide.html>
+
+- Fuel user guide <http://docs.mirantis.com/openstack/fuel/fuel-6.1/user-guide.html#user-guide>
+
+- Fuel operations guide <http://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#operations-guide>
+
+- Fuel Plugin Developers Guide <https://wiki.openstack.org/wiki/Fuel/Plugins>
+
+A number of deployment specific parameters must be collected, those are:
+
+1. Provider sub-net and gateway information
+
+2. Provider VLAN information
+
+3. Provider DNS addresses
+
+4. Provider NTP addresses
+
+5. Network Topology you plan to Deploy (VLAN, GRE(VXLAN), FLAT)
+
+6. Linux Distro you intend to deploy.
+
+7. How many nodes and what roles you want to deploy (Controllers, Storage, Computes)
+
+8. Monitoring Options you want to deploy (Ceilometer, MongoDB).
+
+9. 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 Arno SR1 using Fuel:
+
++--------------------+------------------------------------------------------+
+| **HW Aspect** | **Requirement** |
+| | |
++--------------------+------------------------------------------------------+
+| **# of nodes** | Minimum 6 (3 for non redundant deployment): |
+| | |
+| | - 1 Fuel deployment master (may be virtualized) |
+| | |
+| | - 3(1) Controllers |
+| | |
+| | - 1 Compute |
+| | |
+| | - 1 Ceilometer (VM option) |
++--------------------+------------------------------------------------------+
+| **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 run on single NIC - or spread out |
+| | over other nics as your hardware supports |
++--------------------+------------------------------------------------------+
+
+Help with Hardware Requirements
+===============================
+
+
+Calculate hardware requirements:
+
+You can use the Fuel Hardware Calculator <https://www.mirantis.com/openstack-services/bom-calculator/> to calculate the hardware required for your OpenStack environment.
+
+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 bound connectivity); 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 and comprises a redundant 10GE switch pair for each of the three physically separated networks.
+
+The physical TOR switches are **not** automatically configured from the 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 Arno SR1 hardware platform should be carried out according to the Pharos specification TODO-<insert link to Pharos ARNO SR1 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
+-------------------
+1. Mount the Arno SR1 ISO file as a boot device to the jump host server.
+
+2. Reboot the jump host to establish the Fuel server.
+
+ - The system now boots from the ISO image.
+
+ - Select 'DVD Fuel Install (Static IP)'
+
+ - Press [Enter].
+
+3. Wait until screen Fuel setup is shown (Note: This can take up to 30 minutes).
+
+4. 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.
+
+ - Configure eth1 or other network interfaces here as well (if you have them present on your FUEL server).
+
+5. Select PXE Setup and 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 of Fuel node)
+
+ - Hostname <OPNFV Region name>-fuel
+
+ - Domain <Domain Name>
+
+ - Search Domain <Search Domain Name>
+
+ - Hostname to test DNS <Hostname to test DNS>
+
+6. Select Time Sync and 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>
+
+7. Start the installation.
+
+ - Select Quit Setup and press Save and Quit.
+
+ - Installation starts, wait until a screen with logon credentials is shown.
+
+
+Boot the Node Servers
+---------------------
+
+After the Fuel Master node has rebooted from the above step 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.
+
+8. 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.
+
+9. Reboot all the control and compute blades.
+
+10. Wait for the availability of nodes showing up in the Fuel GUI.
+
+ - Wait until all nodes are displayed in top right corner of the Fuel GUI: <total number of server> TOTAL NODES and <total number of servers> UNALLOCATED NODES.
+
+
+
+Install ODL Plugin on FUEL node
+-------------------------------
+
+11. SSH to your FUEL node (e.g. root@10.20.0.2 pwd: r00tme)
+
+12. Verify the plugin exists at /opt/opnfv/opendaylight-0.6-0.6.1-1.noarch.rpm
+
+13. Install the plugin with the command
+
+ - "fuel plugins --install /opt/opnfv/opendaylight-0.6-0.6.1-1.noarch.rpm"
+
+ - Expected output: "Plugin opendaylight-0.6-0.6.1-1.noarch.rpm was successfully installed."
+
+
+Create an OPNFV Environment
+---------------------------
+
+14. Connect to Fuel WEB UI with a browser towards port http://<ip of fuel server>:8000 (login admin/admin)
+
+15. Create and name a new OpenStack environment, to be installed.
+
+16. Select <Juno on Ubuntu> or <Juno on CentOS> as per your which in the "OpenStack Release" field and press "Next"
+
+17. Select compute virtulization method.
+
+ - Select KVM as hypervisor (or one of your choosing) and press "Next"
+
+18. Select network mode.
+
+ - Select Neutron with GRE segmentation and press "Next"
+
+ Note: this is the supportted method when using the ODL installation, other options will not work with the plugin and this Instruction Set.
+
+19. Select Storage Back-ends.
+
+ - Select "Yes, use Ceph" if you intend to deploy Ceph Backends and press "Next"
+
+
+20. Select additional services you wish to install.
+
+ - Check option <Install Celiometer (OpenStack Telemetry)> and press "Next"
+ Note: If you use Ceilometer and you only have 5 nodes, you may have to run in a 3/1/1 (controller/ceilo-mongo/compute) configuration. Suggest adding more compute nodes
+
+21. Create the new environment.
+
+ - Click "Create" Button
+
+Configure the OPNFV environment
+-------------------------------
+
+22. Enable PXE booting (if you haven't done this already)
+
+ - 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.
+
+23. Wait for the availability of nodes showing up in the Fuel GUI.
+
+ - Wait until all nodes are displayed in top right corner of the Fuel GUI: <total number of server> TOTAL NODES and <total number of servers> UNALLOCATED NODES.
+
+24. Open the environment you previously created.
+
+25. Open the networks tab.
+
+26. Update the Public network configuration.
+
+ Change the following fields to appropriate values:
+
+ - IP Range Start to <Public IP Address start>
+
+ - IP Range End to <Public IP Address end>
+
+ - CIDR to <CIDR for Public IP Addresses>
+
+ - Check VLAN tagging.
+
+ - Set appropriate VLAN id.
+
+ - Gateway to <Gateway for Public IP Addresses>
+
+ - Set floating ip ranges
+
+
+27. Update the Storage Network Configuration
+
+ - Set CIDR to appropriate value (default 192.168.1.0/24)
+
+ - Set vlan to appropriate value (default 102)
+
+28. Update the Management network configuration.
+
+ - Set CIDR to appropriate value (default 192.168.0.0/24)
+
+ - Check VLAN tagging.
+
+ - Set appropriate VLAN id. (default 101)
+
+29. Update the Private Network Information
+
+ - Set CIDR to appropriate value (default 192.168.2.0/24
+
+ - Check and set VLAN tag appropriately (default 103)
+
+30. Update the Neutron L3 configuration.
+
+ - Set Internal network CIDR to an appropriate value
+
+ - Set Internal network gateway to an appropriate value
+
+ - Set Guest OS DNS Server values appropriately
+
+31. Save Settings.
+
+32. Click on the "Nodes" Tab in the FUEL WEB UI.
+
+33. Assign roles.
+
+ - Click on "+Add Nodes" button
+
+ - Check "Controller" and the "Storage-Ceph OSD" in the Assign Roles Section
+
+ - Check the 3 Nodes you want to act as Controllers from the bottom half of the screen
+
+ - Click <Apply Changes>.
+
+ - Click on "+Add Nodes" button
+
+ - Check "Compute" in the Assign Roles Section
+
+ - Check the Nodes that you want to act as Computes from the bottom half of the screen
+
+ - Click <Apply Changes>.
+
+
+34. Configure interfaces.
+
+ - Check Select <All> to select all nodes with Control, Telemetry, MongoDB and Compute node roles.
+
+ - Click <Configure Interfaces>
+
+ - Screen Configure interfaces on number of <number of nodes> nodes is shown.
+
+ - Assign interfaces (bonded) for mgmt-, admin-, private-, public- and storage networks
+
+ - Note: Set MTU level to at least MTU=2090 (recommended MTU=2140 for SDN over VXLAN Usage) for each network
+
+ - Click Apply
+
+Enable ODL
+----------
+
+35. In the FUEL UI of your Enviornment, click the "Settings" Tab
+
+ - Enable OpenStack debug logging (in the Common Section) - optional
+
+ - Check the OpenDaylight Lithium Plugin Section
+
+ - Check to enable VXLAN
+
+ - Modify VNI and Port Range if desired
+
+ - Click "Save Settings" at the bottom to Save.
+
+
+OPTIONAL - Set Local Mirror Repos
+---------------------------------
+
+The following steps can 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.
+
+36. In the Fuel UI of your Environment, click the Settings Tab and scroll to the Repositories Section.
+
+ - Replace the URI values for the "Name" values outlined below:
+
+ - "ubuntu" URI="deb http://<ip-of-fuel-server>:8080/ubuntu-part trusty main"
+ - "ubuntu-security" URI="deb http://<ip-of-fuel-server>:8080/ubuntu-part trusty main"
+ - "ubuntu-updates" URI="deb http://<ip-of-fuel-server>:8080/ubuntu-part trusty main"
+ - "mos-updates" URI="deb http://<ip-of-fuel-server>:8080/mos-ubuntu mos6.1-updates main restricted"
+ - "mos-security" URI="deb http://<ip-of-fuel-server>:8080/mos-ubuntu mos6.1-security main restricted"
+ - "mos-holdback" URI="deb http://<ip-of-fuel-server>:8080/mos-ubuntu mos6.1-holdback main restricted"
+
+ - Click "Save Settings" at the bottom to Save your changes
+
+Verify Networks
+---------------
+
+Its is important that Verify Networks be done as it will ensure that you can not only communicate on the networks you have setup, but can fetch the packages needed for a succesful
+deployment.
+
+37. From the FUEL UI in your Environment, Select the Networks Tab
+
+ - At the bottom of the page, Select "Verify Networks"
+
+ - Continue to fix your topology (physical switch, etc) until the "Verification Succeeded - Your network is configured correctly" message is shown
+
+Deploy Your Environment
+-----------------------
+
+38. Deploy the environment.
+ In the Fuel GUI, click Deploy Changes.
+
+ - Wait until your Environment is deployed and the Horizon URI to connect is displayed in the FUEL GUI for your Environment
+
+Installation health-check
+=========================
+
+39. Perform system health-check
+
+ - Click the "Health Check" tab inside your Environment in the FUEL Web UI
+
+ - Check "Select All" and Click "Run Tests"
+
+ Note: Live-Migraition test will fail (Bug in ODL currently), you can skip this test in the list if you choose to not see the error message, simply uncheck it in the list
+
+ - Allow tests to run and investigate results where appropriate
+
+40. Verify that the OpenDaylight GUI is accessible
+
+Point your browser to the following URL: http://{Controller-VIP}:8181/index.html> and login:
+
+ - Username: admin
+ - Password: admin
+
+References
+==========
+
+OPNFV
+-----
+
+`OPNFV Home Page <www.opnfv.org>`_
+
+`OPNFV Genesis project page <https://wiki.opnfv.org/get_started>`_
+
+OpenStack
+---------
+
+`OpenStack Juno Release artifacts <http://www.openstack.org/software/juno>`_
+
+`OpenStack documentation <http://docs.openstack.org>`_
+
+OpenDaylight
+------------
+
+`OpenDaylight artifacts <http://www.opendaylight.org/software/downloads>`_
+
+Fuel
+----
+
+`Fuel documentation <https://wiki.openstack.org/wiki/Fuel>`_
+
+:Authors: Daniel Smith (Ericsson AB)
+:Version: 1.1.0
+
+**Documentation tracking**
+
+Revision: _sha1_
+
+Build date: _date
diff --git a/fuel/docs/src/release-notes.rst b/fuel/docs/src/release-notes.rst
new file mode 100644
index 000000000..435789767
--- /dev/null
+++ b/fuel/docs/src/release-notes.rst
@@ -0,0 +1,205 @@
+=========================================================================================
+OPNFV Release Note for the Arno SR1 release of OPNFV when using Fuel as a deployment tool
+=========================================================================================
+
+
+.. contents:: Table of Contents
+ :backlinks: none
+
+
+Abstract
+========
+
+This document compiles the release notes for the Arno SR1 release of OPNFV when using Fuel as a deployment tool.
+
+License
+=======
+
+Arno SR1 release with the Fuel deployment tool Docs (c) by Jonas Bjurel (Ericsson AB)
+
+Arno SR1 release with the Fuel deployment tool Docs are licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this. If not, see <http://creativecommons.org/licenses/by/4.0/>.
+
+Version history
+===============
+
++--------------------+--------------------+--------------------+--------------------+
+| **Date** | **Ver.** | **Author** | **Comment** |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+| 2015-06-03 | 1.0.0 | Jonas Bjurel | Arno SR0 release |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+| 2015-09-28 | 1.1.3 | Jonas Bjurel | Arno SR1 release |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+
+Important notes
+===============
+
+For the first OPNFV release (Arno), these notes introduce use of `OpenStack Fuel <https://wiki.openstack.org/wiki/Fuel>` for the deployment stage of the OPNFV continuous integration (CI) pipeline. The goal of the Arno release and this Fuel-based deployment process is to establish a foundational platform accelerating further development of the OPNFV infrastructure.
+
+Carefully follow the installation-instructions and pay special attention to the pre-deploy script that needs to be run before deployment is started.
+
+Summary
+=======
+
+For Arno SR1, the typical use of Fuel as an OpenStack installer is supplemented with OPNFV unique components such as `OpenDaylight <http://www.opendaylight.org/software>`_ version Helium as well as OPNFV-unique configurations.
+
+This Arno artefact provides Fuel as the deployment stage tool in the OPNFV CI pipeline including:
+
+- Documentation built by Jenkins
+ - this document (release notes)
+ - installation instructions
+ - build-instructions
+- The Arno Fuel installer image (.iso) built by Jenkins
+- Automated deployment of Arno with running on bare metal or a nested hypervisor environment (KVM)
+- Automated validation of the Arno deployment
+
+
+Release Data
+============
+
++--------------------------------------+--------------------------------------+
+| **Project** | genesis/bgs |
+| | |
++--------------------------------------+--------------------------------------+
+| **Repo/tag** | genesis/arno.2015.2.0 |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release designation** | Arno Base Service release 1 (SR1) |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release date** | 2015-10-01 |
+| | |
++--------------------------------------+--------------------------------------+
+| **Purpose of the delivery** | OPNFV Arno Base SR1 release |
+| | |
++--------------------------------------+--------------------------------------+
+
+Version change
+--------------
+
+Module version changes
+~~~~~~~~~~~~~~~~~~~~~~
+This is the second tracked release of genesis/fuel. It is based on following upstream versions:
+
+- Fuel 6.1.0
+- OpenStack Juno release
+- OpenDaylight Litium release
+
+Document version changes
+~~~~~~~~~~~~~~~~~~~~~~~~
+This is the second tracked version of the fuel installer for OPNFV. It comes with the following documentation:
+
+- OPNFV Installation instructions for Arno with Fuel as deployment tool
+- OPNFV Release Notes for Arno use of Fuel as deployment tool
+- OPNFV Build instructions for Arno with Fuel as deployment tool
+
+
+Reason for version
+------------------
+Feature additions
+~~~~~~~~~~~~~~~~~
+
++--------------------------------------+--------------------------------------+
+| **JIRA REFERENCE** | **SLOGAN** |
+| | |
++--------------------------------------+--------------------------------------+
+| JIRA: FUEL-4 | Baselining Fuel 6.0.1 for OPNFV |
+| | |
++--------------------------------------+--------------------------------------+
+| JIRA: FUEL-17 | Integration of OpenDaylight |
+| | |
++--------------------------------------+--------------------------------------+
+
+Bug corrections
+~~~~~~~~~~~~~~~
+
+**JIRA TICKETS:**
+
++--------------------------------------+--------------------------------------+
+| **JIRA REFERENCE** | **SLOGAN** |
+| | |
++--------------------------------------+--------------------------------------+
+| JIRA: BGS-57 | The OpenDaylight Helium release is |
+| | not fully functional and the |
+| | resulting Fuel integration is not |
+| | able to cope with the deficiancies. |
+| | It is therefore not recommended to |
+| | to enable this option. |
+| | A functional integration of ODL |
+| | version: Lithium is expected to be |
+| | available in an upcomming service |
+| | release. |
+| | |
++--------------------------------------+--------------------------------------+
+
+Deliverables
+------------
+
+Software deliverables
+~~~~~~~~~~~~~~~~~~~~~
+Fuel-based installer iso file <arno.2015.2.0.fuel.iso>
+
+Documentation deliverables
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+- OPNFV Installation instructions for Arno release with the Fuel deployment tool - ver. 1.1.0
+- OPNFV Build instructions for Arno release with the Fuel deployment tool - ver. 1.1.0
+- OPNFV Release Note for Arno release with the Fuel deployment tool - ver. 1.1.3 (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:** 3800 (Needs special switch config.)
+
+
+Known issues
+------------
+
+**JIRA TICKETS:**
+
++--------------------------------------+--------------------------------------+
+| **JIRA REFERENCE** | **SLOGAN** |
+| | |
++--------------------------------------+--------------------------------------+
+| JIRA: FUEL-43 | VMs not accessible through SSH due |
+| | to VXLAN 50 Byte overhead and lack |
+| | of proper MTU value setting on |
+| | virtual ethernet devices |
++--------------------------------------+--------------------------------------+
+| JIRA: FUEL-44 | Centos 6.5 option has not been |
+| | enough verified |
++--------------------------------------+--------------------------------------+
+
+
+Workarounds
+-----------
+See JIRA: `FUEL-43 <https://jira.opnfv.org/browse/FUEL-43>`
+
+
+Test Result
+===========
+Arno SR1 release with the Fuel deployment tool has undergone QA test runs with the following results:
+https://wiki.opnfv.org/arno_sr1_result_page?rev=1443626728
+
+References
+==========
+For more information on the OPNFV Arno release, please see http://wiki.opnfv.org/releases/arno.
+
+:Authors: Jonas Bjurel (Ericsson)
+:Version: 1.1.3
+
+**Documentation tracking**
+
+Revision: _sha1_
+
+Build date: _date_
diff --git a/fuel/include/build.sh.debug b/fuel/include/build.sh.debug
new file mode 100644
index 000000000..b6594cb16
--- /dev/null
+++ b/fuel/include/build.sh.debug
@@ -0,0 +1,355 @@
+##############################################################################
+# 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 build script integration test
+#
+integration-test () {
+
+test_clean () {
+ make -C ${BUILD_BASE} clean
+ test_cache_clean
+ test_output_clean
+}
+
+test_cache_clean () {
+ rm -rf ${TEST_BUILD_CACHE_URI_DIR}
+}
+
+test_output_clean () {
+ rm -rf ${TEST_BUILD_RESULT_DIR}
+}
+
+test_prepare () {
+ test_clean
+ test_cache_clean
+ test_output_clean
+ mkdir -p ${TEST_BUILD_CACHE_URI_DIR}
+}
+
+test_cache_check () {
+ if [ ! -f ${BUILD_BASE}/fuel-6.0.1.iso ] || \
+ [ ! -f ${BUILD_BASE}/.versions ] || \
+ [ ! -f ${BUILD_BASE}/opendaylight/.odl-build-history ]; \
+ [ ! -f ${BUILD_BASE}/opendaylight/.odl-build.log ]; then
+ echo "Cache not present in the build system"
+ echo "TEST FAILED"
+ exit $rc
+ fi
+
+ if [ ! -f ${TEST_BUILD_CACHE_URI_DIR}/${REMOTE_CACHE_ARCH_NAME}.tgz ]; then
+ echo "Cache archive not present"
+ echo "TEST FAILED"
+ exit $rc
+ fi
+
+ if tar -tf ${TEST_BUILD_CACHE_URI_DIR}/${REMOTE_CACHE_ARCH_NAME}.tgz ${CACHE_DIR}/.mark > /dev/null 2>&1; then
+ echo "Cache archive is invalidated"
+ echo "TEST FAILED"
+ exit $rc
+ fi
+}
+
+test_output_check () {
+ if [ ! -f ${TEST_BUILD_RESULT_DIR}/*.iso ] || \
+ [ ! -f ${TEST_BUILD_RESULT_DIR}/*.txt ] || \
+ [ ! -f ${TEST_BUILD_RESULT_DIR}/.versions ]; then
+ echo "Build output not produced by the build system"
+ echo "TEST FAILED"
+ exit $rc
+ fi
+}
+
+test_invalidate_cache () {
+ tar -C ${TEST_BUILD_CACHE_URI_DIR} -xf ${TEST_BUILD_CACHE_URI_DIR}/${REMOTE_CACHE_ARCH_NAME}.tgz
+ echo "cache.mk 123" > ${TEST_BUILD_CACHE_URI_DIR}/cache/.versions
+ echo "config.mk 123" >> ${TEST_BUILD_CACHE_URI_DIR}/cache/.versions
+ echo "fuel 123" >> ${TEST_BUILD_CACHE_URI_DIR}/cache/.versions
+ echo "odl 123" >> ${TEST_BUILD_CACHE_URI_DIR}/cache/.versions
+
+ echo "This file marks the invalid cache" > ${TEST_BUILD_CACHE_URI_DIR}/cache/.mark
+ rm -f ${TEST_BUILD_CACHE_URI_DIR}/${REMOTE_CACHE_ARCH_NAME}.tgz
+ tar --dereference -C ${TEST_BUILD_CACHE_URI_DIR} -caf ${TEST_BUILD_CACHE_URI_DIR}/${REMOTE_CACHE_ARCH_NAME}.tgz ${CACHE_DIR}
+}
+
+##### Always succeed integration test ####
+build_tc1 () {
+ echo "TEST - $0 - ALWAYS SUCCEED"
+ set +e
+ $0 -f s tmp/output
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "TEST FAILED"
+ rc=151
+ exit $rc
+ fi
+}
+
+##### Always fail integration test (TC2) ####
+build_tc2 () {
+ echo "TEST - $0 - ALWAYS FAIL"
+ set +e
+ $0 -f f tmp/output
+ rc=$?
+ set -e
+ if [ $rc -eq 0 ]; then
+ echo "TEST FAILED"
+ rc=152
+ exit $rc
+ fi
+}
+
+##### Fake build and populate dummy cache - integration test (TC3) ####
+build_tc3 () {
+ echo "TEST - $0 - FAKE BUILD AND POPULATE DUMMY CACHE"
+ rm -rf tmp
+ mkdir -p ${TEST_BUILD_CACHE_URI_DIR}
+ set +e
+ $0 -c ${TEST_BUILD_CACHE_URI} -f PD ${TEST_BUILD_RESULT_DIR}
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build failed"
+ echo "TEST FAILED"
+ rc=152
+ exit $rc
+ fi
+
+ rc=153
+ test_output_check
+
+ rc=154
+ test_cache_check
+}
+
+##### Fake build usng dummy cache integration test (TC4) ####
+build_tc4 () {
+ echo "TEST - $0 - FAKE BUILD USING DUMMY CACHE"
+ set +e
+ $0 -c ${TEST_BUILD_CACHE_URI} -f D ${TEST_BUILD_RESULT_DIR}
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build failed"
+ echo "TEST FAILED"
+ rc=155
+ exit $rc
+ fi
+
+ rc=156
+ test_output_check
+
+ rc=157
+ test_cache_check
+}
+
+#### Fake build and repopulate cache because cache non existant (TC5) ####
+build_tc5 () {
+ echo "TEST - $0 - FAKE BUILD AND REPOPULATE CACHE BECAUSE NON EXISTANT"
+ rm -rf ${TEST_BUILD_CACHE_URI_DIR}/*
+ set +e
+ $0 -c ${TEST_BUILD_CACHE_URI} -f D ${TEST_BUILD_RESULT_DIR}
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build failed"
+ echo "TEST FAILED"
+ rc=158
+ exit $rc
+ fi
+
+ rc=159
+ test_output_check
+
+ rc=160
+ test_cache_check
+}
+
+#### Fake build and repopulate cache because cache is ivalidated (TC6) ####
+build_tc6 () {
+ echo "TEST - $0 - FAKE BUILD AND REPOPULATE DUE TO CACHE INVALIDATION"
+ test_invalidate_cache
+ set +e
+ $0 -c ${TEST_BUILD_CACHE_URI} -f D ${TEST_BUILD_RESULT_DIR}
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build failed"
+ echo "TEST FAILED"
+ rc=161
+ exit $rc
+ fi
+
+ rc=162
+ test_output_check
+
+ rc=163
+ test_cache_check
+}
+
+#### Real build and populate cache (TC7) ####
+build_tc7 () {
+ echo "TEST - $0 - FULL BUILD AND POPULATE CACHE"
+ test_prepare
+ BUILD_START=$(date +%s)
+ set +e
+ $0 -c ${TEST_BUILD_CACHE_URI} -f Pi ${TEST_BUILD_RESULT_DIR}
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build failed"
+ echo "TEST FAILED"
+ rc=164
+ exit $rc
+ fi
+
+ BUILD_TIME=$(($(date +%s)-${BUILD_START}))
+ rc=165
+ test_output_check
+ rc=166
+ test_cache_check
+}
+
+#### Real build using cache from TC7 (TC8) ####
+build_tc8 () {
+ echo "TEST - $0 - INCREMENTAL BUILD AND USING CACHE"
+ BUILD_START=$(date +%s)
+ set +e
+ $0 -c ${TEST_BUILD_CACHE_URI} -f i ${TEST_BUILD_RESULT_DIR}
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ]; then
+ echo "Build failed"
+ echo "TEST FAILED"
+ rc=167
+ exit $rc
+ fi
+ BUILD_TIME=$(($(date +%s)-${BUILD_START}))
+ test_output_check
+ rc=168
+ test_cache_check
+ rc=169
+}
+
+TEST_BUILD_ARTIFACT_DIR=${BUILD_BASE}/test
+TEST_BUILD_CACHE_URI_DIR=${TEST_BUILD_ARTIFACT_DIR}
+TEST_BUILD_CACHE_URI=file://${TEST_BUILD_CACHE_URI_DIR}
+TEST_BUILD_RESULT_DIR=${BUILD_BASE}/tmp/output
+
+TEST_START=$(date +%s)
+# Run test case 1: Always succeed integration test
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 1 ============================
+echo ==========================================================================
+test_prepare
+build_tc1
+
+# Run test case 2: Always fail integration test
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 2 ============================
+echo ==========================================================================
+test_prepare
+build_tc2
+
+# Run test case 3: Fake build and populate a build cach
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 3 ============================
+echo ==========================================================================
+test_prepare
+build_tc3
+
+# Run test case 4: Fake build using the build cache produced in TC 3
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 4 ============================
+echo ==========================================================================
+build_tc4
+
+# Run test case 5: Fake build and repopulate the build cache as there is no existing one
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 5 ============================
+echo ==========================================================================
+test_prepare
+build_tc5
+
+# Run test case 6: Fake build and repopulate the build cache as there the current one is invalidated/outdated
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 6 ============================
+echo ==========================================================================
+test_invalidate_cache
+build_tc4
+
+# Run test case 7: Build from upstream repos and populate the build cache
+if [ ${FULL_INTEGRATION_TEST} -eq 1 ]; then
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 7 ============================
+echo ==========================================================================
+ test_prepare
+ build_tc7
+ POPULATE_CACHE_TIME=${BUILD_TIME}
+fi
+
+# Run test case 8: Build from cache produced in TC7
+if [ ${FULL_INTEGRATION_TEST} -eq 1 ]; then
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 8 ============================
+echo ==========================================================================
+ build_tc8
+ PARTIAL_BUILD_TIME=${BUILD_TIME}
+fi
+
+# Run test case 9: Build and repopulate the cache as the current one is invalidated/not up to date
+if [ ${FULL_INTEGRATION_TEST} -eq 1 ]; then
+echo ==========================================================================
+echo ========================= RUNNING TEST CASE 9 ============================
+echo ==========================================================================
+ echo "TEST - $0 - REPOPULATING CACHE DUE TO CACHE INVALIDATION"
+ test_invalidate_cache
+ build_tc8
+fi
+
+TEST_TIME=$(($(date +%s)-${TEST_START}))
+
+rm -rf tmp
+echo "All tests passed!, test duration was ${TEST_TIME} seconds"
+if [ ${FULL_INTEGRATION_TEST} -eq 1 ]; then
+ echo "Full build took ${POPULATE_CACHE_TIME} second"
+ echo "Incremental build took ${PARTIAL_BUILD_TIME} seconds"
+fi
+rc=0
+exit $rc
+}
+#
+# END of build script integration test
+############################################################################
+
+############################################################################
+# BEGIN of debug_make - a fake make initiated with -D for debugging
+#
+debug_make () {
+ make -C ${BUILD_BASE} clean
+ echo "This is a fake debug fuel .iso image" > ${BUILD_BASE}/fuel-6.0.1.iso
+
+ echo "This is a fake debug versions file" > ${BUILD_BASE}/.versions
+ echo "cache.mk" $(md5sum ${BUILD_BASE}/cache.mk | cut -f1 -d " ") >> ${BUILD_BASE}/.versions
+ echo "config.mk" $(md5sum ${BUILD_BASE}/config.mk | cut -f1 -d " ") >> ${BUILD_BASE}/.versions
+ echo "fuel" $(git ls-remote $(make -C ${BUILD_BASE} get-fuel-repo | grep https) | awk '{print $(NF-1)}') >> ${BUILD_BASE}/.versions
+ echo "odl" $(git ls-remote $(make -C ${BUILD_BASE} get-odl-repo | grep https) | awk '{print $(NF-1)}') >> ${BUILD_BASE}/.versions
+
+ rm -rf ${BUILD_BASE}/release
+ mkdir ${BUILD_BASE}/release
+ echo "This is a fake debug OPNFV .iso image" > ${BUILD_BASE}/release/fake-debug.iso
+ echo "This is a fake debug OPNFV .iso.txt message" > ${BUILD_BASE}/release/fake-debug.iso.txt
+ echo "This a fake debug odl build history" > ${BUILD_BASE}/opendaylight/.odl-build-history
+ echo "This a fake debug odl build log" > ${BUILD_BASE}/opendaylight/.odl-build.log
+}
+#
+# END of debug_make
+############################################################################
diff --git a/fuel/prototypes/auto-deploy/README.rst b/fuel/prototypes/auto-deploy/README.rst
new file mode 100644
index 000000000..35898b052
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/README.rst
@@ -0,0 +1,24 @@
+** DEA/DHA deployment prototype**
+
+This is a continuation of the specific libvirt deployment prototype into a generic concept supporting a hardware plugin architecture in the deployment engine.
+
+Conceptually the deployer contains of a number of entities:
+
+* The main deployment engine, deploy.sh. The deploy script needs three pieces of information:
+ * The ISO file to deploy
+ * The dea.yaml file describing the Fuel deployment
+ * The dha.yaml file describing the hardware configuration
+* The Deployment Hardware Adapters (one per support hardware type). The adapter is an implementation of the DHA API for a specific hardware.
+* The Deployment Hardware Adapter configuration (dha.yaml). The DHA configuration specifies the hardware configuration in terms of number of nodes and includes both general properties and specific information for the hardware adapter (such as IPMI configuration, libvirt VM names etc).
+* The Deployment Environment Adapter configuration (dea.yaml). The DEA configuration describes an actual Fuel deployment, complete with network settings, node roles, interface configurations and more. The nodes identities in the dea.yaml must line up with those in the dha.yaml.
+
+Both the dea.yaml and dha.yaml can be created from an existing Fuel deployment, in a way making a xerox copy of it for re-deployment. For this, the create_templates structure is copied to the Fuel master and the create_templates.sh is run there.
+
+In the examples/libvirt directory, VM and network definitions for libvirt together with matching dea.yaml and dha.yaml can be found. The DEA configuration is made using a opnfv-59 deployment.
+
+There is also a hybrid libirt/IPMI adapter with an example dea.yaml and dha.yaml for a small one controller + one compute deploy in examples/ipmi.
+
+The details and API description for DEA and DHA can be found in the documentation directory.
+
+See the READMEs in the examples dirctories to get going with a Fuel deployment for your environment - or write and contribute your own hardware adapter for your environment!
+
diff --git a/fuel/prototypes/auto-deploy/TODO.txt b/fuel/prototypes/auto-deploy/TODO.txt
new file mode 100644
index 000000000..3dcdfb7a0
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/TODO.txt
@@ -0,0 +1,34 @@
+*** FIXMEs can automatically be extracted from the code by running
+*** list_fixmes.sh!
+
+In transplant2.sh, grafting can not operate on the DEA node ID but
+must consider the DHA MAC address instead. It will work as long as
+the interface setup on all nodes is identical or if the powerOnStrategy
+of the dha.yaml is sequential but it needs to be fixed down the road.
+
+Fix the NTP server pointer on computes (currently fixed, needs to be
+calculated - OPNFV clause). Alternatively, add data to feed into
+pre-deploy in the dea.yaml. Or... Add the information requested from
+the script into settings.yaml instead and make the pre-deploy script
+only "refine" these settings?
+
+Move the network transformations out from the two compute: and
+controller: clauses and add them to the individual nodes as well?
+Potentially needed if e.g. a Cinder node is a separate node type!
+
+The release is currently hardcoded to Ubuntu, make in general.
+
+Investigate how to reliable detect that the kickstart has started - is
+it possible to set the IP even when installation is made by cdrom and
+trigger on that? See FIXME in install_iso.sh.
+
+The Fuel gateway in dea_getFuelGateway is always returning the .1 of
+the Fuel IP - should be possible to use another scheme?
+
+Verify that nodes in DEA corresponds with nodes in DHA.
+
+Verify that API versions in DEA, DHA and API are aligned.
+
+Fix dhaParse and dheParse so they exit gracefully when parsing of YAML
+file fails.
+
diff --git a/fuel/prototypes/auto-deploy/configs/ericsson_montreal/dea.yaml b/fuel/prototypes/auto-deploy/configs/ericsson_montreal/dea.yaml
new file mode 100644
index 000000000..d454bc573
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/configs/ericsson_montreal/dea.yaml
@@ -0,0 +1,983 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: Tue May 5 15:33:07 UTC 2015
+comment:
+nodes:
+- id: 1
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ eth2:
+ - public
+ - management
+ - storage
+ - private
+ role: controller
+- id: 2
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ eth2:
+ - public
+ - management
+ - storage
+ - private
+ role: compute
+environment_mode: multinode
+environment_name: Stefan3_auto
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.30.0.254
+ dhcp_pool_start: 10.30.0.3
+ ipaddress: 10.30.0.2
+ netmask: 255.255.255.0
+ DNS_DOMAIN: opnfvericsson.ca
+ DNS_SEARCH: opnfvericsson.ca
+ DNS_UPSTREAM: 10.118.32.193
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+ HOSTNAME: mrberg-fuel
+ NTP1: 0.ca.pool.ntp.org
+ NTP2: 1.ca.pool.ntp.org
+ NTP3: 2.ca.pool.ntp.org
+controller:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-eth4
+- action: add-port
+ bridge: br-eth4
+ name: eth4
+- action: add-br
+ name: br-eth5
+- action: add-port
+ bridge: br-eth5
+ name: eth5
+- action: add-br
+ name: br-ex
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-storage
+ tags:
+ - 220
+ - 0
+ vlan_ids:
+ - 220
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-mgmt
+ tags:
+ - 320
+ - 0
+ vlan_ids:
+ - 320
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-ex
+ tags:
+ - 120
+ - 0
+ vlan_ids:
+ - 120
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+compute:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-eth4
+- action: add-port
+ bridge: br-eth4
+ name: eth4
+- action: add-br
+ name: br-eth5
+- action: add-port
+ bridge: br-eth5
+ name: eth5
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-storage
+ tags:
+ - 220
+ - 0
+ vlan_ids:
+ - 220
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-mgmt
+ tags:
+ - 320
+ - 0
+ vlan_ids:
+ - 320
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+opnfv:
+ compute: {}
+ controller: {}
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 10.118.32.193
+ - 8.8.8.8
+ 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
+ net_l23_provider: ovs
+ segmentation_type: vlan
+ vlan_range:
+ - 2022
+ - 2023
+ networks:
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ assign_vip: true
+ 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
+ vlan_start: null
+ name: public
+ vlan_start: 120
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ assign_vip: true
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 101
+ name: management
+ vlan_start: 320
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 192.168.1.254
+ meta:
+ assign_vip: false
+ 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: 220
+ - cidr: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ assign_vip: false
+ 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
+ - cidr: 10.30.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 10.30.0.3
+ - 10.30.0.254
+ meta:
+ assign_vip: false
+ 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:
+ access:
+ email:
+ description: Email address for Administrator
+ label: email
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: password
+ 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$)(?![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$)(?![Gg]uest$).*
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: text
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ label: Auto assign floating IP
+ restrictions:
+ - cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ compute_scheduler_driver:
+ label: Scheduler driver
+ type: radio
+ value: nova.scheduler.filter_scheduler.FilterScheduler
+ values:
+ - data: nova.scheduler.filter_scheduler.FilterScheduler
+ description: Currently the most advanced OpenStack scheduler. See the OpenStack
+ documentation for details.
+ label: Filter scheduler
+ - data: nova.scheduler.simple.SimpleScheduler
+ description: This is 'naive' scheduler which tries to find the least loaded
+ host
+ label: Simple scheduler
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ disable_offload:
+ description: If set, generic segmentation offload (gso) and generic receive
+ offload (gro) on physical nics will be disabled. See ethtool man.
+ label: Disable generic offload on physical nics
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron' and networking_parameters:segmentation_type
+ == 'gre'
+ type: checkbox
+ value: true
+ weight: 80
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: vcenter
+ description: Choose this type of hypervisor if you run OpenStack in a vCenter
+ environment.
+ label: vCenter
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or cluster:net_provider
+ == 'neutron'
+ weight: 30
+ metadata:
+ label: Common
+ weight: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ type: text
+ value: 10.118.32.193, 8.8.8.8
+ weight: 10
+ metadata:
+ label: Upstream DNS
+ weight: 90
+ external_ntp:
+ metadata:
+ label: Upstream NTP
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP servers list
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 rootdelay=90 nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to
+ support networking over Mellanox NIC. Mellanox Neutron plugin will not
+ be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ nsx_plugin:
+ connector_type:
+ description: Default network transport type to use
+ label: NSX connector type
+ type: select
+ value: stt
+ values:
+ - data: gre
+ label: GRE
+ - data: ipsec_gre
+ label: GRE over IPSec
+ - data: stt
+ label: STT
+ - data: ipsec_stt
+ label: STT over IPSec
+ - data: bridge
+ label: Bridge
+ weight: 80
+ l3_gw_service_uuid:
+ description: UUID for the default L3 gateway service to use with this cluster
+ label: L3 service UUID
+ regex:
+ error: Invalid L3 gateway service UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 50
+ metadata:
+ enabled: false
+ label: VMware NSX
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron' or networking_parameters:net_l23_provider
+ != 'nsx'
+ weight: 20
+ nsx_controllers:
+ description: One or more IPv4[:port] addresses of NSX controller node, separated
+ by comma (e.g. 10.30.30.2,192.168.110.254:443)
+ label: NSX controller endpoint
+ regex:
+ error: Invalid controller endpoints, specify valid IPv4[:port] pair
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(,(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?)*$
+ type: text
+ value: ''
+ weight: 60
+ nsx_password:
+ description: Password for Administrator
+ label: NSX password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: ''
+ weight: 30
+ nsx_username:
+ description: NSX administrator's username
+ label: NSX username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ packages_url:
+ description: URL to NSX specific packages
+ label: URL to NSX bits
+ regex:
+ error: Invalid URL, specify valid HTTP/HTTPS URL with IPv4 address (e.g.
+ http://10.20.0.2/nsx)
+ source: ^https?://(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(/.*)?$
+ type: text
+ value: ''
+ weight: 70
+ replication_mode:
+ description: ''
+ label: NSX cluster has Service nodes
+ type: checkbox
+ value: true
+ weight: 90
+ transport_zone_uuid:
+ description: UUID of the pre-existing default NSX Transport zone
+ label: Transport zone UUID
+ regex:
+ error: Invalid transport zone UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 40
+ provision:
+ metadata:
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: cobbler
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: Classic (use anaconda or debian-installer)
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ and zabbix-server only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ 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)
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ 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)
+ 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:
+ - settings:common.libvirt_type.value != 'vcenter'
+ 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'
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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*$
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ type: text
+ value: '2'
+ weight: 85
+ vc_datacenter:
+ description: Inventory path to a datacenter. If you want to use ESXi host
+ as datastore, it should be "ha-datacenter".
+ label: Datacenter name
+ regex:
+ error: Empty datacenter
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 65
+ vc_datastore:
+ description: Datastore associated with the datacenter.
+ label: Datastore name
+ regex:
+ error: Empty datastore
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 60
+ vc_host:
+ description: IP Address of vCenter/ESXi
+ label: vCenter/ESXi IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 45
+ vc_image_dir:
+ description: The name of the directory where the glance images will be stored
+ in the VMware datastore.
+ label: Datastore Images directory
+ regex:
+ error: Empty images directory
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: /openstack_glance
+ weight: 70
+ vc_password:
+ description: vCenter/ESXi admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: password
+ value: ''
+ weight: 55
+ vc_user:
+ description: vCenter/ESXi admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 50
+ 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:common.libvirt_type.value
+ == 'vcenter'
+ type: checkbox
+ value: false
+ weight: 20
+ volumes_lvm:
+ description: Requires 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
+ volumes_vmdk:
+ description: Configures Cinder to store volumes via VMware vCenter.
+ label: VMware vCenter for volumes (Cinder)
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or settings:storage.volumes_lvm.value
+ == true
+ type: checkbox
+ value: false
+ weight: 15
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ vcenter:
+ cluster:
+ description: vCenter cluster name. If you have multiple clusters, use comma
+ to separate names
+ label: Cluster
+ regex:
+ error: Invalid cluster list
+ source: ^([^,\ ]+([\ ]*[^,\ ])*)(,[^,\ ]+([\ ]*[^,\ ])*)*$
+ type: text
+ value: ''
+ weight: 40
+ datastore_regex:
+ description: The Datastore regexp setting specifies the data stores to use
+ with Compute. For example, "nas.*". If you want to use all available datastores,
+ leave this field blank
+ label: Datastore regexp
+ regex:
+ error: Invalid datastore regexp
+ source: ^(\S.*\S|\S|)$
+ type: text
+ value: ''
+ weight: 50
+ host_ip:
+ description: IP Address of vCenter
+ label: vCenter IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ type: text
+ value: ''
+ weight: 10
+ metadata:
+ label: vCenter
+ restrictions:
+ - action: hide
+ condition: settings:common.libvirt_type.value != 'vcenter'
+ weight: 20
+ use_vcenter:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 5
+ vc_password:
+ description: vCenter admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 30
+ vc_user:
+ description: vCenter admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ vlan_interface:
+ description: Physical ESXi host ethernet adapter for VLAN networking (e.g.
+ vmnic1). If empty "vmnic0" is used by default
+ label: ESXi VLAN interface
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'nova_network' or networking_parameters:net_manager
+ != 'VlanManager'
+ type: text
+ value: ''
+ weight: 60
+ zabbix:
+ metadata:
+ label: Zabbix Access
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 70
+ password:
+ description: Password for Zabbix Administrator
+ label: password
+ type: password
+ value: zabbix
+ weight: 20
+ username:
+ description: Username for Zabbix Administrator
+ label: username
+ type: text
+ value: admin
+ weight: 10
diff --git a/fuel/prototypes/auto-deploy/configs/lf_pod1/dea_ha.yaml b/fuel/prototypes/auto-deploy/configs/lf_pod1/dea_ha.yaml
new file mode 100644
index 000000000..25de4b98e
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/configs/lf_pod1/dea_ha.yaml
@@ -0,0 +1,969 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: Thu May 21 13:34:13 CEST 2015
+comment: HA deployment with Ceph
+nodes:
+- id: 1
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,controller
+- id: 2
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,controller
+- id: 3
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,controller
+- id: 4
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,compute
+- id: 5
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,compute
+environment_mode: ha
+environment_name: auto_ceph
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.20.255.254
+ dhcp_pool_start: 10.20.0.3
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 8.8.8.8
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+ HOSTNAME: fuel-64-ceph
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+controller:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-ex
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 301
+ - 0
+ vlan_ids:
+ - 301
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-mgmt
+ tags:
+ - 300
+ - 0
+ vlan_ids:
+ - 300
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-ex
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-prv
+compute:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 301
+ - 0
+ vlan_ids:
+ - 301
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-mgmt
+ tags:
+ - 300
+ - 0
+ vlan_ids:
+ - 300
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-prv
+opnfv:
+ compute: {}
+ controller: {}
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ floating_ranges:
+ - - 172.30.9.80
+ - 172.30.9.89
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ net_l23_provider: ovs
+ segmentation_type: vlan
+ vlan_range:
+ - 1000
+ - 1010
+ networks:
+ - cidr: 172.30.9.0/24
+ gateway: 172.30.9.1
+ ip_ranges:
+ - - 172.30.9.70
+ - 172.30.9.79
+ meta:
+ assign_vip: true
+ 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
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ assign_vip: true
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 101
+ name: management
+ vlan_start: 300
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 192.168.1.254
+ meta:
+ assign_vip: false
+ 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: 301
+ - cidr: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ assign_vip: false
+ 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
+ - cidr: 10.20.0.0/16
+ gateway: null
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.255.254
+ meta:
+ assign_vip: false
+ 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:
+ access:
+ email:
+ description: Email address for Administrator
+ label: email
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: password
+ 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$)(?![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$)(?![Gg]uest$).*
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: text
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ label: Auto assign floating IP
+ restrictions:
+ - cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ compute_scheduler_driver:
+ label: Scheduler driver
+ type: radio
+ value: nova.scheduler.filter_scheduler.FilterScheduler
+ values:
+ - data: nova.scheduler.filter_scheduler.FilterScheduler
+ description: Currently the most advanced OpenStack scheduler. See the OpenStack
+ documentation for details.
+ label: Filter scheduler
+ - data: nova.scheduler.simple.SimpleScheduler
+ description: This is 'naive' scheduler which tries to find the least loaded
+ host
+ label: Simple scheduler
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ disable_offload:
+ description: If set, generic segmentation offload (gso) and generic receive
+ offload (gro) on physical nics will be disabled. See ethtool man.
+ label: Disable generic offload on physical nics
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron' and networking_parameters:segmentation_type
+ == 'gre'
+ type: checkbox
+ value: true
+ weight: 80
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: vcenter
+ description: Choose this type of hypervisor if you run OpenStack in a vCenter
+ environment.
+ label: vCenter
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or cluster:net_provider
+ == 'neutron'
+ weight: 30
+ metadata:
+ label: Common
+ weight: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ type: text
+ value: 8.8.8.8, 8.8.4.4
+ weight: 10
+ metadata:
+ label: Upstream DNS
+ weight: 90
+ external_ntp:
+ metadata:
+ label: Upstream NTP
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP servers list
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 rootdelay=90 nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to
+ support networking over Mellanox NIC. Mellanox Neutron plugin will not
+ be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ nsx_plugin:
+ connector_type:
+ description: Default network transport type to use
+ label: NSX connector type
+ type: select
+ value: stt
+ values:
+ - data: gre
+ label: GRE
+ - data: ipsec_gre
+ label: GRE over IPSec
+ - data: stt
+ label: STT
+ - data: ipsec_stt
+ label: STT over IPSec
+ - data: bridge
+ label: Bridge
+ weight: 80
+ l3_gw_service_uuid:
+ description: UUID for the default L3 gateway service to use with this cluster
+ label: L3 service UUID
+ regex:
+ error: Invalid L3 gateway service UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 50
+ metadata:
+ enabled: false
+ label: VMware NSX
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron' or networking_parameters:net_l23_provider
+ != 'nsx'
+ weight: 20
+ nsx_controllers:
+ description: One or more IPv4[:port] addresses of NSX controller node, separated
+ by comma (e.g. 10.30.30.2,192.168.110.254:443)
+ label: NSX controller endpoint
+ regex:
+ error: Invalid controller endpoints, specify valid IPv4[:port] pair
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(,(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?)*$
+ type: text
+ value: ''
+ weight: 60
+ nsx_password:
+ description: Password for Administrator
+ label: NSX password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: ''
+ weight: 30
+ nsx_username:
+ description: NSX administrator's username
+ label: NSX username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ packages_url:
+ description: URL to NSX specific packages
+ label: URL to NSX bits
+ regex:
+ error: Invalid URL, specify valid HTTP/HTTPS URL with IPv4 address (e.g.
+ http://10.20.0.2/nsx)
+ source: ^https?://(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(/.*)?$
+ type: text
+ value: ''
+ weight: 70
+ replication_mode:
+ description: ''
+ label: NSX cluster has Service nodes
+ type: checkbox
+ value: true
+ weight: 90
+ transport_zone_uuid:
+ description: UUID of the pre-existing default NSX Transport zone
+ label: Transport zone UUID
+ regex:
+ error: Invalid transport zone UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 40
+ provision:
+ metadata:
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: cobbler
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: Classic (use anaconda or debian-installer)
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ and zabbix-server only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ 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)
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ 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)
+ type: checkbox
+ value: true
+ 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:
+ - settings:common.libvirt_type.value != 'vcenter'
+ 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'
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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*$
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ type: text
+ value: '2'
+ weight: 85
+ vc_datacenter:
+ description: Inventory path to a datacenter. If you want to use ESXi host
+ as datastore, it should be "ha-datacenter".
+ label: Datacenter name
+ regex:
+ error: Empty datacenter
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 65
+ vc_datastore:
+ description: Datastore associated with the datacenter.
+ label: Datastore name
+ regex:
+ error: Empty datastore
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 60
+ vc_host:
+ description: IP Address of vCenter/ESXi
+ label: vCenter/ESXi IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 45
+ vc_image_dir:
+ description: The name of the directory where the glance images will be stored
+ in the VMware datastore.
+ label: Datastore Images directory
+ regex:
+ error: Empty images directory
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: /openstack_glance
+ weight: 70
+ vc_password:
+ description: vCenter/ESXi admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: password
+ value: ''
+ weight: 55
+ vc_user:
+ description: vCenter/ESXi admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 50
+ 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:common.libvirt_type.value
+ == 'vcenter'
+ type: checkbox
+ value: true
+ weight: 20
+ volumes_lvm:
+ description: Requires 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
+ volumes_vmdk:
+ description: Configures Cinder to store volumes via VMware vCenter.
+ label: VMware vCenter for volumes (Cinder)
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or settings:storage.volumes_lvm.value
+ == true
+ type: checkbox
+ value: false
+ weight: 15
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ vcenter:
+ cluster:
+ description: vCenter cluster name. If you have multiple clusters, use comma
+ to separate names
+ label: Cluster
+ regex:
+ error: Invalid cluster list
+ source: ^([^,\ ]+([\ ]*[^,\ ])*)(,[^,\ ]+([\ ]*[^,\ ])*)*$
+ type: text
+ value: ''
+ weight: 40
+ datastore_regex:
+ description: The Datastore regexp setting specifies the data stores to use
+ with Compute. For example, "nas.*". If you want to use all available datastores,
+ leave this field blank
+ label: Datastore regexp
+ regex:
+ error: Invalid datastore regexp
+ source: ^(\S.*\S|\S|)$
+ type: text
+ value: ''
+ weight: 50
+ host_ip:
+ description: IP Address of vCenter
+ label: vCenter IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ type: text
+ value: ''
+ weight: 10
+ metadata:
+ label: vCenter
+ restrictions:
+ - action: hide
+ condition: settings:common.libvirt_type.value != 'vcenter'
+ weight: 20
+ use_vcenter:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 5
+ vc_password:
+ description: vCenter admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 30
+ vc_user:
+ description: vCenter admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ vlan_interface:
+ description: Physical ESXi host ethernet adapter for VLAN networking (e.g.
+ vmnic1). If empty "vmnic0" is used by default
+ label: ESXi VLAN interface
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'nova_network' or networking_parameters:net_manager
+ != 'VlanManager'
+ type: text
+ value: ''
+ weight: 60
+ zabbix:
+ metadata:
+ label: Zabbix Access
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 70
+ password:
+ description: Password for Zabbix Administrator
+ label: password
+ type: password
+ value: zabbix
+ weight: 20
+ username:
+ description: Username for Zabbix Administrator
+ label: username
+ type: text
+ value: admin
+ weight: 10
diff --git a/fuel/prototypes/auto-deploy/configs/lf_pod1/dea_no-ha.yaml b/fuel/prototypes/auto-deploy/configs/lf_pod1/dea_no-ha.yaml
new file mode 100644
index 000000000..3abbdce93
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/configs/lf_pod1/dea_no-ha.yaml
@@ -0,0 +1,969 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: Thu May 21 13:34:13 CEST 2015
+comment: No HA deployment with Ceph
+nodes:
+- id: 1
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,controller
+- id: 2
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,compute
+- id: 3
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,compute
+- id: 4
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,compute
+- id: 5
+ interfaces:
+ eth0:
+ - public
+ eth1:
+ - fuelweb_admin
+ - management
+ - storage
+ - private
+ role: ceph-osd,compute
+environment_mode: multinode
+environment_name: auto_ceph_noha
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.20.255.254
+ dhcp_pool_start: 10.20.0.3
+ ipaddress: 10.20.0.2
+ netmask: 255.255.0.0
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 8.8.8.8
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+ HOSTNAME: fuel-64-ceph
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+controller:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-ex
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 301
+ - 0
+ vlan_ids:
+ - 301
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-mgmt
+ tags:
+ - 300
+ - 0
+ vlan_ids:
+ - 300
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-ex
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-prv
+compute:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 301
+ - 0
+ vlan_ids:
+ - 301
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-mgmt
+ tags:
+ - 300
+ - 0
+ vlan_ids:
+ - 300
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-prv
+opnfv:
+ compute: {}
+ controller: {}
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ floating_ranges:
+ - - 172.30.9.80
+ - 172.30.9.89
+ gre_id_range:
+ - 2
+ - 65535
+ internal_cidr: 192.168.111.0/24
+ internal_gateway: 192.168.111.1
+ net_l23_provider: ovs
+ segmentation_type: vlan
+ vlan_range:
+ - 1000
+ - 1010
+ networks:
+ - cidr: 172.30.9.0/24
+ gateway: 172.30.9.1
+ ip_ranges:
+ - - 172.30.9.70
+ - 172.30.9.79
+ meta:
+ assign_vip: true
+ 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
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ assign_vip: true
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 101
+ name: management
+ vlan_start: 300
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 192.168.1.254
+ meta:
+ assign_vip: false
+ 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: 301
+ - cidr: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ assign_vip: false
+ 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
+ - cidr: 10.20.0.0/16
+ gateway: null
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.255.254
+ meta:
+ assign_vip: false
+ 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:
+ access:
+ email:
+ description: Email address for Administrator
+ label: email
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: password
+ 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$)(?![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$)(?![Gg]uest$).*
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: text
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ label: Auto assign floating IP
+ restrictions:
+ - cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ compute_scheduler_driver:
+ label: Scheduler driver
+ type: radio
+ value: nova.scheduler.filter_scheduler.FilterScheduler
+ values:
+ - data: nova.scheduler.filter_scheduler.FilterScheduler
+ description: Currently the most advanced OpenStack scheduler. See the OpenStack
+ documentation for details.
+ label: Filter scheduler
+ - data: nova.scheduler.simple.SimpleScheduler
+ description: This is 'naive' scheduler which tries to find the least loaded
+ host
+ label: Simple scheduler
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ disable_offload:
+ description: If set, generic segmentation offload (gso) and generic receive
+ offload (gro) on physical nics will be disabled. See ethtool man.
+ label: Disable generic offload on physical nics
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron' and networking_parameters:segmentation_type
+ == 'gre'
+ type: checkbox
+ value: true
+ weight: 80
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: vcenter
+ description: Choose this type of hypervisor if you run OpenStack in a vCenter
+ environment.
+ label: vCenter
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or cluster:net_provider
+ == 'neutron'
+ weight: 30
+ metadata:
+ label: Common
+ weight: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ type: text
+ value: 8.8.8.8, 8.8.4.4
+ weight: 10
+ metadata:
+ label: Upstream DNS
+ weight: 90
+ external_ntp:
+ metadata:
+ label: Upstream NTP
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP servers list
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 rootdelay=90 nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to
+ support networking over Mellanox NIC. Mellanox Neutron plugin will not
+ be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ nsx_plugin:
+ connector_type:
+ description: Default network transport type to use
+ label: NSX connector type
+ type: select
+ value: stt
+ values:
+ - data: gre
+ label: GRE
+ - data: ipsec_gre
+ label: GRE over IPSec
+ - data: stt
+ label: STT
+ - data: ipsec_stt
+ label: STT over IPSec
+ - data: bridge
+ label: Bridge
+ weight: 80
+ l3_gw_service_uuid:
+ description: UUID for the default L3 gateway service to use with this cluster
+ label: L3 service UUID
+ regex:
+ error: Invalid L3 gateway service UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 50
+ metadata:
+ enabled: false
+ label: VMware NSX
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron' or networking_parameters:net_l23_provider
+ != 'nsx'
+ weight: 20
+ nsx_controllers:
+ description: One or more IPv4[:port] addresses of NSX controller node, separated
+ by comma (e.g. 10.30.30.2,192.168.110.254:443)
+ label: NSX controller endpoint
+ regex:
+ error: Invalid controller endpoints, specify valid IPv4[:port] pair
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(,(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?)*$
+ type: text
+ value: ''
+ weight: 60
+ nsx_password:
+ description: Password for Administrator
+ label: NSX password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: ''
+ weight: 30
+ nsx_username:
+ description: NSX administrator's username
+ label: NSX username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ packages_url:
+ description: URL to NSX specific packages
+ label: URL to NSX bits
+ regex:
+ error: Invalid URL, specify valid HTTP/HTTPS URL with IPv4 address (e.g.
+ http://10.20.0.2/nsx)
+ source: ^https?://(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(/.*)?$
+ type: text
+ value: ''
+ weight: 70
+ replication_mode:
+ description: ''
+ label: NSX cluster has Service nodes
+ type: checkbox
+ value: true
+ weight: 90
+ transport_zone_uuid:
+ description: UUID of the pre-existing default NSX Transport zone
+ label: Transport zone UUID
+ regex:
+ error: Invalid transport zone UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 40
+ provision:
+ metadata:
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: cobbler
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: Classic (use anaconda or debian-installer)
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ and zabbix-server only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ 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)
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ 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)
+ type: checkbox
+ value: true
+ 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:
+ - settings:common.libvirt_type.value != 'vcenter'
+ 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'
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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*$
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ type: text
+ value: '2'
+ weight: 85
+ vc_datacenter:
+ description: Inventory path to a datacenter. If you want to use ESXi host
+ as datastore, it should be "ha-datacenter".
+ label: Datacenter name
+ regex:
+ error: Empty datacenter
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 65
+ vc_datastore:
+ description: Datastore associated with the datacenter.
+ label: Datastore name
+ regex:
+ error: Empty datastore
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 60
+ vc_host:
+ description: IP Address of vCenter/ESXi
+ label: vCenter/ESXi IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 45
+ vc_image_dir:
+ description: The name of the directory where the glance images will be stored
+ in the VMware datastore.
+ label: Datastore Images directory
+ regex:
+ error: Empty images directory
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: /openstack_glance
+ weight: 70
+ vc_password:
+ description: vCenter/ESXi admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: password
+ value: ''
+ weight: 55
+ vc_user:
+ description: vCenter/ESXi admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 50
+ 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:common.libvirt_type.value
+ == 'vcenter'
+ type: checkbox
+ value: true
+ weight: 20
+ volumes_lvm:
+ description: Requires 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
+ volumes_vmdk:
+ description: Configures Cinder to store volumes via VMware vCenter.
+ label: VMware vCenter for volumes (Cinder)
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or settings:storage.volumes_lvm.value
+ == true
+ type: checkbox
+ value: false
+ weight: 15
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ vcenter:
+ cluster:
+ description: vCenter cluster name. If you have multiple clusters, use comma
+ to separate names
+ label: Cluster
+ regex:
+ error: Invalid cluster list
+ source: ^([^,\ ]+([\ ]*[^,\ ])*)(,[^,\ ]+([\ ]*[^,\ ])*)*$
+ type: text
+ value: ''
+ weight: 40
+ datastore_regex:
+ description: The Datastore regexp setting specifies the data stores to use
+ with Compute. For example, "nas.*". If you want to use all available datastores,
+ leave this field blank
+ label: Datastore regexp
+ regex:
+ error: Invalid datastore regexp
+ source: ^(\S.*\S|\S|)$
+ type: text
+ value: ''
+ weight: 50
+ host_ip:
+ description: IP Address of vCenter
+ label: vCenter IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ type: text
+ value: ''
+ weight: 10
+ metadata:
+ label: vCenter
+ restrictions:
+ - action: hide
+ condition: settings:common.libvirt_type.value != 'vcenter'
+ weight: 20
+ use_vcenter:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 5
+ vc_password:
+ description: vCenter admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 30
+ vc_user:
+ description: vCenter admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ vlan_interface:
+ description: Physical ESXi host ethernet adapter for VLAN networking (e.g.
+ vmnic1). If empty "vmnic0" is used by default
+ label: ESXi VLAN interface
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'nova_network' or networking_parameters:net_manager
+ != 'VlanManager'
+ type: text
+ value: ''
+ weight: 60
+ zabbix:
+ metadata:
+ label: Zabbix Access
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 70
+ password:
+ description: Password for Zabbix Administrator
+ label: password
+ type: password
+ value: zabbix
+ weight: 20
+ username:
+ description: Username for Zabbix Administrator
+ label: username
+ type: text
+ value: admin
+ weight: 10
diff --git a/fuel/prototypes/auto-deploy/configs/lf_pod1/dha.yaml b/fuel/prototypes/auto-deploy/configs/lf_pod1/dha.yaml
new file mode 100644
index 000000000..9d02f5ce6
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/configs/lf_pod1/dha.yaml
@@ -0,0 +1,66 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version: 1.1
+created: Fri May 8 08:03:49 UTC 2015
+comment: Config for LF Pod1
+
+# Adapter to use for this definition
+adapter: ipmi
+
+# Node list.
+# Mandatory properties are id and role.
+# The MAC address of the PXE boot interface for Fuel is not
+# mandatory to be defined.
+# All other properties are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 00:25:b5:b0:00:ef
+ ipmiIp: 172.30.8.69
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 2
+ pxeMac: 00:25:b5:b0:00:cf
+ ipmiIp: 172.30.8.78
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 3
+ pxeMac: 00:25:b5:b0:00:8f
+ ipmiIp: 172.30.8.68
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 4
+ pxeMac: 00:25:b5:b0:00:6f
+ ipmiIp: 172.30.8.77
+ ipmiUser: admin
+ ipmiPass: octopus
+- id: 5
+ pxeMac: 00:25:b5:b0:00:4f
+ ipmiIp: 172.30.8.67
+ ipmiUser: admin
+ ipmiPass: octopus
+# Adding the Fuel node as node id 6 which may not be correct - please
+# adjust as needed.
+- id: 6
+ pxeMac: 52:54:00:dd:9c:43
+ libvirtName: fuel-opnfv
+ isFuel: yes
+
+# Deployment power on strategy
+# all: Turn on all nodes at once. There will be no correlation
+# between the DHA and DEA node numbering. MAC addresses
+# will be used to select the node roles though.
+# sequence: Turn on the nodes in sequence starting with the lowest order
+# node and wait for the node to be detected by Fuel. Not until
+# the node has been detected and assigned a role will the next
+# node be turned on.
+powerOnStrategy: sequence
+
+# If fuelCustomInstall is set to true, Fuel is assumed to be installed by
+# calling the DHA adapter function "dha_fuelCustomInstall()" with two
+# arguments: node ID and the ISO file name to deploy. The custom install
+# function is then to handle all necessary logic to boot the Fuel master
+# from the ISO and then return.
+# Allowed values: true, false
+
+fuelCustomInstall: true
diff --git a/fuel/prototypes/auto-deploy/configs/lf_pod1/fuel-opnfv.xml b/fuel/prototypes/auto-deploy/configs/lf_pod1/fuel-opnfv.xml
new file mode 100644
index 000000000..c121c3aae
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/configs/lf_pod1/fuel-opnfv.xml
@@ -0,0 +1,132 @@
+<domain type='kvm' id='13'>
+ <name>fuel-opnfv</name>
+ <uuid>de9d18ee-afc3-4b5a-8ede-3a007ffb3c2f</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ <bootmenu enable='yes'/>
+ </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='raw'/>
+ <source file='/home/images/fuel-opnfv.raw'/>
+ <backingStore/>
+ <target dev='vda' bus='virtio'/>
+ <alias name='virtio-disk0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <source file='/root/fueltmp/deploy-opnfv-64.iso'/>
+ <backingStore/>
+ <target dev='hdb' bus='ide' tray='open'/>
+ <readonly/>
+ <alias name='ide0-0-1'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+ </disk>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <alias name='usb0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <alias name='usb0'/>
+ <master startport='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <alias name='usb0'/>
+ <master startport='2'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <alias name='usb0'/>
+ <master startport='4'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'>
+ <alias name='pci.0'/>
+ </controller>
+ <controller type='ide' index='0'>
+ <alias name='ide0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <alias name='virtio-serial0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:dd:9c:43'/>
+ <source bridge='pxebr'/>
+ <target dev='vnet0'/>
+ <model type='virtio'/>
+ <alias name='net0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <source path='/dev/pts/2'/>
+ <target port='0'/>
+ <alias name='serial0'/>
+ </serial>
+ <console type='pty' tty='/dev/pts/2'>
+ <source path='/dev/pts/2'/>
+ <target type='serial' port='0'/>
+ <alias name='serial0'/>
+ </console>
+ <channel type='spicevmc'>
+ <target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
+ <alias name='channel0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ <alias name='sound0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </sound>
+ <video>
+ <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
+ <alias name='video0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <alias name='balloon0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </memballoon>
+ </devices>
+ <seclabel type='dynamic' model='selinux' relabel='yes'>
+ <label>system_u:system_r:svirt_t:s0:c28,c552</label>
+ <imagelabel>system_u:object_r:svirt_image_t:s0:c28,c552</imagelabel>
+ </seclabel>
+</domain>
+
diff --git a/fuel/prototypes/auto-deploy/configs/lf_pod1/jump1_networking.txt b/fuel/prototypes/auto-deploy/configs/lf_pod1/jump1_networking.txt
new file mode 100644
index 000000000..cf385639c
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/configs/lf_pod1/jump1_networking.txt
@@ -0,0 +1,4 @@
+bridge name bridge id STP enabled interfaces
+br0 8000.0025b5a0008f no enp8s0.0
+pxebr 8000.0025b5b000ff no enp7s0.0
+virbr0 8000.525400e134af yes virbr0-nic
diff --git a/fuel/prototypes/auto-deploy/create_templates/create_templates.sh b/fuel/prototypes/auto-deploy/create_templates/create_templates.sh
new file mode 100755
index 000000000..8a43930cd
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/create_templates.sh
@@ -0,0 +1,189 @@
+#!/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
+##############################################################################
+
+cleanup () {
+ if [ -n "$tmpDir" ]; then
+ rm -Rf $tmpDir
+ fi
+}
+
+trap cleanup exit
+
+error_exit () {
+ echo "Error: $@" >&2
+ exit 1
+}
+
+tmpDir=`mktemp -d /tmp/deaXXXX`
+
+export PATH=`dirname $0`:$PATH
+
+if [ $# -lt 2 ]; then
+ error_exit "`basename $0`: <deafile> <dhafile> <comment>"
+fi
+
+deafile=$1
+dhafile=$2
+shift 2
+
+if [ $# -ne 0 ]; then
+ comment="$@"
+else
+ comment=""
+fi
+
+if [ -f $deafile ]; then
+ error_exit "$deafile already exists"
+elif [ -f $dhafile ]; then
+ error_exit "$dhafile already exists"
+fi
+
+# Create headers
+
+cat >$deafile << EOF
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: `date`
+comment: $comment
+EOF
+
+cat >$dhafile << EOF
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version: 1.1
+created: `date`
+comment: $comment
+
+# Adapter to use for this definition
+adapter:
+
+# Node list.
+# Mandatory properties are id and role.
+# The MAC address of the PXE boot interface for Fuel is not
+# mandatory to be defined.
+# All other properties are adapter specific.
+
+EOF
+
+if [ `fuel env | tail -n +3 | grep -v '^$' | wc -l` -ne 1 ]; then
+ error_exit "Not exactly one environment"
+fi
+envId=`fuel env | tail -n +3 | grep -v '^$' | awk '{ print $1 }'`
+
+computeId=`fuel node | grep compute | grep True | head -1 | awk '{ print $1}'`
+controllerId=`fuel node | grep controller | grep True | head -1 | awk '{ print $1}'`
+
+if [ -z "$computeId" ]; then
+ error_exit "Could not find any compute node"
+elif [ -z "$controllerId" ]; then
+ error_exit "Could not find any controller node"
+fi
+
+fuel deployment --env $envId --download --dir $tmpDir > /dev/null || \
+ error_exit "Could not get deployment info"
+fuel settings --env $envId --download --dir $tmpDir > /dev/null || \
+ error_exit "Could not get settings"
+fuel network --env $envId --download --dir $tmpDir > /dev/null || \
+ error_exit "Could not get network settings"
+
+# Create node structure for DEA mapping to the DHA
+# Note! Nodes will be renumbered to always start with id 1
+echo "nodes:" >> $deafile
+echo "nodes:" >> $dhafile
+minNode=`fuel node | tail -n +3 | sed 's/ .*//' | sort -n | head -1`
+for realNodeId in `fuel node | tail -n +3 | sed 's/ .*//' | sort -n`
+do
+ nodeId=$[realNodeId - minNode + 1]
+ role=`fuel node --node-id $realNodeId | tail -n +3 | cut -d "|" -f 7 | sed 's/ //g'` || \
+ error_exit "Could not get role for node $realNodeId"
+
+ if [ -z "$role" ]; then
+ error_exit "Node $realNodeId has no role - is this environment really deployed?"
+ fi
+
+ fuel node --node-id $realNodeId --network --download --dir $tmpDir > /dev/null || \
+ error_exit "Could not get network info for node $controllerId"
+
+ generate_node_info.py $nodeId $role $tmpDir/node_${realNodeId}/interfaces.yaml $dhafile | \
+ grep -v "^nodes:" >> $deafile || \
+ error_exit "Could not extract info for node $realNodeId"
+done
+
+cat >>$dhafile <<EOF
+# Adding the Fuel node as node id $[nodeId + 1] which may not be correct - please
+# adjust as needed.
+EOF
+generate_fuel_node_info.py $[nodeId +1] $dhafile || \
+ error_exit "Could not extract info for the Fuel node"
+
+# Environment mode
+echo "environment_mode: `fuel env | tail -n +3 | cut -d "|" -f 4 | sed 's/ //g' | sed 's/ha_compact/ha/'`" \
+ >>$deafile || error_exit "Could not get environment mode"
+
+echo "environment_name: `fuel env | tail -n +3 | cut -d "|" -f 3 | sed 's/ //g'`" \
+ >>$deafile || error_exit "Could not get environment mode"
+
+reap_fuel_settings.py $deafile fuel || \
+ error_exit "Could not extract Fuel node settings"
+
+# TODO: Potentially move the network scheme into each node of the DEA nodes structure
+# TODO: instead (this may be too generic to support all node types)
+reap_network_scheme.py $tmpDir/deployment_${envId}/*controller_${controllerId}.yaml \
+ $deafile controller || error_exit "Could not extract network scheme for controller"
+
+# TODO: Potentially move the network scheme into each node of the DEA nodes structure
+# TODO: instead (this may be too generic to support all node types)
+reap_network_scheme.py $tmpDir/deployment_${envId}/compute_${computeId}.yaml $deafile \
+ compute || error_exit "Could not extract network scheme for compute"
+
+reap_opnfv_astute.py $tmpDir/deployment_${envId}/*controller_${controllerId}.yaml \
+ $tmpDir/deployment_${envId}/compute_${computeId}.yaml ${deafile} || \
+ error_exit "Could not extract opnfv info from astute"
+
+reap_network_settings.py $tmpDir/network_${envId}.yaml $deafile network || \
+ error_exit "Could not extract network settings"
+
+
+reap_settings.py $tmpDir/settings_${envId}.yaml $deafile settings || \
+ error_exit "Could not extract settings"
+
+# Last part of the DHA file
+cat >>$dhafile << EOF
+
+# Deployment power on strategy
+# all: Turn on all nodes at once. There will be no correlation
+# between the DHA and DEA node numbering. MAC addresses
+# will be used to select the node roles though.
+# sequence: Turn on the nodes in sequence starting with the lowest order
+# node and wait for the node to be detected by Fuel. Not until
+# the node has been detected and assigned a role will the next
+# node be turned on.
+powerOnStrategy: sequence
+
+# If fuelCustomInstall is set to true, Fuel is assumed to be installed by
+# calling the DHA adapter function "dha_fuelCustomInstall()" with two
+# arguments: node ID and the ISO file name to deploy. The custom install
+# function is then to handle all necessary logic to boot the Fuel master
+# from the ISO and then return.
+# Allowed values: true, false
+
+fuelCustomInstall: false
+EOF
+
+# Cleanup due to a currently unknown Fuel behavior adding this
+# output at certain stages, this information should not be present:
+sed -i '/ management_vip: ' $deafile
+sed -i '/ public_vip: ' $deafile
+
+
+echo "DEA file is available at $deafile"
+echo "DHA file is available at $dhafile (this is just a template)"
diff --git a/fuel/prototypes/auto-deploy/create_templates/generate_fuel_node_info.py b/fuel/prototypes/auto-deploy/create_templates/generate_fuel_node_info.py
new file mode 100755
index 000000000..845d2ab5b
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/generate_fuel_node_info.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 3:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <nodeid> <dhafile>\n")
+ sys.exit(1)
+
+nodeId=int(sys.argv[1])
+dhafile=sys.argv[2]
+
+f1 = open("/etc/fuel/astute.yaml", 'r')
+doc = yaml.load(f1)
+f1.close()
+
+dhaMac = doc["ADMIN_NETWORK"]["mac"]
+
+# Write contribution to DHA file
+f2 = open(dhafile, 'a')
+f2.write("- id: " + str(nodeId) + "\n")
+f2.write(" pxeMac: " + dhaMac + "\n")
+f2.write(" isFuel: yes\n")
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/create_templates/generate_node_info.py b/fuel/prototypes/auto-deploy/create_templates/generate_node_info.py
new file mode 100755
index 000000000..a475cdb1f
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/generate_node_info.py
@@ -0,0 +1,61 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 5:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <nodeid> <role> <infile> <dhafile>\n")
+ sys.exit(1)
+
+infile = sys.argv[3]
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+nodeId=int(sys.argv[1])
+nodeRole=sys.argv[2]
+dhafile=sys.argv[4]
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+out = {}
+
+node = {}
+node["id"] = nodeId
+node["role"] = nodeRole
+node["interfaces"] = {}
+
+
+for interface in doc:
+ iface = {}
+ networks = []
+ for network in interface["assigned_networks"]:
+ networks.append(network["name"])
+ if network["name"] == "fuelweb_admin":
+ dhaMac = interface["mac"]
+ if networks:
+ node["interfaces"][interface["name"]] = networks
+
+out = [node]
+
+sys.stdout.write(yaml.dump(out, default_flow_style=False))
+
+# Write contribution to DHA file
+f2 = open(dhafile, 'a')
+f2.write("- id: " + str(nodeId) + "\n")
+f2.write(" pxeMac: " + dhaMac + "\n")
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/create_templates/reap_fuel_settings.py b/fuel/prototypes/auto-deploy/create_templates/reap_fuel_settings.py
new file mode 100755
index 000000000..a8ddba9bc
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/reap_fuel_settings.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 3:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <outfile> <outnamespace>\n")
+ sys.exit(1)
+
+infile = "/etc/fuel/astute.yaml"
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+outfile = sys.argv[1]
+namespace = sys.argv[2]
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+out = {}
+out[namespace] = {}
+
+# Delete unique data
+del(doc["ADMIN_NETWORK"]["mac"])
+del(doc["ADMIN_NETWORK"]["interface"])
+
+for copy in [ "ADMIN_NETWORK", "HOSTNAME", "DNS_DOMAIN", "DNS_SEARCH",
+ "DNS_UPSTREAM", "NTP1", "NTP2", "NTP3", "ADMIN_NETWORK", "FUEL_ACCESS" ]:
+ out[namespace][copy] = doc[copy]
+
+f2 = open(outfile, 'a')
+f2.write(yaml.dump(out, default_flow_style=False))
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/create_templates/reap_network_scheme.py b/fuel/prototypes/auto-deploy/create_templates/reap_network_scheme.py
new file mode 100755
index 000000000..19c18bfc9
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/reap_network_scheme.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <infile> <outfile> <outnamespace>\n")
+ sys.exit(1)
+
+infile = sys.argv[1]
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+outfile = sys.argv[2]
+namespace = sys.argv[3]
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+out = {}
+out[namespace] = doc["network_scheme"]["transformations"]
+f2 = open(outfile, 'a')
+f2.write(yaml.dump(out, default_flow_style=False))
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/create_templates/reap_network_settings.py b/fuel/prototypes/auto-deploy/create_templates/reap_network_settings.py
new file mode 100755
index 000000000..b03a0634c
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/reap_network_settings.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <infile> <outfile> <outnamespace>\n")
+ sys.exit(1)
+
+infile = sys.argv[1]
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+outfile = sys.argv[2]
+namespace = sys.argv[3]
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+for nw in doc["networks"]:
+ try:
+ del nw["id"]
+ except:
+ pass
+
+ try:
+ del nw["group_id"]
+ except:
+ pass
+
+out = {}
+out[namespace] = doc
+f2 = open(outfile, 'a')
+f2.write(yaml.dump(out, default_flow_style=False))
+f2.close()
diff --git a/fuel/prototypes/auto-deploy/create_templates/reap_opnfv_astute.py b/fuel/prototypes/auto-deploy/create_templates/reap_opnfv_astute.py
new file mode 100755
index 000000000..55fad0555
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/reap_opnfv_astute.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <controllerfile> <computefile> <outfile>\n")
+ sys.exit(1)
+
+controller = sys.argv[1]
+if not os.path.exists(controller):
+ sys.stderr.write("ERROR: The file "+controller+" could not be opened\n")
+ sys.exit(1)
+
+compute = sys.argv[2]
+if not os.path.exists(compute):
+ sys.stderr.write("ERROR: The file "+compute+" could not be opened\n")
+ sys.exit(1)
+
+outfile = sys.argv[3]
+
+f_controller = open(controller, 'r')
+doc_controller = yaml.load(f_controller)
+f_controller.close()
+
+f_compute = open(compute, 'r')
+doc_compute = yaml.load(f_compute)
+f_compute.close()
+
+out = {}
+out["opnfv"] = {}
+out["opnfv"]["controller"] = doc_controller["opnfv"]
+out["opnfv"]["compute"] = doc_compute["opnfv"]
+
+f2 = open(outfile, 'a')
+f2.write(yaml.dump(out, default_flow_style=False))
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/create_templates/reap_settings.py b/fuel/prototypes/auto-deploy/create_templates/reap_settings.py
new file mode 100755
index 000000000..22794d245
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/create_templates/reap_settings.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <infile> <outfile> <outnamespace>\n")
+ sys.exit(1)
+
+infile = sys.argv[1]
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+outfile = sys.argv[2]
+namespace = sys.argv[3]
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+out = {}
+out[namespace] = doc
+f2 = open(outfile, 'a')
+f2.write(yaml.dump(out, default_flow_style=False))
+f2.close()
diff --git a/fuel/prototypes/auto-deploy/deploy/deploy.sh b/fuel/prototypes/auto-deploy/deploy/deploy.sh
new file mode 100755
index 000000000..f5aa634f9
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/deploy.sh
@@ -0,0 +1,193 @@
+#!/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
+##############################################################################
+
+# Setup locations
+topdir=$(dirname $(readlink -f $BASH_SOURCE))
+exampledir=$(cd $topdir/../examples; pwd)
+functions=${topdir}/functions
+
+# Define common functions
+. ${functions}/common.sh
+
+exit_handler() {
+ # Remove safety catch
+ kill -9 `ps -p $killpid -o pid --no-headers` \
+ `ps --ppid $killpid -o pid --no-headers`\
+ > /dev/null 2>&1
+}
+
+usage()
+{
+ cat <<EOF
+Syntax: `basename $0` [-nf] <isofile> <deafile> <dhafile>
+Arguments
+ -nf Do not install Fuel master
+EOF
+}
+
+
+# maximum allowed deploy time (default three hours)
+MAXDEPLOYTIME=${MAXDEPLOYTIME-3h}
+
+####### MAIN ########
+
+time0=`date +%s`
+
+if [ "`whoami`" != "root" ]; then
+ error_exit "You need be root to run this script"
+fi
+
+# Set initial veriables
+nofuel=1
+
+
+# Check for arguments
+if [ "$1" == "-nf" ]; then
+ nofuel=0
+ shift
+fi
+
+if [ $# -ne 3 ]; then
+ usage
+ exit 1
+fi
+
+# Setup tmpdir - if TMPDIR env variable is set, use that one
+# else create in $HOME/fueltmp
+if [ -n "${TMPDIR}" ]; then
+ if [ -d ${TMPDIR} ]; then
+ tmpdir=${TMPDIR}/fueltmp
+ echo "Using TMPDIR=${TMPDIR}, so tmpdir=${tmpdir}"
+ else
+ error_exit "No such directory for TMPDIR: ${TMPDIR}"
+ fi
+else
+ tmpdir=${HOME}/fueltmp
+ echo "Default: tmpdir=$tmpdir"
+fi
+
+# Umask must be changed so files created are readable by qemu
+umask 0022
+
+if [ -d $tmpdir ]; then
+ rm -Rf $tmpdir || error_exit "Could not remove tmpdir $tmpdir"
+fi
+mkdir $tmpdir || error_exit "Could not create tmpdir $tmpdir"
+
+isofile=$(cd `dirname $1`; echo `pwd`/`basename $1`)
+deafile=$(cd `dirname $2`; echo `pwd`/`basename $2`)
+dhafile=$(cd `dirname $3`; echo `pwd`/`basename $3`)
+
+if [ ! -f $isofile ]; then
+ error_exit "Could not find ISO file $isofile"
+elif [ ! -f $deafile ]; then
+ error_exit "Could not find DEA file $deafile"
+elif [ ! -f $dhafile ]; then
+ error_exit "Could not find DHA file $dhafile"
+fi
+
+# Connect adapter
+adapter=`grep "^adapter: " $dhafile | sed 's/.*: //'`
+if [ -z "$adapter" ]; then
+ error_exit "No adapter in DHA file!"
+elif [ ! -f $topdir/dha-adapters/${adapter}.sh ]; then
+ error_exit "Could not find adapter for $adapter"
+else
+ . $topdir/dha-adapters/${adapter}.sh $dhafile
+fi
+
+# Connect DEA API
+. ${topdir}/functions/dea-api.sh $deafile
+
+# Enable safety catch
+echo "Enabling auto-kill if deployment exceeds $MAXDEPLOYTIME"
+(sleep $MAXDEPLOYTIME; echo "Auto-kill of deploy after a timeout of $MAXDEPLOYTIME"; kill $$) &
+killpid=$!
+
+# Enable exit handler
+trap exit_handler exit
+
+# Get Fuel node information
+fuelIp=`dea getFuelIp` || error_exit "Could not get Fuel IP"
+fuelNetmask=`dea getFuelNetmask` || error_exit "Could not get Fuel netmask"
+fuelGateway=`dea getFuelGateway` || error_exit "Could not get Fuel Gateway"
+fuelHostname=`dea getFuelHostname` || error_exit "Could not get Fuel hostname"
+fuelDns=`dea getFuelDns` || error_exit "Could not get Fuel DNS"
+fuelNodeId=`dha getFuelNodeId` || error_exit "Could not get fuel node id"
+dha useFuelCustomInstall
+fuelCustom=$?
+
+# Stop all VMs
+for id in `dha getAllNodeIds`
+do
+ if [ $nofuel -eq 0 -o $fuelCustom -eq 0 ]; then
+ if [ $fuelNodeId -ne $id ]; then
+ echo "Powering off id $id"
+ dha nodePowerOff $id
+ fi
+ else
+ echo "Powering off id $id"
+ dha nodePowerOff $id
+ fi
+done
+
+# Install the Fuel master
+if [ $nofuel -eq 1 ]; then
+ echo "Patching iso file"
+
+ deployiso="${tmpdir}/deploy-`basename $isofile`"
+ ${functions}/patch-iso.sh $isofile $deployiso $tmpdir \
+ $fuelIp $fuelNetmask $fuelGateway $fuelHostname $fuelDns \
+ || error_exit "Failed to patch ISO"
+
+ # Swap isofiles from now on
+ isofile=$deployiso
+ if dha useFuelCustomInstall; then
+ echo "Custom Fuel install"
+ dha fuelCustomInstall $isofile || error_exit "Failed to run Fuel custom install"
+ else
+ echo "Ordinary Fuel install"
+ . ${functions}/install_iso.sh || error_exit "Failed to install Fuel"
+ fi
+else
+ echo "Not installing Fuel master"
+fi
+
+. ${functions}/deploy_env.sh
+
+echo "Waiting for one minute for deploy to stabilize"
+sleep 1m
+
+echo "Verifying node status after deployment"
+# Any node with non-ready status?
+ssh root@${fuelIp} fuel node 2>/dev/null | tail -n +3 | cut -d "|" -f 2 | \
+ sed 's/ //g' | grep -v ready | wc -l | grep -q "^0$"
+if [ $? -ne 0 ]; then
+ echo -e "Deploy failed to verify\n"
+ ssh root@${fuelIp} fuel node 2>/dev/null
+ error_exit "Exiting with error status"
+else
+ echo -e "Deployment verified\n"
+ ssh root@${fuelIp} fuel node 2>/dev/null
+ echo -e "\nNow running sanity and smoke health checks"
+ echo -e "\n\n"
+ ssh root@${fuelIp} fuel health --env ${envId} --check sanity,smoke \
+ --force
+ if [ $? -eq 0 ]; then
+ echo "Health checks passed!"
+ else
+ error_exit "One or several health checks failed!"
+ fi
+
+ time1=`date +%s`
+ echo "Total deployment time: $[(time1-time0)/60] minutes"
+ exit 0
+fi
diff --git a/fuel/prototypes/auto-deploy/deploy/dha-adapters/dhaParse.py b/fuel/prototypes/auto-deploy/deploy/dha-adapters/dhaParse.py
new file mode 100755
index 000000000..d2712c6d7
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/dha-adapters/dhaParse.py
@@ -0,0 +1,87 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+def test(arr):
+ print "Nodes"
+ nodes = doc["nodes"]
+ for node in nodes:
+ print "Node %d " % node["id"]
+ print " Mac: %s" % node["adminMac"]
+ print " Role: %s" % node["role"]
+
+def get(arg):
+ try:
+ if doc[arg[0]]:
+ print doc[arg[0]]
+ else:
+ print ""
+ except KeyError:
+ print ""
+
+def getNodes(arg):
+ for node in doc["nodes"]:
+ print node["id"]
+
+# Get property arg2 from arg1
+def getNodeProperty(arg):
+ id=arg[0]
+ key=arg[1]
+
+ for node in doc["nodes"]:
+ if node["id"] == int(id):
+ try:
+ if node[key]:
+ print node[key]
+ exit(0)
+ except:
+ print ""
+ exit(0)
+ exit(1)
+
+
+
+infile = sys.argv[1]
+
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+cmd = sys.argv[2]
+args = sys.argv[3:]
+
+if cmd == "test":
+ test(args)
+elif cmd == "getNodes":
+ getNodes(args)
+elif cmd == "getNodeProperty":
+ getNodeProperty(args)
+elif cmd == "get":
+ get(args)
+else:
+ print "No such command: %s" % cmd
+ exit(1)
+
+#print "Dumping"
+#print yaml.dump(doc, default_flow_style=False)
+
+#Functions:
+
+#getIdRole
diff --git a/fuel/prototypes/auto-deploy/deploy/dha-adapters/ipmi.sh b/fuel/prototypes/auto-deploy/deploy/dha-adapters/ipmi.sh
new file mode 100755
index 000000000..37deb024d
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/dha-adapters/ipmi.sh
@@ -0,0 +1,449 @@
+#!/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
+##############################################################################
+
+
+
+########################################################################
+# Internal functions BEGIN
+
+
+dha_f_err()
+{
+ local rc
+ local cmd
+
+ rc=$1
+ shift
+
+ echo "$@" >&2
+ echo "Exit with code $rc" >&2
+
+ exit $rc
+}
+
+dha_f_run()
+{
+ $@
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ dha_f_err $rc "running $@" >&2
+ exit $rc
+ fi
+}
+
+
+dha_f_ipmi()
+{
+
+ local nodeId
+ local ipmiIp
+ local ipmiUser
+ local ipmiPass
+ local i
+
+ nodeId=$1
+ shift
+
+ ipmiIp=$($DHAPARSE $DHAFILE getNodeProperty $nodeId ipmiIp)
+ ipmiUser=$($DHAPARSE $DHAFILE getNodeProperty $nodeId ipmiUser)
+ ipmiPass=$($DHAPARSE $DHAFILE getNodeProperty $nodeId ipmiPass)
+
+ test -n "$ipmiIp" || error_exit "Could not get IPMI IP"
+ test -n "$ipmiUser" || error_exit "Could not get IPMI username"
+ test -n "$ipmiPass" || error_exit "Could not get IPMI password"
+
+ # Repeat three times for good measure (some hardware seems
+ # weird)
+ for i in 1 2
+ do
+ ipmitool -I lanplus -A password -H $ipmiIp -U $ipmiUser -P $ipmiPass \
+ $@ >/dev/null 2>&1
+ sleep 1
+ done
+ ipmitool -I lanplus -A password -H $ipmiIp -U $ipmiUser -P $ipmiPass \
+ $@
+}
+
+# Internal functions END
+########################################################################
+
+
+true=0
+false=1
+
+# API: Get the DHA API version supported by this adapter
+dha_getApiVersion ()
+{
+ echo "1.0"
+}
+
+# API: Get the name of this adapter
+dha_getAdapterName ()
+{
+ echo "ipmi"
+}
+
+# API: ### Node identity functions ###
+# API: Node numbering is sequential.
+
+# API: Get a list of all defined node ids, sorted in ascending order
+dha_getAllNodeIds()
+{
+ dha_f_run $DHAPARSE $DHAFILE getNodes | sort -n
+}
+
+
+# API: Get ID for Fuel node ID
+dha_getFuelNodeId()
+{
+ for node in `dha_getAllNodeIds`
+ do
+ if [ -n "`dha_f_run $DHAPARSE $DHAFILE getNodeProperty $node isFuel`" ]
+ then
+ echo $node
+ fi
+ done
+}
+
+# API: Get node property
+# API: Argument 1: node id
+# API: Argument 2: Property
+dha_getNodeProperty()
+{
+ dha_f_run $DHAPARSE $DHAFILE getNodeProperty $1 $2
+}
+
+
+# API: Get MAC address for the PXE interface of this node. If not
+# API: defined, an empty string will be returned.
+# API: Argument 1: Node id
+dha_getNodePxeMac()
+{
+ dha_getNodeProperty $1 pxeMac
+}
+
+
+### Node operation functions ###
+
+# API: Use custom installation method for Fuel master?
+# API: Returns 0 if true, 1 if false
+dha_useFuelCustomInstall()
+{
+ $DHAPARSE $DHAFILE get fuelCustomInstall | grep -qi true
+ rc=$?
+ return $rc
+}
+
+# API: Fuel custom installation method
+# API: Leaving the Fuel master powered on and booting from ISO at exit
+# API: Argument 1: Full path to ISO file to install
+dha_fuelCustomInstall()
+{
+ if [ ! -e $1 ]; then
+ error_exit "Could not access ISO file $1"
+ fi
+
+ dha_useFuelCustomInstall || dha_f_err 1 "dha_fuelCustomInstall not supported"
+
+ fuelIp=`dea getFuelIp` || error_exit "Could not get fuel IP"
+ fuelNodeId=`dha getFuelNodeId` || error_exit "Could not get fuel node id"
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $fuelNodeId libvirtName`
+
+ # Power off the node
+ virsh destroy $virtName
+ sleep 5
+
+ # Zero the MBR
+ fueldisk=`virsh dumpxml $virtName | \
+ grep "<source file" | grep raw | sed "s/.*'\(.*\)'.*/\1/"`
+ disksize=`ls -l $fueldisk | awk '{ print $5 }'`
+ rm -f $fueldisk
+ fallocate -l $disksize $fueldisk
+
+ # Set the boot order
+ for order in disk iso
+ do
+ if [ "$order" == "pxe" ]; then
+ bootline+="<boot dev='network'\/>\n"
+ elif [ "$order" == "disk" ]; then
+ bootline+="<boot dev='hd'/\>\n"
+ elif [ "$order" == "iso" ]; then
+ bootline+="<boot dev='cdrom'/\>\n"
+ else
+ error_exit "Unknown boot type: $order"
+ fi
+ done
+
+ virsh dumpxml $virtName | grep -v "<boot dev.*>" | \
+ sed "/<\/os>/i\
+ ${bootline}" > $tmpdir/vm.xml || error_exit "Could not set bootorder"
+ virsh define $tmpdir/vm.xml || error_exit "Could not set bootorder"
+
+
+ # Get name of CD device
+ cdDev=`virsh domblklist $virtName | tail -n +3 | awk '{ print $1 }' | grep ^hd`
+
+ # Eject and insert ISO
+ virsh change-media $virtName --config --eject $cdDev
+ sleep 5
+ virsh change-media $virtName --config --insert $cdDev $1 || error_exit "Could not insert CD $1"
+ sleep 5
+
+ virsh start $virtName || error_exit "Could not start $virtName"
+ sleep 5
+
+ # wait for node up
+ echo "Waiting for Fuel master to accept SSH"
+ while true
+ do
+ ssh root@${fuelIp} date 2>/dev/null
+ if [ $? -eq 0 ]; then
+ break
+ fi
+ sleep 10
+ done
+
+ # Wait until fuelmenu is up
+ echo "Waiting for fuelmenu to come up"
+ menuPid=""
+ while [ -z "$menuPid" ]
+ do
+ menuPid=`ssh root@${fuelIp} "ps -ef" 2>&1 | grep fuelmenu | grep -v grep | awk '{ print $2 }'`
+ sleep 10
+ done
+
+ # This is where we inject our own astute.yaml settings
+ scp -q $deafile root@${fuelIp}:. || error_exit "Could not copy DEA file to Fuel"
+ echo "Uploading build tools to Fuel server"
+ ssh root@${fuelIp} rm -rf tools || error_exit "Error cleaning old tools structure"
+ scp -qrp $topdir/tools root@${fuelIp}:. || error_exit "Error copying tools"
+ echo "Running transplant #0"
+ ssh root@${fuelIp} "cd tools; ./transplant0.sh ../`basename $deafile`" \
+ || error_exit "Error running transplant sequence #0"
+
+
+
+ # Let the Fuel deployment continue
+ echo "Found menu as PID $menuPid, now killing it"
+ ssh root@${fuelIp} "kill $menuPid" 2>/dev/null
+
+ # Wait until installation complete
+ echo "Waiting for bootstrap of Fuel node to complete"
+ while true
+ do
+ ssh root@${fuelIp} "ps -ef" 2>/dev/null \
+ | grep -q /usr/local/sbin/bootstrap_admin_node
+ if [ $? -ne 0 ]; then
+ break
+ fi
+ sleep 10
+ done
+
+ echo "Waiting for one minute for Fuel to stabilize"
+ sleep 1m
+
+}
+
+# API: Get power on strategy from DHA
+# API: Returns one of two values:
+# API: all: Power on all nodes simultaneously
+# API: sequence: Power on node by node, wait for Fuel detection
+dha_getPowerOnStrategy()
+{
+ local strategy
+
+ strategy=`$DHAPARSE $DHAFILE get powerOnStrategy`
+
+ if [ "$strategy" == "all" ]; then
+ echo $strategy
+ elif
+ [ "$strategy" == "sequence" ]; then
+ echo $strategy
+ else
+ dha_f_err 1 "Could not parse strategy from DHA, got $strategy"
+ fi
+}
+
+# API: Power on node
+# API: Argument 1: node id
+dha_nodePowerOn()
+{
+ local nodeId
+
+ nodeId=$1
+ state=$(dha_f_ipmi $1 chassis power status) || error_exit "Could not get IPMI power status"
+ echo "state $state"
+
+
+ if [ "$(echo $state | sed 's/.* //')" == "off" ]; then
+ dha_f_ipmi $1 chassis power on
+ fi
+}
+
+# API: Power off node
+# API: Argument 1: node id
+dha_nodePowerOff()
+{
+ local nodeId
+
+ nodeId=$1
+ state=$(dha_f_ipmi $1 chassis power status) || error_exit "Could not get IPMI power status"
+ echo "state $state"
+
+
+ if [ "$(echo $state | sed 's/.* //')" != "off" ]; then
+ dha_f_ipmi $1 chassis power off
+ fi
+}
+
+# API: Reset node
+# API: Argument 1: node id
+dha_nodeReset()
+{
+ local nodeId
+
+ nodeId=$1
+ state=$(dha_f_ipmi $1 chassis power reset) || error_exit "Could not get IPMI power status"
+ echo "state $state"
+
+
+ if [ "$(echo $state | sed 's/.* //')" != "off" ]; then
+ dha_f_ipmi $1 chassis power reset
+ fi
+}
+
+# Boot order and ISO boot file
+
+# API: Is the node able to commit boot order without power toggle?
+# API: Argument 1: node id
+# API: Returns 0 if true, 1 if false
+dha_nodeCanSetBootOrderLive()
+{
+ return $true
+}
+
+# API: Set node boot order
+# API: Argument 1: node id
+# API: Argument 2: Space separated line of boot order - boot ids are "pxe", "disk" and "iso"
+# Strategy for IPMI: Always set boot order to persistent except in the case of CDROM.
+dha_nodeSetBootOrder()
+{
+ local id
+ local order
+
+ id=$1
+ shift
+ order=$1
+
+ if [ "$order" == "pxe" ]; then
+ dha_f_ipmi $id chassis bootdev pxe options=persistent || error_exit "Could not get IPMI power status"
+ elif [ "$order" == "iso" ]; then
+ dha_f_ipmi $id chassis bootdev cdrom || error_exit "Could not get IPMI power status"
+ elif [ "$order" == "disk" ]; then
+ dha_f_ipmi $id chassis bootdev disk options=persistent || error_exit "Could not get IPMI power status"
+ else
+ error_exit "Unknown boot type: $order"
+ fi
+}
+
+# API: Is the node able to operate on ISO media?
+# API: Argument 1: node id
+# API: Returns 0 if true, 1 if false
+dha_nodeCanSetIso()
+{
+ return $false
+}
+
+# API: Is the node able to insert add eject ISO files without power toggle?
+# API: Argument 1: node id
+# API: Returns 0 if true, 1 if false
+dha_nodeCanHandeIsoLive()
+{
+ return $false
+}
+
+# API: Insert ISO into virtualDVD
+# API: Argument 1: node id
+# API: Argument 2: iso file
+dha_nodeInsertIso()
+{
+ error_exit "Node can not handle InsertIso"
+}
+
+# API: Eject ISO from virtual DVD
+# API: Argument 1: node id
+dha_nodeEjectIso()
+{
+ error_exit "Node can not handle InsertIso"
+}
+
+# API: Wait until a suitable time to change the boot order to
+# API: "disk iso" when ISO has been booted. Can't be too long, nor
+# API: too short...
+# API: We should make a smart trigger for this somehow...
+dha_waitForIsoBoot()
+{
+ echo "waitForIsoBoot: Not used by ipmi"
+}
+
+# API: Is the node able to reset its MBR?
+# API: Returns 0 if true, 1 if false
+dha_nodeCanZeroMBR()
+{
+ return $false
+}
+
+# API: Reset the node's MBR
+dha_nodeZeroMBR()
+{
+ error_exit "Node $1 does not support ZeroMBR"
+}
+
+
+# API: Entry point for dha functions
+# API: Typically do not call "dha_node_zeroMBR" but "dha node_ZeroMBR"
+# API:
+# API: Before calling dha, the adapter file must gave been sourced with
+# API: the DHA file name as argument
+dha()
+{
+ if [ -z "$DHAFILE" ]; then
+ error_exit "dha_setup has not been run"
+ fi
+
+
+ if type dha_$1 &>/dev/null; then
+ cmd=$1
+ shift
+ dha_$cmd $@
+ return $?
+ else
+ error_exit "No such function dha_$1 defined"
+ fi
+}
+
+if [ "$1" == "api" ]; then
+ egrep "^# API: |dha.*\(\)" $0 | sed 's/^# API: /# /' | grep -v dha_f_ | sed 's/)$/)\n/'
+else
+ dhatopdir=$(dirname $(readlink -f $BASH_SOURCE))
+ DHAPARSE="$dhatopdir/dhaParse.py"
+ DHAFILE=$1
+
+ if [ ! -f $DHAFILE ]; then
+ error_exit "No such DHA file: $DHAFILE"
+ else
+ echo "Adapter init"
+ echo "$@"
+ echo "DHAPARSE: $DHAPARSE"
+ echo "DHAFILE: $DHAFILE"
+ fi
+
+fi
diff --git a/fuel/prototypes/auto-deploy/deploy/dha-adapters/libvirt.sh b/fuel/prototypes/auto-deploy/deploy/dha-adapters/libvirt.sh
new file mode 100755
index 000000000..8d9edde3f
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/dha-adapters/libvirt.sh
@@ -0,0 +1,334 @@
+#!/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
+##############################################################################
+
+
+
+########################################################################
+# Internal functions BEGIN
+
+
+dha_f_err()
+{
+ local rc
+ local cmd
+
+ rc=$1
+ shift
+
+ echo "$@" >&2
+ echo "Exit with code $rc" >&2
+
+ exit $rc
+}
+
+dha_f_run()
+{
+ $@
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ dha_f_err $rc "running $@" >&2
+ exit $rc
+ fi
+}
+
+# Internal functions END
+########################################################################
+
+
+true=0
+false=1
+
+# API: Get the DHA API version supported by this adapter
+dha_getApiVersion ()
+{
+ echo "1.0"
+}
+
+# API: Get the name of this adapter
+dha_getAdapterName ()
+{
+ echo "libvirt"
+}
+
+# API: ### Node identity functions ###
+# API: Node numbering is sequential.
+
+# API: Get a list of all defined node ids, sorted in ascending order
+dha_getAllNodeIds()
+{
+ dha_f_run $DHAPARSE $DHAFILE getNodes | sort -n
+}
+
+
+# API: Get ID for Fuel node ID
+dha_getFuelNodeId()
+{
+ for node in `dha_getAllNodeIds`
+ do
+ if [ -n "`dha_f_run $DHAPARSE $DHAFILE getNodeProperty $node isFuel`" ]
+ then
+ echo $node
+ fi
+ done
+}
+
+# API: Get node property
+# API: Argument 1: node id
+# API: Argument 2: Property
+dha_getNodeProperty()
+{
+ dha_f_run $DHAPARSE $DHAFILE getNodeProperty $1 $2
+}
+
+
+# API: Get MAC address for the PXE interface of this node. If not
+# API: defined, an empty string will be returned.
+# API: Argument 1: Node id
+dha_getNodePxeMac()
+{
+ dha_getNodeProperty $1 pxeMac
+}
+
+
+### Node operation functions ###
+
+# API: Use custom installation method for Fuel master?
+# API: Returns 0 if true, 1 if false
+dha_useFuelCustomInstall()
+{
+ $DHAPARSE $DHAFILE get fuelCustomInstall | grep -qi true
+ rc=$?
+ return $rc
+}
+
+# API: Fuel custom installation method
+# API: Leaving the Fuel master powered on and booting from ISO at exit
+# API: Argument 1: Full path to ISO file to install
+dha_fuelCustomInstall()
+{
+ dha_useFuelCustomInstall || dha_f_err 1 "dha_fuelCustomInstall not supported"
+ date
+}
+
+# API: Get power on strategy from DHA
+# API: Returns one of two values:
+# API: all: Power on all nodes simultaneously
+# API: sequence: Power on node by node, wait for Fuel detection
+dha_getPowerOnStrategy()
+{
+ local strategy
+
+ strategy=`$DHAPARSE $DHAFILE get powerOnStrategy`
+
+ if [ "$strategy" == "all" ]; then
+ echo $strategy
+ elif
+ [ "$strategy" == "sequence" ]; then
+ echo $strategy
+ else
+ dha_f_err 1 "Could not parse strategy from DHA, got $strategy"
+ fi
+}
+
+
+# API: Power on node
+# API: Argument 1: node id
+dha_nodePowerOn()
+{
+ local state
+ local virtName
+
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $1 libvirtName`
+ state=`virsh domstate $virtName`
+ if [ "$state" == "shut off" ]; then
+ dha_f_run virsh start $virtName
+ fi
+}
+
+# API: Power off node
+# API: Argument 1: node id
+dha_nodePowerOff()
+{
+ local state
+ local virtName
+
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $1 libvirtName`
+ state=`virsh domstate $virtName`
+ if [ "$state" != "shut off" ]; then
+ dha_f_run virsh destroy $virtName
+ fi
+}
+
+# API: Reset node
+# API: Argument 1: node id
+dha_nodeReset()
+{
+ local virtName
+
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $1 libvirtName`
+ dha_f_run virsh reset $virtName
+}
+
+# Boot order and ISO boot file
+
+# API: Is the node able to commit boot order without power toggle?
+# API: Argument 1: node id
+# API: Returns 0 if true, 1 if false
+dha_nodeCanSetBootOrderLive()
+{
+ return $false
+}
+
+# API: Set node boot order
+# API: Argument 1: node id
+# API: Argument 2: Space separated line of boot order - boot ids are "pxe", "disk" and "iso"
+dha_nodeSetBootOrder()
+{
+ local id
+ local bootline
+ local virtName
+ local order
+
+ id=$1
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $1 libvirtName`
+ shift
+
+ for order in $@
+ do
+ if [ "$order" == "pxe" ]; then
+ bootline+="<boot dev='network'\/>\n"
+ elif [ "$order" == "disk" ]; then
+ bootline+="<boot dev='hd'/\>\n"
+ elif [ "$order" == "iso" ]; then
+ bootline+="<boot dev='cdrom'/\>\n"
+ else
+ error_exit "Unknown boot type: $order"
+ fi
+ done
+ echo $bootline
+
+ virsh dumpxml $virtName | grep -v "<boot dev.*>" | \
+ sed "/<\/os>/i\
+ ${bootline}" > $tmpdir/vm.xml || error_exit "Could not set bootorder"
+ virsh define $tmpdir/vm.xml || error_exit "Could not set bootorder"
+
+}
+
+# API: Is the node able to operate on ISO media?
+# API: Argument 1: node id
+# API: Returns 0 if true, 1 if false
+dha_nodeCanSetIso()
+{
+ return $true
+}
+
+# API: Is the node able to insert add eject ISO files without power toggle?
+# API: Argument 1: node id
+# API: Returns 0 if true, 1 if false
+dha_nodeCanHandeIsoLive()
+{
+ return $true
+}
+
+# API: Insert ISO into virtualDVD
+# API: Argument 1: node id
+# API: Argument 2: iso file
+dha_nodeInsertIso()
+{
+ local virtName
+ local isoFile
+
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $1 libvirtName`
+ isoFile=$2
+ virsh change-media $virtName --insert hdc $isoFile
+}
+
+# API: Eject ISO from virtual DVD
+# API: Argument 1: node id
+dha_nodeEjectIso()
+{
+ local virtName
+ local isoFile
+
+ virtName=`$DHAPARSE $DHAFILE getNodeProperty $1 libvirtName`
+ isoFile=$2
+ virsh change-media $virtName --eject hdc
+}
+
+# API: Wait until a suitable time to change the boot order to
+# API: "disk iso" when ISO has been booted. Can't be too long, nor
+# API: too short...
+# API: We should make a smart trigger for this somehow...
+dha_waitForIsoBoot()
+{
+ echo "waitForIsoBoot: No delay necessary for libvirt"
+}
+
+# API: Is the node able to reset its MBR?
+# API: Returns 0 if true, 1 if false
+dha_nodeCanZeroMBR()
+{
+ return $true
+}
+
+# API: Reset the node's MBR
+dha_nodeZeroMBR()
+{
+ local fueldisk
+ local disksize
+
+ fueldisk=`virsh dumpxml $(dha_getNodeProperty $1 libvirtName) | \
+ grep "<source file" | grep raw | sed "s/.*'\(.*\)'.*/\1/"`
+ disksize=`ls -l $fueldisk | awk '{ print $5 }'`
+ rm -f $fueldisk
+ fallocate -l $disksize $fueldisk
+}
+
+
+# API: Entry point for dha functions
+# API: Typically do not call "dha_node_zeroMBR" but "dha node_ZeroMBR"
+# API:
+# API: Before calling dha, the adapter file must gave been sourced with
+# API: the DHA file name as argument
+dha()
+{
+ if [ -z "$DHAFILE" ]; then
+ error_exit "dha_setup has not been run"
+ fi
+
+
+ if type dha_$1 &>/dev/null; then
+ cmd=$1
+ shift
+ dha_$cmd $@
+ return $?
+ else
+ error_exit "No such function dha_$1 defined"
+ fi
+}
+
+if [ "$1" == "api" ]; then
+ egrep "^# API: |dha.*\(\)" $0 | sed 's/^# API: /# /' | grep -v dha_f_ | sed 's/)$/)\n/'
+else
+ dhatopdir=$(dirname $(readlink -f $BASH_SOURCE))
+ DHAPARSE="$dhatopdir/dhaParse.py"
+ DHAFILE=$1
+
+ if [ ! -f $DHAFILE ]; then
+ error_exit "No such DHA file: $DHAFILE"
+ else
+ echo "Adapter init"
+ echo "$@"
+ echo "DHAPARSE: $DHAPARSE"
+ echo "DHAFILE: $DHAFILE"
+ fi
+
+fi
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/common.sh b/fuel/prototypes/auto-deploy/deploy/functions/common.sh
new file mode 100755
index 000000000..6947d796f
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/common.sh
@@ -0,0 +1,67 @@
+##############################################################################
+# 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
+##############################################################################
+
+# Common functions
+
+error_exit () {
+ echo "Error: $@" >&2
+ exit 1
+}
+
+ssh() {
+ SSHPASS="r00tme" sshpass -e ssh -o UserKnownHostsFile=${tmpdir}/known_hosts \
+ -o StrictHostKeyChecking=no -o ConnectTimeout=15 "$@"
+}
+
+scp() {
+ SSHPASS="r00tme" sshpass -e scp -o UserKnownHostsFile=${tmpdir}/known_hosts \
+ -o StrictHostKeyChecking=no -o ConnectTimeout=15 "$@"
+}
+
+
+fuel () {
+ ssh root@`dea getFuelIp` "fuel $@"
+}
+
+
+# TODO: Move numberOfNodes into the DEA API
+numberOfNodes() {
+ fuel node | tail -n +3 | grep -v "^$" | wc -l
+}
+
+# TODO: Move numberOfNodesUp into the DEA API
+numberOfNodesUp() {
+ fuel node | tail -n +3 | grep -v "^$" | grep True | wc -l
+}
+
+# Currently not used!
+# Wait for node count to increase
+waitForNode() {
+ local cnt
+ local initCnt
+ local expectCnt
+
+ initCnt=`numberOfNodesUp`
+ expectCnt=$[initCnt+1]
+ while true
+ do
+ cnt=`numberOfNodesUp`
+ if [ $cnt -eq $expectCnt ]; then
+ break
+ elif [ $cnt -lt $initCnt ]; then
+ error_exit "Node count decreased while waiting, $initCnt -> $cnt"
+ elif [ $cnt -gt $expectCnt ]; then
+ error_exit "Node count exceeded expect count, $cnt > $expectCnt"
+ fi
+ sleep 10
+ echo -n "[${cnt}]"
+ done
+ echo "[${cnt}]"
+}
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/dea-api.sh b/fuel/prototypes/auto-deploy/deploy/functions/dea-api.sh
new file mode 100755
index 000000000..61d670f92
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/dea-api.sh
@@ -0,0 +1,171 @@
+#!/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
+##############################################################################
+
+
+
+########################################################################
+# Internal functions BEGIN
+
+
+
+dea_f_err()
+{
+ local rc
+ local cmd
+
+ rc=$1
+ shift
+
+ if [ -n "$rc" ]; then
+ echo "Error ($rc): $@" >&2
+ else
+ echo "Error: $@" >&2
+ fi
+}
+
+dea_f_run()
+{
+ $@
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ dea_f_err $rc "Error running $@"
+ return $rc
+ fi
+}
+
+# Internal functions END
+########################################################################
+
+true=0
+false=1
+
+# API: Get the DEA API version supported by this adapter
+dea_getApiVersion ()
+{
+ echo "1.0"
+}
+
+
+# API: Node numbering is sequential.
+
+
+# API: Get the role for this node
+# API: Argument 1: node id
+dea_getNodeRole()
+{
+ $DEAPARSE $DEAFILE getNodeRole $@
+
+}
+
+# API: Get IP address of Fuel master
+dea_getFuelIp()
+{
+ $DEAPARSE $DEAFILE getProperty fuel ADMIN_NETWORK ipaddress
+}
+
+# API: Get netmask Fuel master
+dea_getFuelNetmask()
+{
+ $DEAPARSE $DEAFILE getProperty fuel ADMIN_NETWORK netmask
+}
+
+# API: Get gateway address of Fuel master
+# FIXME: This is currently not in the DEA, so make the gatway the ..1
+# FiXME: of the IP
+dea_getFuelGateway()
+{
+ $DEAPARSE $DEAFILE getProperty fuel ADMIN_NETWORK ipaddress | \
+ sed 's/.[0-9]*$/.1/'
+}
+
+# API: Get gateway address of Fuel master
+dea_getFuelHostname()
+{
+ $DEAPARSE $DEAFILE getProperty fuel HOSTNAME
+}
+
+# API: Get DNS address of Fuel master
+dea_getFuelDns()
+{
+ $DEAPARSE $DEAFILE getProperty fuel DNS_UPSTREAM
+}
+
+# API: Convert a normal MAC to a Fuel short mac for --node-id
+dea_convertMacToShortMac()
+{
+ echo $1 | sed 's/.*..:..:..:..:\(..:..\).*/\1/' | tr [A-Z] [a-z]
+}
+
+
+# API: Get property from DEA file
+# API: Argument 1: search path, as e.g. "fuel ADMIN_NETWORK ipaddress"
+dea_getProperty()
+{
+ $DEAPARSE $DEAFILE getProperty $@
+}
+
+# API: Convert DHA node id to Fuel cluster node id
+# API: Look for lowest Fuel node number, this will be DHA node 1
+# API: Argument: node id
+dea_getClusterNodeId()
+{
+ local baseId
+ local inId
+ local fuelIp
+
+ inId=$1
+ fuelIp=`dea_getFuelIp`
+
+ baseId=`ssh root@${fuelIp} fuel node | tail -n +3 | awk '{ print $1 }'| sed 's/ //g' | sort -n | head -1`
+ echo "$[inId + baseId - 1]"
+}
+
+# API: Entry point for dea functions
+# API: Typically do not call "dea_node_zeroMBR" but "dea node_ZeroMBR"
+# API:
+# API: Before calling dea, the adapter file must gave been sourced with
+# API: the DEA file name as argument
+dea()
+{
+ if [ -z "$DEAFILE" ]; then
+ error_exit "dea_setup has not been run"
+ fi
+
+
+ if type dea_$1 &>/dev/null; then
+ cmd=$1
+ shift
+ dea_$cmd $@
+ return $?
+ else
+ error_exit "No such function dea_$1 defined"
+ fi
+}
+
+if [ "$1" == "api" ]; then
+ egrep "^# API: |dea.*\(\)" $0 | sed 's/^# API: /# /' | grep -v dea_f_ | sed 's/)$/)\n/'
+else
+ deatopdir=$(dirname $(readlink -f $BASH_SOURCE))
+ DEAPARSE="$deatopdir/deaParse.py"
+ DEAFILE=$1
+
+ if [ ! -f $DEAFILE ]; then
+ error_exit "No such DEA file: $DEAFILE"
+ else
+ echo "Adapter init"
+ echo "$@"
+ echo "DEAPARSE: $DEAPARSE"
+ echo "DEAFILE: $DEAFILE"
+ fi
+fi
+
+
+
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/deaParse.py b/fuel/prototypes/auto-deploy/deploy/functions/deaParse.py
new file mode 100755
index 000000000..7ca650171
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/deaParse.py
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+def test(arr):
+ print "Nodes"
+ nodes = doc["nodes"]
+ for node in nodes:
+ print "Node %d " % node["id"]
+ print " Mac: %s" % node["adminMac"]
+ print " Role: %s" % node["role"]
+
+def getNodeRole(arg):
+ for node in doc["nodes"]:
+ print node
+ try:
+ if node["role"] == arg[0]:
+ print doc["id"]
+ except KeyError:
+ exit(1)
+
+def getNodes(arg):
+ for node in doc["nodes"]:
+ print node["id"]
+
+
+def getProperty(arg):
+ result = doc
+ for level in arg:
+ result = result[level]
+ print result
+
+def getNodeRole(arg):
+ for node in doc["nodes"]:
+ if int(arg[0]) == node["id"]:
+ print node["role"]
+
+def getNode(arg):
+ id=arg[0]
+ key=arg[1]
+ for node in doc["nodes"]:
+ if int(node["id"]) == int(id):
+ print node[key]
+
+ # for node in doc["nodes"]:
+ # if int(node["id"]) == int(arg[0]):
+ # print node
+
+infile = sys.argv[1]
+
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+
+f1 = open(infile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+cmd = sys.argv[2]
+args = sys.argv[3:]
+
+if cmd == "getProperty":
+ getProperty(args)
+elif cmd == "getNodeRole":
+ getNodeRole(args)
+elif cmd == "getNode":
+ getNode(args)
+elif cmd == "get":
+ get(args)
+else:
+ print "No such command: %s" % cmd
+ exit(1)
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/deploy_env.sh b/fuel/prototypes/auto-deploy/deploy/functions/deploy_env.sh
new file mode 100755
index 000000000..e650f4d6e
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/deploy_env.sh
@@ -0,0 +1,140 @@
+##############################################################################
+# 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
+##############################################################################
+
+# Deploy!
+scp -q $deafile root@${fuelIp}:. || error_exit "Could not copy DEA file to Fuel"
+echo "Uploading build tools to Fuel server"
+ssh root@${fuelIp} rm -rf tools || error_exit "Error cleaning old tools structure"
+scp -qrp $topdir/tools root@${fuelIp}:. || error_exit "Error copying tools"
+
+echo "Uploading templating tols to Fuel server"
+ssh root@${fuelIp} rm -rf create_templates || error_exit "Error cleaning old create_templates structure"
+scp -qrp $topdir/../create_templates root@${fuelIp}:. || error_exit "Error copying create_templates"
+
+# Refuse to run if environment already present
+envcnt=`fuel env | tail -n +3 | grep -v '^$' | wc -l`
+if [ $envcnt -ne 0 ]; then
+ error_exit "Environment count is $envcnt"
+fi
+
+# Refuse to run if any nodes are up
+nodeCnt=`numberOfNodesUp`
+if [ $nodeCnt -ne 0 ]; then
+ error_exit "Nodes are up (node count: $nodeCnt)"
+fi
+
+# FIXME: Add support for CentOS creation here
+# Extract release ID for Ubuntu environment
+ubuntucnt=`fuel release | grep Ubuntu | wc -l`
+if [ $ubuntucnt -ne 1 ]; then
+ error_exit "Not exacly one Ubuntu release found"
+fi
+
+# FIXME: Make release a property in the dea.yaml and use that instead!
+ubuntuid=`fuel release | grep Ubuntu | awk '{ print $1 }'`
+
+# Create environment
+envName=`dea getProperty environment_name` || error_exit "Could not get environment name"
+envMode=`dea getProperty environment_mode` || error_exit "Could not get environment mode"
+
+fuel env create --name $envName \
+ --rel $ubuntuid \
+ --mode $envMode \
+ --network-mode neutron \
+ --net-segment-type vlan \
+ || error_exit "Error creating environment"
+
+envId=`ssh root@${fuelIp} fuel env | tail -n +3 | awk '{ print $1 }'` \
+ || error_exit "Could not get environment id"
+
+echo "Running transplant #1"
+ssh root@${fuelIp} "cd tools; ./transplant1.sh ../`basename $deafile`" \
+ || error_exit "Error running transplant sequence #1"
+
+# Start VMs
+strategy=`dha getPowerOnStrategy` || error_exit "Could not get power on strategy"
+if [ $strategy == "all" ]; then
+ echo "Starting all nodes at once"
+ poweredOn=0
+ for id in `dha getAllNodeIds`
+ do
+ if [ $id -ne $fuelNodeId ]; then
+ echo "Setting boot order pxe disk for node $id"
+ dha nodeSetBootOrder $id "pxe disk" || "Could not set boot order for node"
+ echo "Powering on node $id"
+ dha nodePowerOn $id || error_exit "Could not power on node"
+ poweredOn=$[poweredOn + 1]
+ fi
+ done
+ # Wait for all nodes to be accounted for
+ echo "Waiting for $poweredOn nodes to come up"
+ while true
+ do
+ nodesUp=`numberOfNodesUp`
+ echo -n "[${nodesUp}]"
+ if [ $nodesUp -eq $poweredOn ]; then
+ break
+ fi
+ sleep 10
+ done
+ echo "[${nodesUp}]"
+else
+ # Refuse to run if any nodes are defined
+ totalNodeCnt=`numberOfNodes`
+ if [ $totalNodeCnt -ne 0 ]; then
+ error_exit "There are already ${totalNodeCnt} defined nodes, can not run power on in sequence!"
+ fi
+ echo "Starting nodes sequentially, waiting for Fuel detection until proceeding"
+ for id in `dha getAllNodeIds`
+ do
+ if [ $id -ne $fuelNodeId ]; then
+ echo "Setting boot order pxe disk for node $id"
+ dha nodeSetBootOrder $id "pxe disk" || "Could not set boot order for node"
+ echo "Powering on node $id"
+ dha nodePowerOn $id || error_exit "Could not power on node"
+ # Wait for node count to increase
+ waitForNode
+ fi
+ done
+fi
+
+# Set roles for detected hosts
+for id in `dha getAllNodeIds`
+do
+ # If not a Fuel node
+ if [ $fuelNodeId -ne $id ]; then
+ longMac=`dha getNodePxeMac $id` || \
+ error_exit "Could not get MAC address for node $id from DHA"
+ shortMac=`dea convertMacToShortMac $longMac`
+ role="`dea getNodeRole $id`"
+ echo "Setting role $role for Fuel node $shortMac (DEA node $id)"
+ fuel node set --node-id $shortMac --role $role --env $envId \
+ || error_exit "Could not set role for $node"
+ fi
+done
+
+# Run pre-deploy with default input
+# Need to set terminal as script does "clear" and needs curses support
+ssh root@${fuelIp} "TERM=vt100 /opt/opnfv/pre-deploy.sh < /dev/null" \
+ || error_exit "Pre-deploy failed"
+
+# Inject node network config (will override pre-deploy Astute settings but we
+# want to catch pre-deploy provisioning changes)
+# TODO: There needs to be a function to adjust the NTP settings for clients
+# TODO: to that of the actual set of controllers in this deployment.
+echo "Running transplant #2"
+ssh root@${fuelIp} "cd tools; ./transplant2.sh ../`basename $deafile`" \
+ || error_exit "Error running transplant sequence #2"
+
+
+# Deploy
+echo "Deploying!"
+ssh root@${fuelIp} "fuel deploy-changes --env $envId" >/dev/null 2>&1 || error_exit "Deploy failed"
+echo "Deployment completed"
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/install_iso.sh b/fuel/prototypes/auto-deploy/deploy/functions/install_iso.sh
new file mode 100755
index 000000000..2ec510b25
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/install_iso.sh
@@ -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
+##############################################################################
+
+fuelIp=`dea getFuelIp` || error_exit "Could not get fuel IP"
+fuelNodeId=`dha getFuelNodeId` || error_exit "Could not get fuel node id"
+
+
+if dha nodeCanZeroMBR $fuelNodeId; then
+ echo "Node $fuelNodeId capable of zeroing MBR so doing that..."
+ dha nodeZeroMBR $fuelNodeId || error_exit "Failed to zero Fuel MBR"
+ dha nodeSetBootOrder $fuelNodeId "disk iso"
+elif dha nodeCanSetBootOrderLive; then
+ echo "Node can change ISO boot order live"
+ dha nodeSetBootOrder $fuelNodeId "iso disk"
+else
+ error_exit "No way to install Fuel node"
+fi
+
+sleep 3
+dha nodeEjectIso $fuelNodeId
+dha nodeInsertIso $fuelNodeId $isofile
+
+sleep 3
+dha nodePowerOn $fuelNodeId
+
+# Switch back boot order to disk, hoping that node is now up
+
+# FIXME: Can we do a smarter and more generic detection of when the
+# FIXME: kickstart procedure has started? Then th dha_waitForIsoBoot
+# FIXME: can be removed. Setting and IP already in the kickstart install
+# FIXME: and ping-wait for that?
+dha waitForIsoBoot
+
+dha nodeSetBootOrder $fuelNodeId "disk iso"
+
+# wait for node up
+echo "Waiting for Fuel master to accept SSH"
+while true
+do
+ ssh root@${fuelIp} date 2>/dev/null
+ if [ $? -eq 0 ]; then
+ break
+ fi
+ sleep 10
+done
+
+# Wait until fuelmenu is up
+echo "Waiting for fuelmenu to come up"
+menuPid=""
+while [ -z "$menuPid" ]
+do
+ menuPid=`ssh root@${fuelIp} "ps -ef" 2>&1 | grep fuelmenu | grep -v grep | awk '{ print $2 }'`
+ sleep 10
+done
+
+# This is where we inject our own astute.yaml settings
+scp -q $deafile root@${fuelIp}:. || error_exit "Could not copy DEA file to Fuel"
+echo "Uploading build tools to Fuel server"
+ssh root@${fuelIp} rm -rf tools || error_exit "Error cleaning old tools structure"
+scp -qrp $topdir/tools root@${fuelIp}:. || error_exit "Error copying tools"
+echo "Running transplant #0"
+ssh root@${fuelIp} "cd tools; ./transplant0.sh ../`basename $deafile`" \
+ || error_exit "Error running transplant sequence #0"
+
+
+
+# Let the Fuel deployment continue
+echo "Found menu as PID $menuPid, now killing it"
+ssh root@${fuelIp} "kill $menuPid" 2>/dev/null
+
+# Wait until installation complete
+echo "Waiting for bootstrap of Fuel node to complete"
+while true
+do
+ ssh root@${fuelIp} "ps -ef" 2>/dev/null \
+ | grep -q /usr/local/sbin/bootstrap_admin_node
+ if [ $? -ne 0 ]; then
+ break
+ fi
+ sleep 10
+done
+
+echo "Waiting for one minute for Fuel to stabilize"
+sleep 1m
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/isolinux.cfg.patch b/fuel/prototypes/auto-deploy/deploy/functions/isolinux.cfg.patch
new file mode 100644
index 000000000..298a05721
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/isolinux.cfg.patch
@@ -0,0 +1,14 @@
+*** isolinux/isolinux.cfg.orig 2015-04-15 08:29:52.026868322 -0400
+--- isolinux/isolinux.cfg 2015-04-15 08:30:34.350868343 -0400
+***************
+*** 19,22 ****
+ menu label Fuel Install (^Static IP)
+ menu default
+ kernel vmlinuz
+! append initrd=initrd.img biosdevname=0 ks=cdrom:/ks.cfg ip=10.20.0.2 gw=10.20.0.1 dns1=10.20.0.1 netmask=255.255.255.0 hostname=fuel.domain.tld showmenu=no
+--- 19,22 ----
+ menu label Fuel Install (^Static IP)
+ menu default
+ kernel vmlinuz
+! append initrd=initrd.img biosdevname=0 ks=cdrom:/ks.cfg ip=10.20.0.2 gw=10.20.0.1 dns1=10.20.0.1 netmask=255.255.255.0 hostname=fuel.domain.tld showmenu=yes
+
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/ks.cfg.patch b/fuel/prototypes/auto-deploy/deploy/functions/ks.cfg.patch
new file mode 100644
index 000000000..189695792
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/ks.cfg.patch
@@ -0,0 +1,19 @@
+*** ks.cfg.orig Wed Apr 15 21:47:09 2015
+--- ks.cfg Wed Apr 15 21:47:24 2015
+***************
+*** 35,41 ****
+ default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+ installdrive="undefined"
+! forceformat="no"
+ for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+ set ${drives} ${removable_drives}
+--- 35,41 ----
+ default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
+
+ installdrive="undefined"
+! forceformat="yes"
+ for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
+
+ set ${drives} ${removable_drives}
diff --git a/fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh b/fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh
new file mode 100755
index 000000000..d27dcdf2d
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/functions/patch-iso.sh
@@ -0,0 +1,85 @@
+#!/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_handler() {
+ rm -Rf $tmpnewdir
+ fusermount -u $tmporigdir 2>/dev/null
+ test -d $tmporigdir && rmdir $tmporigdir
+}
+
+trap exit_handler exit
+
+error_exit() {
+ echo "$@"
+ exit 1
+}
+
+if [ $# -ne 8 ]; then
+ error_exit "Input argument error"
+fi
+
+top=$(cd `dirname $0`; pwd)
+origiso=$(cd `dirname $1`; echo `pwd`/`basename $1`)
+newiso=$(cd `dirname $2`; echo `pwd`/`basename $2`)
+tmpdir=$3
+fuelIp=$4
+fuelNetmask=$5
+fuelGateway=$6
+fuelHostname=$7
+fuelDns=$8
+
+tmporigdir=${tmpdir}/origiso
+tmpnewdir=${tmpdir}/newiso
+
+test -f $origiso || error_exit "Could not find origiso $origiso"
+test -d $tmpdir || error_exit "Could not find tmpdir $tmpdir"
+
+
+if [ "`whoami`" != "root" ]; then
+ error_exit "You need be root to run this script"
+fi
+
+echo "Copying..."
+rm -Rf $tmpnewdir || error_exit "Failed deleting old ISO copy dir"
+mkdir -p $tmporigdir $tmpnewdir
+fuseiso $origiso $tmporigdir || error_exit "Failed to FUSE mount ISO"
+cd $tmporigdir
+find . | cpio -pd $tmpnewdir || error_exit "Failed to copy FUSE ISO with cpio"
+cd $tmpnewdir
+fusermount -u $tmporigdir || error_exit "Failed to FUSE unmount ISO"
+rmdir $tmporigdir || error_exit "Failed to delete original FUSE ISO directory"
+chmod -R 755 $tmpnewdir || error_exit "Failed to set protection on new ISO dir"
+
+echo "Patching..."
+cd $tmpnewdir
+# Patch ISO to make it suitable for automatic deployment
+cat $top/ks.cfg.patch | patch -p0 || error_exit "Failed patching ks.cfg"
+rm -rf .rr_moved
+
+# Add dynamic Fuel content
+echo "isolinux.cfg before: `grep netmask isolinux/isolinux.cfg`"
+sed -i "s/ ip=[^ ]*/ ip=$fuelIp/" isolinux/isolinux.cfg
+sed -i "s/ gw=[^ ]*/ gw=$fuelGateway/" isolinux/isolinux.cfg
+sed -i "s/ dns1=[^ ]*/ dns1=$fuelDns/" isolinux/isolinux.cfg
+sed -i "s/ netmask=[^ ]*/ netmask=$fuelNetmask/" isolinux/isolinux.cfg
+sed -i "s/ hostname=[^ ]*/ hostname=$fuelHostname/" isolinux/isolinux.cfg
+sed -i "s/ showmenu=[^ ]*/ showmenu=yes/" isolinux/isolinux.cfg
+echo "isolinux.cfg after: `grep netmask isolinux/isolinux.cfg`"
+
+rm -vf $newiso
+echo "Creating iso $newiso"
+mkisofs -quiet -r \
+ -J -R -b isolinux/isolinux.bin \
+ -no-emul-boot \
+ -boot-load-size 4 -boot-info-table \
+ --hide-rr-moved \
+ -x "lost+found" -o $newiso . || error_exit "Failed making iso"
+
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant0.sh b/fuel/prototypes/auto-deploy/deploy/tools/transplant0.sh
new file mode 100755
index 000000000..7c5883b56
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant0.sh
@@ -0,0 +1,40 @@
+#!/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
+##############################################################################
+
+cleanup () {
+ if [ -n "$tmpDir" ]; then
+ rm -Rf $tmpDir
+ fi
+}
+
+trap cleanup exit
+
+error_exit () {
+ echo "Error: $@" >&2
+ exit 1
+}
+
+tmpDir=`mktemp -d /tmp/deaXXXX`
+
+export PATH=`dirname $0`:$PATH
+
+if [ $# -lt 1 ]; then
+ error_exit "Argument error"
+fi
+deafile=$1
+shift
+
+if [ ! -f "$deafile" ]; then
+ error_exit "Can't find $deafile"
+fi
+
+transplant_fuel_settings.py /etc/fuel/astute.yaml $deafile || \
+ error_exit "Could not transplant astute settings"
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant1.sh b/fuel/prototypes/auto-deploy/deploy/tools/transplant1.sh
new file mode 100755
index 000000000..2401c6f88
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant1.sh
@@ -0,0 +1,67 @@
+#!/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
+##############################################################################
+
+cleanup () {
+ if [ -n "$tmpDir" ]; then
+ rm -Rf $tmpDir
+ fi
+}
+
+trap cleanup exit
+
+error_exit () {
+ echo "Error: $@" >&2
+ exit 1
+}
+
+tmpDir=`mktemp -d /tmp/deaXXXX`
+
+export PATH=`dirname $0`:$PATH
+
+if [ $# -lt 1 ]; then
+ error_exit "Argument error"
+fi
+deafile=$1
+shift
+
+if [ ! -f "$deafile" ]; then
+ error_exit "Can't find $deafile"
+fi
+
+if [ `fuel env | tail -n +3 | grep -v '^$' | wc -l` -ne 1 ]; then
+ error_exit "Not exactly one environment"
+fi
+envId=`fuel env | tail -n +3 | grep -v '^$' | awk '{ print $1 }'`
+
+fuel settings --env $envId --download --dir $tmpDir > /dev/null || \
+ error_exit "Could not get settings"
+
+fuel network --env $envId --download --dir $tmpDir > /dev/null || \
+ error_exit "Could not get network settings"
+
+cp $tmpDir/network_${envId}.yaml network_before.yaml
+
+# Transplant network settings
+transplant_network_settings.py $tmpDir/network_${envId}.yaml $deafile || \
+ error_exit "Could not transplant network settings"
+fuel network --env $envId --upload --dir $tmpDir || \
+ error_exit "Could not update network settings"
+cp $tmpDir/network_${envId}.yaml network_after.yaml
+
+# Transplant settings
+cp $tmpDir/settings_${envId}.yaml settings_before.yaml
+transplant_settings.py $tmpDir/settings_${envId}.yaml $deafile || \
+ error_exit "Could not transplant settings"
+fuel settings --env $envId --upload --dir $tmpDir || \
+ error_exit "Could not update settings"
+cp $tmpDir/settings_${envId}.yaml settings_after.yaml
+
+
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant2.sh b/fuel/prototypes/auto-deploy/deploy/tools/transplant2.sh
new file mode 100755
index 000000000..46c7a6008
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant2.sh
@@ -0,0 +1,98 @@
+#!/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
+##############################################################################
+
+cleanup () {
+ if [ -n "$tmpDir" ]; then
+ rm -Rf $tmpDir
+ fi
+}
+
+trap cleanup exit
+
+error_exit () {
+ echo "Error: $@" >&2
+ exit 1
+}
+
+# Return offset between DEA node id and cluster node id
+getDeaNodeOffset()
+{
+ local baseId
+
+ baseId=`fuel node | tail -n +3 | awk '{ print $1 }' | sed 's/ //g' | sort -n | head -1`
+ echo "$[baseId - 1]"
+}
+
+tmpDir=`mktemp -d /tmp/deaXXXX`
+
+export PATH=`dirname $0`:$PATH
+
+if [ $# -ne 1 ]; then
+ error_exit "Argument error"
+fi
+deaFile=$1
+
+if [ ! -f "$deaFile" ]; then
+ error_exit "Can't find $deaFile"
+fi
+
+
+if [ `fuel env | tail -n +3 | grep -v '^$' | wc -l` -ne 1 ]; then
+ error_exit "Not exactly one environment"
+fi
+envId=`fuel env | tail -n +3 | grep -v '^$' | awk '{ print $1 }'`
+
+# Phase 1: Graft deployment information
+fuel deployment --env $envId --default --dir $tmpDir || \
+ error_exit "Could not dump environment"
+
+for controller in `find $tmpDir -type f | grep -v compute`
+do
+ transplant_network_scheme.py $controller $deaFile controller || \
+ error_exit "Failed to graft `basename $controller`"
+
+ transplant_opnfv_settings.py $controller $deaFile controller || \
+ error_exit "Failed to graft `basename $controller`"
+done
+
+for compute in `find $tmpDir -type f | grep compute`
+do
+ transplant_network_scheme.py $compute $deaFile compute || \
+ error_exit "Failed to graft `basename $compute`"
+
+ transplant_opnfv_settings.py $compute $deaFile compute || \
+ error_exit "Failed to graft `basename $controller`"
+done
+
+fuel deployment --env $envId --upload --dir $tmpDir || \
+ error_exit "Could not upload environment"
+
+# Phase 2: Graft interface information
+deaOffset=`getDeaNodeOffset`
+echo "DEA offset: $deaOffset"
+
+for clusterNodeId in `fuel node | grep True | awk '{ print $1}'`
+do
+ deaNodeId=$[clusterNodeId - deaOffset]
+ echo "Node $clusterNodeId is $deaNodeId"
+ fuel node --node-id $clusterNodeId --network --download --dir $tmpDir || \
+ error_exit "Could not download node $clusterNodeId"
+
+ transplant_interfaces.py ${tmpDir}/node_${clusterNodeId}/interfaces.yaml \
+ $deaFile $deaNodeId || \
+ error_exit "Failed to graft interfaces"
+
+ fuel node --node-id $clusterNodeId --network --upload --dir $tmpDir || \
+ error_exit "Could not upload node $clusterNodeId"
+done
+
+
+
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant_fuel_settings.py b/fuel/prototypes/auto-deploy/deploy/tools/transplant_fuel_settings.py
new file mode 100755
index 000000000..49ea5e455
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant_fuel_settings.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 3:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <astutefile> <deafile>\n")
+ sys.exit(1)
+
+fuelfile = sys.argv[1]
+if not os.path.exists(fuelfile):
+ sys.stderr.write("ERROR: The file "+fuelfile+" could not be opened\n")
+ sys.exit(1)
+
+deafile = sys.argv[2]
+if not os.path.exists(deafile):
+ sys.stderr.write("ERROR: The file "+deafile+" could not be opened\n")
+ sys.exit(1)
+
+f = open(deafile, 'r')
+dea = yaml.load(f)
+f.close()
+
+f = open(fuelfile, 'r')
+fuel = yaml.load(f)
+f.close()
+
+dea = dea["fuel"]
+for property in dea.keys():
+ if property == "ADMIN_NETWORK":
+ for adminproperty in dea[property].keys():
+ fuel[property][adminproperty] = dea[property][adminproperty]
+ else:
+ fuel[property] = dea[property]
+
+f = open(fuelfile, 'w')
+f.write(yaml.dump(fuel, default_flow_style=False))
+f.close()
+
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant_interfaces.py b/fuel/prototypes/auto-deploy/deploy/tools/transplant_interfaces.py
new file mode 100755
index 000000000..609f360ba
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant_interfaces.py
@@ -0,0 +1,77 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <infile> <deafile> <nodeid>\n")
+ sys.exit(1)
+
+infile = sys.argv[1]
+if not os.path.exists(infile):
+ sys.stderr.write("ERROR: The file "+infile+" could not be opened\n")
+ sys.exit(1)
+
+deafile = sys.argv[2]
+if not os.path.exists(deafile):
+ sys.stderr.write("ERROR: The file "+deafile+" could not be opened\n")
+ sys.exit(1)
+deafile = sys.argv[2]
+nodeid = int(sys.argv[3])
+
+namespace = "interfaces"
+
+f1 = open(infile, 'r')
+doc1 = yaml.load(f1)
+f1.close()
+
+f2 = open(deafile, 'r')
+doc2 = yaml.load(f2)
+f2.close()
+
+
+# Create lookup table network name -> id for current setup
+nwlookup = {}
+for interface in doc1:
+ iface = {}
+ networks = []
+ for network in interface["assigned_networks"]:
+ nwlookup[network["name"]] = network["id"]
+
+# Find network information in DEA for this node
+nodeInfo = {}
+for node in doc2["nodes"]:
+ if node["id"] == nodeid:
+ nodeInfo=node
+ print "Found nodeinfo for node %d" % nodeid
+
+out = {}
+out["interfaces"] = {}
+
+for interface in doc1:
+ assigned = []
+ nw = {}
+ interface["assigned_networks"] = []
+ try:
+ for nwname in nodeInfo["interfaces"][interface["name"]]:
+ iface = {}
+ iface["id"] = nwlookup[nwname]
+ iface["name"] = nwname
+ interface["assigned_networks"].append(iface)
+ except:
+ print "No match for interface " + interface["name"]
+
+f3 = open(infile, 'w')
+f3.write(yaml.dump(doc1, default_flow_style=False))
+f3.close()
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant_network_scheme.py b/fuel/prototypes/auto-deploy/deploy/tools/transplant_network_scheme.py
new file mode 100755
index 000000000..7d50cbefe
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant_network_scheme.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <file> <deafile> [compute|controller]\n")
+ sys.exit(1)
+
+file = sys.argv[1]
+if not os.path.exists(file):
+ sys.stderr.write("ERROR: The file "+file+" could not be opened\n")
+ sys.exit(1)
+
+deafile = sys.argv[2]
+namespace = sys.argv[3]
+
+f1 = open(file, 'r')
+doc1 = yaml.load(f1)
+f1.close()
+
+f2 = open(deafile, 'r')
+doc2 = yaml.load(f2)
+f1.close()
+
+doc1["network_scheme"]["transformations"] = doc2[namespace]
+
+f2 = open(file, 'w')
+f2.write(yaml.dump(doc1, default_flow_style=False))
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant_network_settings.py b/fuel/prototypes/auto-deploy/deploy/tools/transplant_network_settings.py
new file mode 100755
index 000000000..c0a46bec0
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant_network_settings.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 3:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <file> <deafile>\n")
+ sys.exit(1)
+
+file = sys.argv[1]
+if not os.path.exists(file):
+ sys.stderr.write("ERROR: The file "+file+" could not be opened\n")
+ sys.exit(1)
+
+deafile = sys.argv[2]
+if not os.path.exists(deafile):
+ sys.stderr.write("ERROR: The file "+deafile+" could not be opened\n")
+ sys.exit(1)
+
+f1 = open(file, 'r')
+doc1 = yaml.load(f1)
+f1.close()
+
+f2 = open(deafile, 'r')
+doc2 = yaml.load(f2)
+f2.close()
+
+# Grab IDs from Fuel version, graft onto DEA version and save
+id = []
+groupid = []
+for nw in doc1["networks"]:
+ id.append(nw["id"])
+ groupid.append(nw["group_id"])
+
+for nw in doc2["network"]["networks"]:
+ nw["id"] = id.pop(0)
+ nw["group_id"] = groupid.pop(0)
+
+f3 = open(file, 'w')
+f3.write(yaml.dump(doc2["network"], default_flow_style=False))
+f3.close()
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant_opnfv_settings.py b/fuel/prototypes/auto-deploy/deploy/tools/transplant_opnfv_settings.py
new file mode 100755
index 000000000..00d095093
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant_opnfv_settings.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 4:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <file> <deafile> [compute|controller]\n")
+ sys.exit(1)
+
+file = sys.argv[1]
+if not os.path.exists(file):
+ sys.stderr.write("ERROR: The file "+file+" could not be opened\n")
+ sys.exit(1)
+
+deafile = sys.argv[2]
+namespace = sys.argv[3]
+
+f1 = open(file, 'r')
+doc1 = yaml.load(f1)
+f1.close()
+
+f2 = open(deafile, 'r')
+doc2 = yaml.load(f2)
+f1.close()
+
+doc1["opnfv"] = doc2["opnfv"][namespace]
+
+f2 = open(file, 'w')
+f2.write(yaml.dump(doc1, default_flow_style=False))
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/deploy/tools/transplant_settings.py b/fuel/prototypes/auto-deploy/deploy/tools/transplant_settings.py
new file mode 100755
index 000000000..7f5c0d8e2
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/tools/transplant_settings.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+##############################################################################
+# 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
+##############################################################################
+
+import yaml
+import re
+import sys
+import os
+
+if len(sys.argv) != 3:
+ sys.stderr.write("Usage: "+sys.argv[0]+" <file> <deafile>\n")
+ sys.exit(1)
+
+file = sys.argv[1]
+if not os.path.exists(file):
+ sys.stderr.write("ERROR: The file "+file+" could not be opened\n")
+ sys.exit(1)
+
+deafile = sys.argv[2]
+
+f1 = open(deafile, 'r')
+doc = yaml.load(f1)
+f1.close()
+
+out = doc["settings"]
+f2 = open(file, 'w')
+f2.write(yaml.dump(out, default_flow_style=False))
+f2.close()
+
diff --git a/fuel/prototypes/auto-deploy/deploy/verify_dea.sh b/fuel/prototypes/auto-deploy/deploy/verify_dea.sh
new file mode 100755
index 000000000..2054e9f70
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/verify_dea.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
+##############################################################################
+
+
+error_exit()
+{
+ echo "Error: $@"
+ exit 1
+}
+
+if [ $# -ne 1 ]; then
+ echo "Syntax: `basename $0` deafile"
+ exit 1
+fi
+
+if [ ! -f $1 ]; then
+ echo "No such DEA file: $1"
+ exit 1
+fi
+
+tmpdir=$HOME/fueltmp2
+rm -Rf $tmpdir
+mkdir $tmpdir
+
+topdir=$(dirname $(readlink -f $BASH_SOURCE))
+. $topdir/functions/common.sh
+. $topdir/functions/dea-api.sh $1
+
+echo "API version: `dea getApiVersion`"
+
+#echo "Cluster node id for node 1 is: `dea getClusterNodeId 1`"
+
+err=1
+echo "Verifying that expected functions are present..."
+for function in \
+ dea_getApiVersion \
+ dea_getNodeRole \
+ dea_getFuelIp \
+ dea_getFuelNetmask \
+ dea_getFuelGateway \
+ dea_getFuelHostname \
+ dea_getFuelDns \
+ dea_convertMacToShortMac \
+ dea_getProperty \
+ dea_getClusterNodeId \
+ dea
+do
+ if type $function &>/dev/null; then
+ echo "$function: OK"
+ else
+ echo "$function: Missing!"
+ err=0
+ fi
+done
+
+if [ $err -eq 0 ]; then
+ echo "Error in API!"
+ exit 1
+else
+ echo "API functions OK."
+ echo ""
+fi
+
+echo "Fuel IP address: `dea getFuelIp`"
+echo "Fuel netmask: `dea getFuelNetmask`"
+echo "Fuel gateway: `dea getFuelGateway`"
+echo "Fuel hostname: `dea getFuelHostname`"
+echo "Fuel DNS: `dea getFuelDns`"
+echo "Short MAC of 11:22:33:44:55:66: `dea convertMacToShortMac 11:22:33:44:55:66`"
+
+echo "Done"
diff --git a/fuel/prototypes/auto-deploy/deploy/verify_dha.sh b/fuel/prototypes/auto-deploy/deploy/verify_dha.sh
new file mode 100755
index 000000000..6e2b75f44
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/deploy/verify_dha.sh
@@ -0,0 +1,125 @@
+#!/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
+##############################################################################
+
+error_exit()
+{
+ echo "Error: $@" >&2
+ exit 1
+}
+
+if [ $# -ne 2 ]; then
+ echo "Syntax: `basename $0` adaptername dhafile"
+ exit 1
+fi
+
+if [ ! -f dha-adapters/${1}.sh ]; then
+ echo "No such adapter file: $1"
+ exit 1
+elif [ ! -f $2 ]; then
+ echo "No such DHA file: $2"
+ exit 1
+fi
+
+. dha-adapters/${1}.sh $2
+
+
+err=1
+echo "Verifying that expected functions are present..."
+for function in \
+ dha_getApiVersion \
+ dha_getAdapterName \
+ dha_getAllNodeIds \
+ dha_getFuelNodeId \
+ dha_getNodeProperty \
+ dha_getNodePxeMac \
+ dha_useFuelCustomInstall \
+ dha_fuelCustomInstall \
+ dha_getPowerOnStrategy \
+ dha_nodePowerOn \
+ dha_nodePowerOff \
+ dha_nodeReset \
+ dha_nodeCanSetBootOrderLive \
+ dha_nodeSetBootOrder \
+ dha_nodeCanSetIso \
+ dha_nodeCanHandeIsoLive \
+ dha_nodeInsertIso \
+ dha_nodeEjectIso \
+ dha_waitForIsoBoot \
+ dha_nodeCanZeroMBR \
+ dha_nodeZeroMBR \
+ dha
+do
+ if type $function &>/dev/null; then
+ echo "$function: OK"
+ else
+ echo "$function: Missing!"
+ err=0
+ fi
+done
+
+
+echo "Adapter API version: `dha getApiVersion`"
+echo "Adapter name: `dha getAdapterName`"
+
+echo "All PXE MAC addresses:"
+for id in `(dha getAllNodeIds) | sort`
+do
+ if [ "`dha getAdapterName`" == "libvirt" ]; then
+ libvirtName=`dha getNodeProperty $id libvirtName`
+ else
+ libvirtName=""
+ fi
+
+ if [ $id == "`dha getFuelNodeId`" ]; then
+ echo "$id: `dha getNodeProperty $id pxeMac` $libvirtName <--- Fuel master"
+ else
+ echo "$id: `dha getNodeProperty $id pxeMac` $libvirtName"
+ fi
+done
+
+
+echo -n "Using Fuel custom install: "
+if dha useFuelCustomInstall; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+
+echo -n "Can set boot order live: "
+if dha nodeCanSetBootOrderLive; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+echo -n "Can operate on ISO media: "
+if dha nodeCanSetIso; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+echo -n "Can insert/eject ISO without power toggle: "
+if dha nodeCanHandeIsoLive; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+echo -n "Can erase the boot disk MBR: "
+if dha nodeCanZeroMBR; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+echo "Done"
diff --git a/fuel/prototypes/auto-deploy/documentation/1-introduction.txt b/fuel/prototypes/auto-deploy/documentation/1-introduction.txt
new file mode 100644
index 000000000..c4efed5a8
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/documentation/1-introduction.txt
@@ -0,0 +1,36 @@
+The structure is being reworked. This page is an introduction to DEA
+and DHA.
+
+Introduction
+
+The aim of the deployment prototype is to try out a (hopefully)
+logical setup to support Fuel deployment on a variety of different
+hardware platforms using a common data format to describe the
+deployment itself and another data format to describe the hardware in
+question.
+
+DEA.yaml The DEA.yaml file describes a Fuel deployment, complete with
+ all settings. The easiest way to create this file is to use
+ the "create_templates.sh" script in an existing deployment to
+ copy its configuration to the DEA.yaml file.
+
+DHA.yaml The DHA.yaml file describes to hardware setup for an
+ installation. This file denotes among other things which DHA
+ adapter to use when deploying Fuel on this hardware setup.
+
+DHA adapter interface: The DHA adapter interface contains a number of
+ functions calls available to the automatic Fuel deployer script
+ (deploy.sh). Each adapter creates an implementation of this
+ interface in order for the deployer to orchestrate the
+ installation. There's currently an example DHA adapter "libvirt"
+ that is able to deploy Fuel in a nested KVM environment. Future
+ adapters could support HP C7000, Dell R620 or other types of
+ hardware.
+
+ It is important to note that a certain DHA adapter could implement
+ the dha_fuelCustomInstall() function, which for instance could
+ install the Fuel master as a VM or using PXE.
+
+A typical installation would be kicked off by the following command:
+
+./deploy.sh <isofile to deploy> <dea.yaml> <dha.yaml>
diff --git a/fuel/prototypes/auto-deploy/documentation/2-dea.txt b/fuel/prototypes/auto-deploy/documentation/2-dea.txt
new file mode 100644
index 000000000..36f805c26
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/documentation/2-dea.txt
@@ -0,0 +1,1082 @@
+The structure is being reworked. This page describes the DEA.yaml
+file.
+
+The DEA.yaml file describes an actual Fuel deployment. This YAML file
+can either be edited from an existing template or created from an
+existing deployment by running the "create_templates.sh" script.
+
+The top level fields and their origin
+
+compute: Network translations for the compute nodes (from astute.yaml)
+Hoping that this is sufficient and we don't need to be more granular!
+
+controller: Network translations for the compute nodes (from
+astute.yaml) Hoping that this is sufficient and we don't need to be
+more granular!
+
+created: Creation time for this DEA file.
+
+environment_mode: Environment mode from "fuel env" (ha_compact,
+multinode, ...)
+
+fuel: The networking, DNS and NTP information from the Fuel node
+astute.yaml.
+
+network: The "fuel network" part.
+
+nodes: A data structure describing the role and network configuration
+for all nodes.
+
+opnfv: This structure contains two sub structures "controller" and
+"compute" containing the "opnfv" namespace from their respective
+astute.yaml.
+
+settings: The "fuel settings" part. This is the complete settings,
+thinking it can come in handy for future modifications. I think that
+the "pre_deploy.sh" should be replaced by us customising these
+settings instead (way into the future though).
+
+title: Deployment Environment Adapter (DEA)
+
+version: DEA API to be used for parsing this file. Currently 1.1.
+
+Live example (looooong!)
+
+# DEA API version supported
+version: 1.1
+created: Wed Apr 22 09:43:22 UTC 2015
+comment: Small libvirt deployment
+nodes:
+- id: 1
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+ role: compute
+- id: 2
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+ role: controller
+environment_mode: multinode
+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
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 8.8.8.8
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+ HOSTNAME: fuel
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+controller:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-ex
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 102
+ - 0
+ vlan_ids:
+ - 102
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-mgmt
+ tags:
+ - 101
+ - 0
+ vlan_ids:
+ - 101
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth3
+ - br-ex
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+compute:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 102
+ - 0
+ vlan_ids:
+ - 102
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-mgmt
+ tags:
+ - 101
+ - 0
+ vlan_ids:
+ - 101
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+opnfv:
+ compute:
+ dns:
+ compute:
+ - 8.8.8.8
+ - 8.8.4.4
+ controller:
+ - 8.8.8.8
+ - 8.8.4.4
+ hosts:
+ - address: 46.253.206.181
+ fqdn: tor.e1.se
+ name: tor
+ ntp:
+ compute: 'server node-4.domain.tld
+
+ '
+ controller: 'server 0.ubuntu.pool.ntp.org
+
+ server 1.ubuntu.pool.ntp.org
+
+ server 2.ubuntu.pool.ntp.org
+
+ server 3.ubuntu.pool.ntp.org
+
+ '
+ controller:
+ dns:
+ compute:
+ - 8.8.8.8
+ - 8.8.4.4
+ controller:
+ - 8.8.8.8
+ - 8.8.4.4
+ hosts:
+ - address: 46.253.206.181
+ fqdn: tor.e1.se
+ name: tor
+ ntp:
+ compute: 'server node-4.domain.tld
+
+ '
+ controller: 'server 0.ubuntu.pool.ntp.org
+
+ server 1.ubuntu.pool.ntp.org
+
+ server 2.ubuntu.pool.ntp.org
+
+ server 3.ubuntu.pool.ntp.org
+
+ '
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ 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
+ net_l23_provider: ovs
+ segmentation_type: vlan
+ vlan_range:
+ - 1000
+ - 1200
+ networks:
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ assign_vip: true
+ 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
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ assign_vip: true
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 101
+ name: management
+ vlan_start: 101
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 192.168.1.254
+ meta:
+ assign_vip: false
+ 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: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ assign_vip: false
+ 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
+ - cidr: 10.20.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.0.254
+ meta:
+ assign_vip: false
+ 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
+interfaces:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+settings:
+ editable:
+ access:
+ email:
+ description: Email address for Administrator
+ label: email
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: password
+ 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$)(?![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$)(?![Gg]uest$).*
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: text
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ label: Auto assign floating IP
+ restrictions:
+ - cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ compute_scheduler_driver:
+ label: Scheduler driver
+ type: radio
+ value: nova.scheduler.filter_scheduler.FilterScheduler
+ values:
+ - data: nova.scheduler.filter_scheduler.FilterScheduler
+ description: Currently the most advanced OpenStack scheduler. See the OpenStack
+ documentation for details.
+ label: Filter scheduler
+ - data: nova.scheduler.simple.SimpleScheduler
+ description: This is 'naive' scheduler which tries to find the least loaded
+ host
+ label: Simple scheduler
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ disable_offload:
+ description: If set, generic segmentation offload (gso) and generic receive
+ offload (gro) on physical nics will be disabled. See ethtool man.
+ label: Disable generic offload on physical nics
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron' and networking_parameters:segmentation_ty
+pe
+ == 'gre'
+ type: checkbox
+ value: true
+ weight: 80
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter
+ - data: vcenter
+ description: Choose this type of hypervisor if you run OpenStack in a vCenter
+ environment.
+ label: vCenter
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or cluster:net_provider
+ == 'neutron'
+ weight: 30
+ metadata:
+ label: Common
+ weight: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: false
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ type: text
+ value: 8.8.8.8, 8.8.4.4
+ weight: 10
+ metadata:
+ label: Upstream DNS
+ weight: 90
+ external_ntp:
+ metadata:
+ label: Upstream NTP
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP servers list
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 rootdelay=90 nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to
+ support networking over Mellanox NIC. Mellanox Neutron plugin will not
+ be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ nsx_plugin:
+ connector_type:
+ description: Default network transport type to use
+ label: NSX connector type
+ type: select
+ value: stt
+ values:
+ - data: gre
+ label: GRE
+ - data: ipsec_gre
+ label: GRE over IPSec
+ - data: stt
+ label: STT
+ - data: ipsec_stt
+ label: STT over IPSec
+ - data: bridge
+ label: Bridge
+ weight: 80
+ l3_gw_service_uuid:
+ description: UUID for the default L3 gateway service to use with this cluster
+ label: L3 service UUID
+ regex:
+ error: Invalid L3 gateway service UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 50
+ metadata:
+ enabled: false
+ label: VMware NSX
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron' or networking_parameters:net_l23_provider
+ != 'nsx'
+ weight: 20
+ nsx_controllers:
+ description: One or more IPv4[:port] addresses of NSX controller node, separated
+ by comma (e.g. 10.30.30.2,192.168.110.254:443)
+ label: NSX controller endpoint
+ regex:
+ error: Invalid controller endpoints, specify valid IPv4[:port] pair
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2
+[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3})
+)?(,(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-
+5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?)*$
+ type: text
+ value: ''
+ weight: 60
+ nsx_password:
+ description: Password for Administrator
+ label: NSX password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: ''
+ weight: 30
+ nsx_username:
+ description: NSX administrator's username
+ label: NSX username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ packages_url:
+ description: URL to NSX specific packages
+ label: URL to NSX bits
+ regex:
+ error: Invalid URL, specify valid HTTP/HTTPS URL with IPv4 address (e.g.
+ http://10.20.0.2/nsx)
+ source: ^https?://(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1
+[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][
+\d]{0,3}))?(/.*)?$
+ type: text
+ value: ''
+ weight: 70
+ replication_mode:
+ description: ''
+ label: NSX cluster has Service nodes
+ type: checkbox
+ value: true
+ weight: 90
+ transport_zone_uuid:
+ description: UUID of the pre-existing default NSX Transport zone
+ label: Transport zone UUID
+ regex:
+ error: Invalid transport zone UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 40
+ provision:
+ metadata:
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: cobbler
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: Classic (use anaconda or debian-installer)
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ and zabbix-server only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ 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)
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ 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)
+ 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:
+ - settings:common.libvirt_type.value != 'vcenter'
+ 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'
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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*$
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ type: text
+ value: '2'
+ weight: 85
+ vc_datacenter:
+ description: Inventory path to a datacenter. If you want to use ESXi host
+ as datastore, it should be "ha-datacenter".
+ label: Datacenter name
+ regex:
+ error: Empty datacenter
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_t
+ype.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 65
+ vc_datastore:
+ description: Datastore associated with the datacenter.
+ label: Datastore name
+ regex:
+ error: Empty datastore
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_t
+ype.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 60
+ vc_host:
+ description: IP Address of vCenter/ESXi
+ label: vCenter/ESXi IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2
+[0-4][\d]|25[0-5])$
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_t
+ype.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 45
+ vc_image_dir:
+ description: The name of the directory where the glance images will be stored
+ in the VMware datastore.
+ label: Datastore Images directory
+ regex:
+ error: Empty images directory
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_t
+ype.value
+ != 'vcenter'
+ type: text
+ value: /openstack_glance
+ weight: 70
+ vc_password:
+ description: vCenter/ESXi admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_t
+ype.value
+ != 'vcenter'
+ type: password
+ value: ''
+ weight: 55
+ vc_user:
+ description: vCenter/ESXi admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_t
+ype.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 50
+ 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:common.libvirt_type.value
+ == 'vcenter'
+ type: checkbox
+ value: false
+ weight: 20
+ volumes_lvm:
+ description: Requires 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
+ volumes_vmdk:
+ description: Configures Cinder to store volumes via VMware vCenter.
+ label: VMware vCenter for volumes (Cinder)
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or settings:storage.volumes_lvm.value
+ == true
+ type: checkbox
+ value: false
+ weight: 15
+ syslog:
+ metadata:
+ label: Syslog
+ 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]|6
+553[0-5])$
+ type: text
+ value: '514'
+ weight: 20
+ syslog_server:
+ description: Remote syslog hostname
+ label: Hostname
+ 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
+ vcenter:
+ cluster:
+ description: vCenter cluster name. If you have multiple clusters, use comma
+ to separate names
+ label: Cluster
+ regex:
+ error: Invalid cluster list
+ source: ^([^,\ ]+([\ ]*[^,\ ])*)(,[^,\ ]+([\ ]*[^,\ ])*)*$
+ type: text
+ value: ''
+ weight: 40
+ datastore_regex:
+ description: The Datastore regexp setting specifies the data stores to use
+ with Compute. For example, "nas.*". If you want to use all available datastores,
+ leave this field blank
+ label: Datastore regexp
+ regex:
+ error: Invalid datastore regexp
+ source: ^(\S.*\S|\S|)$
+ type: text
+ value: ''
+ weight: 50
+ host_ip:
+ description: IP Address of vCenter
+ label: vCenter IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2
+[0-4][\d]|25[0-5])$
+ type: text
+ value: ''
+ weight: 10
+ metadata:
+ label: vCenter
+ restrictions:
+ - action: hide
+ condition: settings:common.libvirt_type.value != 'vcenter'
+ weight: 20
+ use_vcenter:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 5
+ vc_password:
+ description: vCenter admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 30
+ vc_user:
+ description: vCenter admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ vlan_interface:
+ description: Physical ESXi host ethernet adapter for VLAN networking (e.g.
+ vmnic1). If empty "vmnic0" is used by default
+ label: ESXi VLAN interface
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'nova_network' or networking_parameters:net_manager
+ != 'VlanManager'
+ type: text
+ value: ''
+ weight: 60
+ zabbix:
+ metadata:
+ label: Zabbix Access
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 70
+ password:
+ description: Password for Zabbix Administrator
+ label: password
+ type: password
+ value: zabbix
+ weight: 20
+ username:
+ description: Username for Zabbix Administrator
+ label: username
+ type: text
+ value: admin
+ weight: 10
+
+
diff --git a/fuel/prototypes/auto-deploy/documentation/3-dha.txt b/fuel/prototypes/auto-deploy/documentation/3-dha.txt
new file mode 100644
index 000000000..d38b6d00b
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/documentation/3-dha.txt
@@ -0,0 +1,65 @@
+The structure is being reworked. This page describes the DHA.yaml file.
+
+Below is an example DHA for a libvirt deployment. An actual hardware deployment
+could for instance add additional data fields to the node list, such as:
+
+nodes:
+- id: 1
+ pxeMac: 52:54:00:9c:c2:c9
+ ipmiIp: 192.168.220.1
+ ipmiUser: admin
+ impiPassword: ericsson
+ isFuel: true
+
+The important thing is to keep the mandatory fields and add additional
+ones to map to the DHA adapter implementation for the hardware in
+question.
+
+The following example for libvirt is based on what's created by
+create_template.sh.
+
+Example DHA.yaml file for a libvirt adapter
+
+# DHA API version supported
+version: 1.1
+created: Wed Apr 22 11:34:14 UTC 2015
+comment: Small libvirt deployment
+
+# Adapter to use for this definition
+adapter: libvirt
+
+# Node list.
+# Mandatory fields are id, role and the "isFuel: true" property
+# for the Fuel node if not fuelCustomInstall is set, when it is
+# optional.
+# The MAC address of the PXE boot interface is not mandatory
+# to be set, but the field must be present.
+# All other fields are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 52:54:00:38:c7:8e
+- id: 2
+ pxeMac: 52:54:00:9c:c2:c9
+- id: 3
+ pxeMac: 11:11:11:11:11:11
+ isFuel: true
+
+# Deployment power on strategy
+# all: Turn on all nodes at once. If MAC addresses are set these
+# will be used for connecting roles to physical nodes, if the
+# installation order will be arbitrary.
+# sequence: Turn on the nodes in sequence starting with the lowest order
+# node and wait for the node to be detected by Fuel. Not until
+# the node has been detected and assigned a role will the next
+# node be turned on.
+powerOnStrategy: all
+
+# If fuelCustomInstall is set to true, Fuel is assumed to be installed by
+# calling the DHA adapter function "dha_fuelCustomInstall()" with two
+# arguments: node ID and the ISO file name to deploy. The custom install
+# function is then to handle all necessary logic to boot the Fuel master
+# from the ISO and then return.
+# Allowed values: true, false
+
+fuelCustomInstall: false
diff --git a/fuel/prototypes/auto-deploy/documentation/4-dha-adapter-api.txt b/fuel/prototypes/auto-deploy/documentation/4-dha-adapter-api.txt
new file mode 100644
index 000000000..917d17cf5
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/documentation/4-dha-adapter-api.txt
@@ -0,0 +1,128 @@
+The structure is being reworked. This page describes the DHA adapter interface.
+
+
+This is a the beginning of a documentation of the DHA adapter
+interface, which is auto generated from the bash implementation of the
+libvirt DHA adapter. So, to some extent work in progress.
+
+An example run from the ./verify_adapter tool:
+
+sfb@blackbox:~/git/toolbox/opnfv/production/deploy$ ./verify_adapter.sh libvirt.sh dha.yaml
+Adapter init
+dha.yaml
+DHAPARSE: /home/sfb/git/toolbox/opnfv/production/deploy/dha-adapters/dhaParse.py
+DHAFILE: dha.yaml
+Adapter API version: 1.0
+Adapter name: libvirt
+All PXE MAC addresses:
+1: 52:54:00:38:c7:8e
+2: 52:54:00:9c:c2:c9
+Using Fuel custom install: no
+Can set boot order live: no
+Can operate on ISO media: yes
+Can insert/eject ISO without power toggle: yes
+Can erase the boot disk MBR: yes
+Done
+
+
+*** DHA API definition version 1.1 ***
+
+# Get the DHA API version supported by this adapter
+dha_getApiVersion ()
+
+# Get the name of this adapter
+dha_getAdapterName ()
+
+# ### Node identity functions ###
+# Node numbering is sequential.
+# Get a list of all defined node ids, sorted in ascending order
+dha_getAllNodeIds()
+
+# Get ID for Fuel node ID
+dha_getFuelNodeId()
+
+# Get node property
+# Argument 1: node id
+# Argument 2: Property
+dha_getNodeProperty()
+
+# Get MAC address for the PXE interface of this node. If not
+# defined, an empty string will be returned.
+# Argument 1: Node id
+dha_getNodePxeMac()
+
+# Use custom installation method for Fuel master?
+# Returns 0 if true, 1 if false
+dha_useFuelCustomInstall()
+
+# Fuel custom installation method
+# Leaving the Fuel master powered on and booting from ISO at exit
+# Argument 1: Full path to ISO file to install
+dha_fuelCustomInstall()
+
+# Get power on strategy from DHA
+# Returns one of two values:
+# all: Power on all nodes simultaneously
+# sequence: Power on node by node, wait for Fuel detection
+dha_getPowerOnStrategy()
+
+# Power on node
+# Argument 1: node id
+dha_nodePowerOn()
+
+# Power off node
+# Argument 1: node id
+dha_nodePowerOff()
+
+# Reset node
+# Argument 1: node id
+dha_nodeReset()
+
+# Is the node able to commit boot order without power toggle?
+# Argument 1: node id
+# Returns 0 if true, 1 if false
+dha_nodeCanSetBootOrderLive()
+
+# Set node boot order
+# Argument 1: node id
+# Argument 2: Space separated line of boot order - boot ids are "pxe", "disk" and "iso"
+dha_nodeSetBootOrder()
+
+# Is the node able to operate on ISO media?
+# Argument 1: node id
+# Returns 0 if true, 1 if false
+dha_nodeCanSetIso()
+
+# Is the node able to insert add eject ISO files without power toggle?
+# Argument 1: node id
+# Returns 0 if true, 1 if false
+dha_nodeCanHandeIsoLive()
+
+# Insert ISO into virtualDVD
+# Argument 1: node id
+# Argument 2: iso file
+dha_nodeInsertIso()
+
+# Eject ISO from virtual DVD
+# Argument 1: node id
+dha_nodeEjectIso()
+
+# Wait until a suitable time to change the boot order to
+# "disk iso" when ISO has been booted. Can't be too long, nor
+# too short...
+# We should make a smart trigger for this somehow...
+dha_waitForIsoBoot()
+
+# Is the node able to reset its MBR?
+# Returns 0 if true, 1 if false
+dha_nodeCanZeroMBR()
+
+# Reset the node's MBR
+dha_nodeZeroMBR()
+
+# Entry point for dha functions
+# Typically do not call "dha_node_zeroMBR" but "dha node_ZeroMBR"
+# Before calling dha, the adapter file must gave been sourced with
+# the DHA file name as argument
+dha()
+
diff --git a/fuel/prototypes/auto-deploy/documentation/5-dea-api.txt b/fuel/prototypes/auto-deploy/documentation/5-dea-api.txt
new file mode 100644
index 000000000..d5c6f5c4e
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/documentation/5-dea-api.txt
@@ -0,0 +1,47 @@
+The structure is being reworked. This page describes the DEA interface.
+
+The DEA API is internal to the deployer, but documented here for information.
+
+*** DEA API definition version 1.1 ***
+
+# Get the DEA API version supported by this adapter
+dea_getApiVersion ()
+
+# Node numbering is sequential.
+# Get the role for this node
+# Argument 1: node id
+dea_getNodeRole()
+
+# Get IP address of Fuel master
+dea_getFuelIp()
+
+# Get netmask Fuel master
+dea_getFuelNetmask()
+
+# Get gateway address of Fuel master
+dea_getFuelGateway()
+
+# Get gateway address of Fuel master
+dea_getFuelHostname()
+
+# Get DNS address of Fuel master
+dea_getFuelDns()
+
+# Convert a normal MAC to a Fuel short mac for --node-id
+dea_convertMacToShortMac()
+
+# Get property from DEA file
+# Argument 1: search path, as e.g. "fuel ADMIN_NETWORK ipaddress"
+dea_getProperty()
+
+# Convert DHA node id to Fuel cluster node id
+# Look for lowest Fuel node number, this will be DHA node 1
+# Argument: node id
+dea_getClusterNodeId()
+
+# Entry point for dea functions
+# Typically do not call "dea_node_zeroMBR" but "dea node_ZeroMBR"
+# Before calling dea, the adapter file must gave been sourced with
+# the DEA file name as argument
+dea()
+
diff --git a/fuel/prototypes/auto-deploy/examples/ipmi/README.txt b/fuel/prototypes/auto-deploy/examples/ipmi/README.txt
new file mode 100644
index 000000000..2cbffa901
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/ipmi/README.txt
@@ -0,0 +1,10 @@
+This is a hybrid IPMI DHA, where the Fuel master is run as a KVM
+VM, but all other nodes are real iron under IPMI control.
+
+In "conf" is an example dea.yaml, dha.yaml and a VM definition for the
+Fuel master. You need to tune these so they match your specific
+environment. In addition you need to create a bridge from the VM to
+the admin (PXE) network of the physical nodes. An example snippet for
+/etc/network/interfaces which also configures NAT can be found in the
+README.txt in conf.
+
diff --git a/fuel/prototypes/auto-deploy/examples/ipmi/conf/README.txt b/fuel/prototypes/auto-deploy/examples/ipmi/conf/README.txt
new file mode 100644
index 000000000..a8608dc85
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/ipmi/conf/README.txt
@@ -0,0 +1,12 @@
+Add this snippet into /etc/network/interfaces after making sure to
+replace p1p1.20 with your actual outbound interface in order to
+provide network access to the Fuel master for DNS and NTP.
+
+iface vfuelnet inet static
+ bridge_ports em1
+ address 10.30.0.1
+ netmask 255.255.255.0
+ pre-down iptables -t nat -D POSTROUTING --out-interface p1p1.20 -j MASQUERADE -m comment --comment "vfuelnet"
+ pre-down iptables -D FORWARD --in-interface vfuelnet --out-interface p1p1.20 -m comment --comment "vfuelnet"
+ post-up iptables -t nat -A POSTROUTING --out-interface p1p1.20 -j MASQUERADE -m comment --comment "vfuelnet"
+ post-up iptables -A FORWARD --in-interface vfuelnet --out-interface p1p1.20 -m comment --comment "vfuelnet"
diff --git a/fuel/prototypes/auto-deploy/examples/ipmi/conf/dea.yaml b/fuel/prototypes/auto-deploy/examples/ipmi/conf/dea.yaml
new file mode 100644
index 000000000..166b68aec
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/ipmi/conf/dea.yaml
@@ -0,0 +1,983 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: Tue May 5 15:33:07 UTC 2015
+comment: Test environment Ericsson Montreal
+nodes:
+- id: 1
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ eth2:
+ - public
+ - management
+ - storage
+ - private
+ role: controller
+- id: 2
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ eth2:
+ - public
+ - management
+ - storage
+ - private
+ role: compute
+environment_mode: multinode
+environment_name: Stefan3_auto
+fuel:
+ ADMIN_NETWORK:
+ dhcp_pool_end: 10.30.0.254
+ dhcp_pool_start: 10.30.0.3
+ ipaddress: 10.30.0.2
+ netmask: 255.255.255.0
+ DNS_DOMAIN: opnfvericsson.ca
+ DNS_SEARCH: opnfvericsson.ca
+ DNS_UPSTREAM: 10.118.32.193
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+ HOSTNAME: mrberg-fuel
+ NTP1: 0.ca.pool.ntp.org
+ NTP2: 1.ca.pool.ntp.org
+ NTP3: 2.ca.pool.ntp.org
+controller:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-eth4
+- action: add-port
+ bridge: br-eth4
+ name: eth4
+- action: add-br
+ name: br-eth5
+- action: add-port
+ bridge: br-eth5
+ name: eth5
+- action: add-br
+ name: br-ex
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-storage
+ tags:
+ - 220
+ - 0
+ vlan_ids:
+ - 220
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-mgmt
+ tags:
+ - 320
+ - 0
+ vlan_ids:
+ - 320
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-ex
+ tags:
+ - 120
+ - 0
+ vlan_ids:
+ - 120
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+compute:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-eth4
+- action: add-port
+ bridge: br-eth4
+ name: eth4
+- action: add-br
+ name: br-eth5
+- action: add-port
+ bridge: br-eth5
+ name: eth5
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-storage
+ tags:
+ - 220
+ - 0
+ vlan_ids:
+ - 220
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-mgmt
+ tags:
+ - 320
+ - 0
+ vlan_ids:
+ - 320
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+opnfv:
+ compute: {}
+ controller: {}
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 10.118.32.193
+ - 8.8.8.8
+ 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
+ net_l23_provider: ovs
+ segmentation_type: vlan
+ vlan_range:
+ - 2022
+ - 2023
+ networks:
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ assign_vip: true
+ 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
+ vlan_start: null
+ name: public
+ vlan_start: 120
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.2
+ - 192.168.0.254
+ meta:
+ assign_vip: true
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 101
+ name: management
+ vlan_start: 320
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.2
+ - 192.168.1.254
+ meta:
+ assign_vip: false
+ 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: 220
+ - cidr: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ assign_vip: false
+ 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
+ - cidr: 10.30.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 10.30.0.3
+ - 10.30.0.254
+ meta:
+ assign_vip: false
+ 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:
+ access:
+ email:
+ description: Email address for Administrator
+ label: email
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: password
+ 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$)(?![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$)(?![Gg]uest$).*
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: text
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ label: Auto assign floating IP
+ restrictions:
+ - cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ compute_scheduler_driver:
+ label: Scheduler driver
+ type: radio
+ value: nova.scheduler.filter_scheduler.FilterScheduler
+ values:
+ - data: nova.scheduler.filter_scheduler.FilterScheduler
+ description: Currently the most advanced OpenStack scheduler. See the OpenStack
+ documentation for details.
+ label: Filter scheduler
+ - data: nova.scheduler.simple.SimpleScheduler
+ description: This is 'naive' scheduler which tries to find the least loaded
+ host
+ label: Simple scheduler
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ disable_offload:
+ description: If set, generic segmentation offload (gso) and generic receive
+ offload (gro) on physical nics will be disabled. See ethtool man.
+ label: Disable generic offload on physical nics
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron' and networking_parameters:segmentation_type
+ == 'gre'
+ type: checkbox
+ value: true
+ weight: 80
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: vcenter
+ description: Choose this type of hypervisor if you run OpenStack in a vCenter
+ environment.
+ label: vCenter
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or cluster:net_provider
+ == 'neutron'
+ weight: 30
+ metadata:
+ label: Common
+ weight: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ type: text
+ value: 10.118.32.193, 8.8.8.8
+ weight: 10
+ metadata:
+ label: Upstream DNS
+ weight: 90
+ external_ntp:
+ metadata:
+ label: Upstream NTP
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP servers list
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 rootdelay=90 nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to
+ support networking over Mellanox NIC. Mellanox Neutron plugin will not
+ be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ nsx_plugin:
+ connector_type:
+ description: Default network transport type to use
+ label: NSX connector type
+ type: select
+ value: stt
+ values:
+ - data: gre
+ label: GRE
+ - data: ipsec_gre
+ label: GRE over IPSec
+ - data: stt
+ label: STT
+ - data: ipsec_stt
+ label: STT over IPSec
+ - data: bridge
+ label: Bridge
+ weight: 80
+ l3_gw_service_uuid:
+ description: UUID for the default L3 gateway service to use with this cluster
+ label: L3 service UUID
+ regex:
+ error: Invalid L3 gateway service UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 50
+ metadata:
+ enabled: false
+ label: VMware NSX
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron' or networking_parameters:net_l23_provider
+ != 'nsx'
+ weight: 20
+ nsx_controllers:
+ description: One or more IPv4[:port] addresses of NSX controller node, separated
+ by comma (e.g. 10.30.30.2,192.168.110.254:443)
+ label: NSX controller endpoint
+ regex:
+ error: Invalid controller endpoints, specify valid IPv4[:port] pair
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(,(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?)*$
+ type: text
+ value: ''
+ weight: 60
+ nsx_password:
+ description: Password for Administrator
+ label: NSX password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: ''
+ weight: 30
+ nsx_username:
+ description: NSX administrator's username
+ label: NSX username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ packages_url:
+ description: URL to NSX specific packages
+ label: URL to NSX bits
+ regex:
+ error: Invalid URL, specify valid HTTP/HTTPS URL with IPv4 address (e.g.
+ http://10.20.0.2/nsx)
+ source: ^https?://(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(/.*)?$
+ type: text
+ value: ''
+ weight: 70
+ replication_mode:
+ description: ''
+ label: NSX cluster has Service nodes
+ type: checkbox
+ value: true
+ weight: 90
+ transport_zone_uuid:
+ description: UUID of the pre-existing default NSX Transport zone
+ label: Transport zone UUID
+ regex:
+ error: Invalid transport zone UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 40
+ provision:
+ metadata:
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: cobbler
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: Classic (use anaconda or debian-installer)
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ and zabbix-server only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ 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)
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ 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)
+ 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:
+ - settings:common.libvirt_type.value != 'vcenter'
+ 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'
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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*$
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ type: text
+ value: '2'
+ weight: 85
+ vc_datacenter:
+ description: Inventory path to a datacenter. If you want to use ESXi host
+ as datastore, it should be "ha-datacenter".
+ label: Datacenter name
+ regex:
+ error: Empty datacenter
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 65
+ vc_datastore:
+ description: Datastore associated with the datacenter.
+ label: Datastore name
+ regex:
+ error: Empty datastore
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 60
+ vc_host:
+ description: IP Address of vCenter/ESXi
+ label: vCenter/ESXi IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 45
+ vc_image_dir:
+ description: The name of the directory where the glance images will be stored
+ in the VMware datastore.
+ label: Datastore Images directory
+ regex:
+ error: Empty images directory
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: /openstack_glance
+ weight: 70
+ vc_password:
+ description: vCenter/ESXi admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: password
+ value: ''
+ weight: 55
+ vc_user:
+ description: vCenter/ESXi admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 50
+ 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:common.libvirt_type.value
+ == 'vcenter'
+ type: checkbox
+ value: false
+ weight: 20
+ volumes_lvm:
+ description: Requires 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
+ volumes_vmdk:
+ description: Configures Cinder to store volumes via VMware vCenter.
+ label: VMware vCenter for volumes (Cinder)
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or settings:storage.volumes_lvm.value
+ == true
+ type: checkbox
+ value: false
+ weight: 15
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ vcenter:
+ cluster:
+ description: vCenter cluster name. If you have multiple clusters, use comma
+ to separate names
+ label: Cluster
+ regex:
+ error: Invalid cluster list
+ source: ^([^,\ ]+([\ ]*[^,\ ])*)(,[^,\ ]+([\ ]*[^,\ ])*)*$
+ type: text
+ value: ''
+ weight: 40
+ datastore_regex:
+ description: The Datastore regexp setting specifies the data stores to use
+ with Compute. For example, "nas.*". If you want to use all available datastores,
+ leave this field blank
+ label: Datastore regexp
+ regex:
+ error: Invalid datastore regexp
+ source: ^(\S.*\S|\S|)$
+ type: text
+ value: ''
+ weight: 50
+ host_ip:
+ description: IP Address of vCenter
+ label: vCenter IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ type: text
+ value: ''
+ weight: 10
+ metadata:
+ label: vCenter
+ restrictions:
+ - action: hide
+ condition: settings:common.libvirt_type.value != 'vcenter'
+ weight: 20
+ use_vcenter:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 5
+ vc_password:
+ description: vCenter admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 30
+ vc_user:
+ description: vCenter admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ vlan_interface:
+ description: Physical ESXi host ethernet adapter for VLAN networking (e.g.
+ vmnic1). If empty "vmnic0" is used by default
+ label: ESXi VLAN interface
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'nova_network' or networking_parameters:net_manager
+ != 'VlanManager'
+ type: text
+ value: ''
+ weight: 60
+ zabbix:
+ metadata:
+ label: Zabbix Access
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 70
+ password:
+ description: Password for Zabbix Administrator
+ label: password
+ type: password
+ value: zabbix
+ weight: 20
+ username:
+ description: Username for Zabbix Administrator
+ label: username
+ type: text
+ value: admin
+ weight: 10
diff --git a/fuel/prototypes/auto-deploy/examples/ipmi/conf/dha.yaml b/fuel/prototypes/auto-deploy/examples/ipmi/conf/dha.yaml
new file mode 100644
index 000000000..97629b758
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/ipmi/conf/dha.yaml
@@ -0,0 +1,52 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version: 1.1
+created: Mon May 4 09:03:46 UTC 2015
+comment: Test environment Ericsson Montreal
+
+# Adapter to use for this definition
+adapter: ipmi
+
+# Node list.
+# Mandatory properties are id and role.
+# The MAC address of the PXE boot interface for Fuel is not
+# mandatory to be defined.
+# All other properties are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 14:58:D0:55:E2:E0
+ ipmiIp: 10.118.32.202
+ ipmiUser: username
+ ipmiPass: password
+- id: 2
+ pxeMac: 9C:B6:54:8A:25:C0
+ ipmiIp: 10.118.32.213
+ ipmiUser: username
+ ipmiPass: password
+# Adding the Fuel node as node id 3 which may not be correct - please
+# adjust as needed.
+- id: 3
+ pxeMac: 52:54:00:bd:e4:21
+ libvirtName: vFuel
+ isFuel: yes
+
+# Deployment power on strategy
+# all: Turn on all nodes at once. There will be no correlation
+# between the DHA and DEA node numbering. MAC addresses
+# will be used to select the node roles though.
+# sequence: Turn on the nodes in sequence starting with the lowest order
+# node and wait for the node to be detected by Fuel. Not until
+# the node has been detected and assigned a role will the next
+# node be turned on.
+powerOnStrategy: sequence
+
+# If fuelCustomInstall is set to true, Fuel is assumed to be installed by
+# calling the DHA adapter function "dha_fuelCustomInstall()" with two
+# arguments: node ID and the ISO file name to deploy. The custom install
+# function is then to handle all necessary logic to boot the Fuel master
+# from the ISO and then return.
+# Allowed values: true, false
+
+fuelCustomInstall: true
+
diff --git a/fuel/prototypes/auto-deploy/examples/ipmi/conf/vm/vFuel b/fuel/prototypes/auto-deploy/examples/ipmi/conf/vm/vFuel
new file mode 100644
index 000000000..21865392b
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/ipmi/conf/vm/vFuel
@@ -0,0 +1,115 @@
+<domain type='kvm'>
+ <name>vFuel</name>
+ <uuid>daf21ecf-0dfe-4937-a155-8edde4f3ea76</uuid>
+ <memory unit='KiB'>8290304</memory>
+ <currentMemory unit='KiB'>8290304</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-utopic'>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>
+ </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-spice</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='/mnt/images/vFuel.raw'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <disk type='block' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/home/user/fueltmp/deploy-opnfv.iso'/>
+ <target dev='hda' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </controller>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:bd:e4:21'/>
+ <source bridge='vfuelnet'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <channel type='spicevmc'>
+ <target type='virtio' name='com.redhat.spice.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='spice' autoport='yes' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </sound>
+ <video>
+ <model type='qxl' ram='65536' vram='65536' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <redirdev bus='usb' type='spicevmc'>
+ </redirdev>
+ <redirdev bus='usb' type='spicevmc'>
+ </redirdev>
+ <redirdev bus='usb' type='spicevmc'>
+ </redirdev>
+ <redirdev bus='usb' type='spicevmc'>
+ </redirdev>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </memballoon>
+ </devices>
+ <seclabel type='dynamic' model='apparmor' relabel='yes'/>
+</domain>
+
diff --git a/fuel/prototypes/auto-deploy/examples/ipmi/install-ubuntu-packages.sh b/fuel/prototypes/auto-deploy/examples/ipmi/install-ubuntu-packages.sh
new file mode 100755
index 000000000..58ce19ac6
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/ipmi/install-ubuntu-packages.sh
@@ -0,0 +1,16 @@
+#!/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
+##############################################################################
+
+# Tools for installation on the libvirt server/base host
+#
+apt-get install -y libvirt-bin qemu-kvm tightvncserver virt-manager \
+ sshpass fuseiso genisoimage blackbox xterm
+restart libvirt-bin
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/README.txt b/fuel/prototypes/auto-deploy/examples/libvirt/README.txt
new file mode 100644
index 000000000..9cbfa5486
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/README.txt
@@ -0,0 +1,25 @@
+This is an example setup for the libvirt DHA adapter which will setup
+four libvirt networks:
+
+fuel1: NATed network for management and admin
+fuel2: Isolated network for storage
+fuel3: Isolated network for private
+fuel4: NATed network for public
+
+Four VMs will be created:
+
+fuel-master
+controller1
+compute4
+compute5
+
+Prerequisite: A Ubuntu 14.x host or later with sudo access.
+
+Start by installing the necessary Ubuntu packages by running
+"sudo install_ubuntu_packages.sh".
+
+Then (re)generate the libvirt network and VM setup by running
+"setup_vms.sh".
+
+You can then run deploy.sh with the corresponding dea.yaml and
+dha.yaml which can be found in the conf subdirectory.
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/dea.yaml b/fuel/prototypes/auto-deploy/examples/libvirt/conf/dea.yaml
new file mode 100644
index 000000000..5d2f55f30
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/dea.yaml
@@ -0,0 +1,975 @@
+title: Deployment Environment Adapter (DEA)
+# DEA API version supported
+version: 1.1
+created: Sat Apr 25 16:26:22 UTC 2015
+comment: Small libvirt setup
+nodes:
+- id: 1
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+ role: controller
+- id: 2
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+ role: compute
+- id: 3
+ interfaces:
+ eth0:
+ - fuelweb_admin
+ - management
+ eth1:
+ - storage
+ eth2:
+ - private
+ eth3:
+ - public
+ role: compute
+environment_mode: multinode
+environment_name: opnfv59-b
+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
+ DNS_DOMAIN: domain.tld
+ DNS_SEARCH: domain.tld
+ DNS_UPSTREAM: 8.8.8.8
+ FUEL_ACCESS:
+ password: admin
+ user: admin
+ HOSTNAME: opnfv59
+ NTP1: 0.pool.ntp.org
+ NTP2: 1.pool.ntp.org
+ NTP3: 2.pool.ntp.org
+controller:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-ex
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 102
+ - 0
+ vlan_ids:
+ - 102
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-mgmt
+ tags:
+ - 101
+ - 0
+ vlan_ids:
+ - 101
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth3
+ - br-ex
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+compute:
+- action: add-br
+ name: br-eth0
+- action: add-port
+ bridge: br-eth0
+ name: eth0
+- action: add-br
+ name: br-eth1
+- action: add-port
+ bridge: br-eth1
+ name: eth1
+- action: add-br
+ name: br-eth2
+- action: add-port
+ bridge: br-eth2
+ name: eth2
+- action: add-br
+ name: br-eth3
+- action: add-port
+ bridge: br-eth3
+ name: eth3
+- action: add-br
+ name: br-mgmt
+- action: add-br
+ name: br-storage
+- action: add-br
+ name: br-fw-admin
+- action: add-patch
+ bridges:
+ - br-eth1
+ - br-storage
+ tags:
+ - 102
+ - 0
+ vlan_ids:
+ - 102
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-mgmt
+ tags:
+ - 101
+ - 0
+ vlan_ids:
+ - 101
+ - 0
+- action: add-patch
+ bridges:
+ - br-eth0
+ - br-fw-admin
+ trunks:
+ - 0
+- action: add-br
+ name: br-prv
+- action: add-patch
+ bridges:
+ - br-eth2
+ - br-prv
+opnfv:
+ compute: {}
+ controller: {}
+network:
+ networking_parameters:
+ base_mac: fa:16:3e:00:00:00
+ dns_nameservers:
+ - 8.8.4.4
+ - 8.8.8.8
+ 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
+ net_l23_provider: ovs
+ segmentation_type: vlan
+ vlan_range:
+ - 1000
+ - 1030
+ networks:
+ - cidr: 172.16.0.0/24
+ gateway: 172.16.0.1
+ ip_ranges:
+ - - 172.16.0.2
+ - 172.16.0.126
+ meta:
+ assign_vip: true
+ 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
+ vlan_start: null
+ name: public
+ vlan_start: null
+ - cidr: 192.168.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.0.1
+ - 192.168.0.254
+ meta:
+ assign_vip: true
+ cidr: 192.168.0.0/24
+ configurable: true
+ map_priority: 2
+ name: management
+ notation: cidr
+ render_addr_mask: internal
+ render_type: cidr
+ use_gateway: false
+ vlan_start: 101
+ name: management
+ vlan_start: 101
+ - cidr: 192.168.1.0/24
+ gateway: null
+ ip_ranges:
+ - - 192.168.1.1
+ - 192.168.1.254
+ meta:
+ assign_vip: false
+ 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: null
+ gateway: null
+ ip_ranges: []
+ meta:
+ assign_vip: false
+ 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
+ - cidr: 10.20.0.0/24
+ gateway: null
+ ip_ranges:
+ - - 10.20.0.3
+ - 10.20.0.254
+ meta:
+ assign_vip: false
+ 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:
+ access:
+ email:
+ description: Email address for Administrator
+ label: email
+ type: text
+ value: admin@localhost
+ weight: 40
+ metadata:
+ label: Access
+ weight: 10
+ password:
+ description: Password for Administrator
+ label: password
+ 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$)(?![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$)(?![Gg]uest$).*
+ type: text
+ value: admin
+ weight: 10
+ additional_components:
+ ceilometer:
+ description: If selected, Ceilometer component will be installed
+ label: Install Ceilometer
+ type: checkbox
+ value: false
+ weight: 40
+ heat:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 30
+ metadata:
+ label: Additional Components
+ weight: 20
+ murano:
+ description: If selected, Murano component will be installed
+ label: Install Murano
+ restrictions:
+ - cluster:net_provider != 'neutron'
+ type: checkbox
+ value: false
+ weight: 20
+ sahara:
+ description: If selected, Sahara component will be installed
+ label: Install Sahara
+ type: checkbox
+ value: false
+ weight: 10
+ common:
+ auth_key:
+ description: Public key(s) to include in authorized_keys on deployed nodes
+ label: Public Key
+ type: text
+ value: ''
+ weight: 70
+ auto_assign_floating_ip:
+ description: If selected, OpenStack will automatically assign a floating IP
+ to a new instance
+ label: Auto assign floating IP
+ restrictions:
+ - cluster:net_provider == 'neutron'
+ type: checkbox
+ value: false
+ weight: 40
+ compute_scheduler_driver:
+ label: Scheduler driver
+ type: radio
+ value: nova.scheduler.filter_scheduler.FilterScheduler
+ values:
+ - data: nova.scheduler.filter_scheduler.FilterScheduler
+ description: Currently the most advanced OpenStack scheduler. See the OpenStack
+ documentation for details.
+ label: Filter scheduler
+ - data: nova.scheduler.simple.SimpleScheduler
+ description: This is 'naive' scheduler which tries to find the least loaded
+ host
+ label: Simple scheduler
+ weight: 40
+ debug:
+ description: Debug logging mode provides more information, but requires more
+ disk space.
+ label: OpenStack debug logging
+ type: checkbox
+ value: false
+ weight: 20
+ disable_offload:
+ description: If set, generic segmentation offload (gso) and generic receive
+ offload (gro) on physical nics will be disabled. See ethtool man.
+ label: Disable generic offload on physical nics
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider == 'neutron' and networking_parameters:segmentation_type
+ == 'gre'
+ type: checkbox
+ value: true
+ weight: 80
+ libvirt_type:
+ label: Hypervisor type
+ type: radio
+ value: kvm
+ values:
+ - data: kvm
+ description: Choose this type of hypervisor if you run OpenStack on hardware
+ label: KVM
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: qemu
+ description: Choose this type of hypervisor if you run OpenStack on virtual
+ hosts.
+ label: QEMU
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ - data: vcenter
+ description: Choose this type of hypervisor if you run OpenStack in a vCenter
+ environment.
+ label: vCenter
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or cluster:net_provider
+ == 'neutron'
+ weight: 30
+ metadata:
+ label: Common
+ weight: 30
+ nova_quota:
+ description: Quotas are used to limit CPU and memory usage for tenants. Enabling
+ quotas will increase load on the Nova database.
+ label: Nova quotas
+ type: checkbox
+ value: false
+ weight: 25
+ 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.
+ label: Resume guests state on host boot
+ type: checkbox
+ value: true
+ weight: 60
+ 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.
+ label: Use qcow format for images
+ type: checkbox
+ value: true
+ weight: 50
+ corosync:
+ group:
+ description: ''
+ label: Group
+ type: text
+ value: 226.94.1.1
+ weight: 10
+ metadata:
+ 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_dns:
+ dns_list:
+ description: List of upstream DNS servers, separated by comma
+ label: DNS list
+ type: text
+ value: 8.8.8.8, 8.8.4.4
+ weight: 10
+ metadata:
+ label: Upstream DNS
+ weight: 90
+ external_ntp:
+ metadata:
+ label: Upstream NTP
+ weight: 100
+ ntp_list:
+ description: List of upstream NTP servers, separated by comma
+ label: NTP servers list
+ type: text
+ value: 0.pool.ntp.org, 1.pool.ntp.org
+ weight: 10
+ kernel_params:
+ kernel:
+ description: Default kernel parameters
+ label: Initial parameters
+ type: text
+ value: console=ttyS0,9600 console=tty0 rootdelay=90 nomodeset
+ weight: 45
+ metadata:
+ label: Kernel parameters
+ weight: 40
+ neutron_mellanox:
+ metadata:
+ enabled: true
+ label: Mellanox Neutron components
+ toggleable: false
+ weight: 50
+ plugin:
+ label: Mellanox drivers and SR-IOV plugin
+ type: radio
+ value: disabled
+ values:
+ - data: disabled
+ description: If selected, Mellanox drivers, Neutron and Cinder plugin will
+ not be installed.
+ label: Mellanox drivers and plugins disabled
+ restrictions:
+ - settings:storage.iser.value == true
+ - data: drivers_only
+ description: If selected, Mellanox Ethernet drivers will be installed to
+ support networking over Mellanox NIC. Mellanox Neutron plugin will not
+ be installed.
+ label: Install only Mellanox drivers
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm'
+ - data: ethernet
+ description: If selected, both Mellanox Ethernet drivers and Mellanox network
+ acceleration (Neutron) plugin will be installed.
+ label: Install Mellanox drivers and SR-IOV plugin
+ restrictions:
+ - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
+ == 'neutron' and networking_parameters:segmentation_type == 'vlan')
+ weight: 60
+ vf_num:
+ description: Note that one virtual function will be reserved to the storage
+ network, in case of choosing iSER.
+ label: Number of virtual NICs
+ restrictions:
+ - settings:neutron_mellanox.plugin.value != 'ethernet'
+ type: text
+ value: '16'
+ weight: 70
+ nsx_plugin:
+ connector_type:
+ description: Default network transport type to use
+ label: NSX connector type
+ type: select
+ value: stt
+ values:
+ - data: gre
+ label: GRE
+ - data: ipsec_gre
+ label: GRE over IPSec
+ - data: stt
+ label: STT
+ - data: ipsec_stt
+ label: STT over IPSec
+ - data: bridge
+ label: Bridge
+ weight: 80
+ l3_gw_service_uuid:
+ description: UUID for the default L3 gateway service to use with this cluster
+ label: L3 service UUID
+ regex:
+ error: Invalid L3 gateway service UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 50
+ metadata:
+ enabled: false
+ label: VMware NSX
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron' or networking_parameters:net_l23_provider
+ != 'nsx'
+ weight: 20
+ nsx_controllers:
+ description: One or more IPv4[:port] addresses of NSX controller node, separated
+ by comma (e.g. 10.30.30.2,192.168.110.254:443)
+ label: NSX controller endpoint
+ regex:
+ error: Invalid controller endpoints, specify valid IPv4[:port] pair
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(,(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?)*$
+ type: text
+ value: ''
+ weight: 60
+ nsx_password:
+ description: Password for Administrator
+ label: NSX password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: ''
+ weight: 30
+ nsx_username:
+ description: NSX administrator's username
+ label: NSX username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ packages_url:
+ description: URL to NSX specific packages
+ label: URL to NSX bits
+ regex:
+ error: Invalid URL, specify valid HTTP/HTTPS URL with IPv4 address (e.g.
+ http://10.20.0.2/nsx)
+ source: ^https?://(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])(:(6553[0-5]|655[0-2][\d]|65[0-4][\d]{2}|6[0-4][\d]{3}|5[\d]{4}|[\d][\d]{0,3}))?(/.*)?$
+ type: text
+ value: ''
+ weight: 70
+ replication_mode:
+ description: ''
+ label: NSX cluster has Service nodes
+ type: checkbox
+ value: true
+ weight: 90
+ transport_zone_uuid:
+ description: UUID of the pre-existing default NSX Transport zone
+ label: Transport zone UUID
+ regex:
+ error: Invalid transport zone UUID
+ source: '[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}'
+ type: text
+ value: ''
+ weight: 40
+ provision:
+ metadata:
+ label: Provision
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 80
+ method:
+ description: Which provision method to use for this cluster.
+ label: Provision method
+ type: radio
+ value: cobbler
+ values:
+ - data: image
+ description: Copying pre-built images on a disk.
+ label: Image
+ - data: cobbler
+ description: Install from scratch using anaconda or debian-installer.
+ label: Classic (use anaconda or debian-installer)
+ public_network_assignment:
+ assign_to_all_nodes:
+ description: When disabled, public network will be assigned to controllers
+ and zabbix-server only
+ label: Assign public network to all nodes
+ type: checkbox
+ value: false
+ weight: 10
+ metadata:
+ label: Public network assignment
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'neutron'
+ weight: 50
+ 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)
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ 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)
+ 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:
+ - settings:common.libvirt_type.value != 'vcenter'
+ 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'
+ type: checkbox
+ value: false
+ weight: 11
+ metadata:
+ label: Storage
+ 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)
+ restrictions:
+ - settings:storage.images_ceph.value == false
+ 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*$
+ restrictions:
+ - settings:common.libvirt_type.value == 'vcenter'
+ type: text
+ value: '2'
+ weight: 85
+ vc_datacenter:
+ description: Inventory path to a datacenter. If you want to use ESXi host
+ as datastore, it should be "ha-datacenter".
+ label: Datacenter name
+ regex:
+ error: Empty datacenter
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 65
+ vc_datastore:
+ description: Datastore associated with the datacenter.
+ label: Datastore name
+ regex:
+ error: Empty datastore
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 60
+ vc_host:
+ description: IP Address of vCenter/ESXi
+ label: vCenter/ESXi IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 45
+ vc_image_dir:
+ description: The name of the directory where the glance images will be stored
+ in the VMware datastore.
+ label: Datastore Images directory
+ regex:
+ error: Empty images directory
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: /openstack_glance
+ weight: 70
+ vc_password:
+ description: vCenter/ESXi admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: password
+ value: ''
+ weight: 55
+ vc_user:
+ description: vCenter/ESXi admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ restrictions:
+ - action: hide
+ condition: settings:storage.images_vcenter.value == false or settings:common.libvirt_type.value
+ != 'vcenter'
+ type: text
+ value: ''
+ weight: 50
+ 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:common.libvirt_type.value
+ == 'vcenter'
+ type: checkbox
+ value: false
+ weight: 20
+ volumes_lvm:
+ description: Requires at least one Storage - Cinder LVM node.
+ label: Cinder LVM over iSCSI for volumes
+ restrictions:
+ - settings:storage.volumes_ceph.value == true
+ type: checkbox
+ value: true
+ weight: 10
+ volumes_vmdk:
+ description: Configures Cinder to store volumes via VMware vCenter.
+ label: VMware vCenter for volumes (Cinder)
+ restrictions:
+ - settings:common.libvirt_type.value != 'vcenter' or settings:storage.volumes_lvm.value
+ == true
+ type: checkbox
+ value: false
+ weight: 15
+ syslog:
+ metadata:
+ label: Syslog
+ 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
+ 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
+ vcenter:
+ cluster:
+ description: vCenter cluster name. If you have multiple clusters, use comma
+ to separate names
+ label: Cluster
+ regex:
+ error: Invalid cluster list
+ source: ^([^,\ ]+([\ ]*[^,\ ])*)(,[^,\ ]+([\ ]*[^,\ ])*)*$
+ type: text
+ value: ''
+ weight: 40
+ datastore_regex:
+ description: The Datastore regexp setting specifies the data stores to use
+ with Compute. For example, "nas.*". If you want to use all available datastores,
+ leave this field blank
+ label: Datastore regexp
+ regex:
+ error: Invalid datastore regexp
+ source: ^(\S.*\S|\S|)$
+ type: text
+ value: ''
+ weight: 50
+ host_ip:
+ description: IP Address of vCenter
+ label: vCenter IP
+ regex:
+ error: Specify valid IPv4 address
+ source: ^(([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])\.){3}([\d]|[1-9][\d]|1[\d]{2}|2[0-4][\d]|25[0-5])$
+ type: text
+ value: ''
+ weight: 10
+ metadata:
+ label: vCenter
+ restrictions:
+ - action: hide
+ condition: settings:common.libvirt_type.value != 'vcenter'
+ weight: 20
+ use_vcenter:
+ description: ''
+ label: ''
+ type: hidden
+ value: true
+ weight: 5
+ vc_password:
+ description: vCenter admin password
+ label: Password
+ regex:
+ error: Empty password
+ source: \S
+ type: password
+ value: admin
+ weight: 30
+ vc_user:
+ description: vCenter admin username
+ label: Username
+ regex:
+ error: Empty username
+ source: \S
+ type: text
+ value: admin
+ weight: 20
+ vlan_interface:
+ description: Physical ESXi host ethernet adapter for VLAN networking (e.g.
+ vmnic1). If empty "vmnic0" is used by default
+ label: ESXi VLAN interface
+ restrictions:
+ - action: hide
+ condition: cluster:net_provider != 'nova_network' or networking_parameters:net_manager
+ != 'VlanManager'
+ type: text
+ value: ''
+ weight: 60
+ zabbix:
+ metadata:
+ label: Zabbix Access
+ restrictions:
+ - action: hide
+ condition: not ('experimental' in version:feature_groups)
+ weight: 70
+ password:
+ description: Password for Zabbix Administrator
+ label: password
+ type: password
+ value: zabbix
+ weight: 20
+ username:
+ description: Username for Zabbix Administrator
+ label: username
+ type: text
+ value: admin
+ weight: 10
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/dha.yaml b/fuel/prototypes/auto-deploy/examples/libvirt/conf/dha.yaml
new file mode 100644
index 000000000..66395e86b
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/dha.yaml
@@ -0,0 +1,49 @@
+title: Deployment Hardware Adapter (DHA)
+# DHA API version supported
+version: 1.1
+created: Sat Apr 25 16:26:22 UTC 2015
+comment: Small libvirt setup
+
+# Adapter to use for this definition
+adapter: libvirt
+
+# Node list.
+# Mandatory fields are id and role.
+# The MAC address of the PXE boot interface is not mandatory
+# to be set, but the field must be present.
+# All other fields are adapter specific.
+
+nodes:
+- id: 1
+ pxeMac: 52:54:00:aa:dd:84
+ libvirtName: controller1
+- id: 2
+ pxeMac: 52:54:00:41:64:f3
+ libvirtName: compute4
+- id: 3
+ pxeMac: 52:54:00:69:a0:79
+ libvirtName: compute5
+- id: 4
+ pxeMac: 52:54:00:f8:b0:75
+ libvirtName: fuel-master
+ isFuel: yes
+
+# Deployment power on strategy
+# all: Turn on all nodes at once. There will be no correlation
+# between the DHA and DEA node numbering. MAC addresses
+# will be used to select the node roles though.
+# sequence: Turn on the nodes in sequence starting with the lowest order
+# node and wait for the node to be detected by Fuel. Not until
+# the node has been detected and assigned a role will the next
+# node be turned on.
+powerOnStrategy: all
+
+# If fuelCustomInstall is set to true, Fuel is assumed to be installed by
+# calling the DHA adapter function "dha_fuelCustomInstall()" with two
+# arguments: node ID and the ISO file name to deploy. The custom install
+# function is then to handle all necessary logic to boot the Fuel master
+# from the ISO and then return.
+# Allowed values: true, false
+
+fuelCustomInstall: false
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel1 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel1
new file mode 100644
index 000000000..7b2b15423
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel1
@@ -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/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel2 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel2
new file mode 100644
index 000000000..615c92094
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel2
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel2</name>
+ <bridge name='fuel2' stp='on' delay='0'/>
+</network>
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel3 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel3
new file mode 100644
index 000000000..2383e6c1f
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel3
@@ -0,0 +1,5 @@
+<network>
+ <name>fuel3</name>
+ <bridge name='fuel3' stp='on' delay='0'/>
+</network>
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel4 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel4
new file mode 100644
index 000000000..5b69f912d
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/networks/fuel4
@@ -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/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute4 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute4
new file mode 100644
index 000000000..ad5d4d1c8
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute4
@@ -0,0 +1,107 @@
+<domain type='kvm'>
+ <name>compute4</name>
+ <uuid>6206efbf-18e1-492e-951a-60eda6676ef5</uuid>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-1.0'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ <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='raw'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <mac address='52:54:00:41:64:f3'/>
+ <source network='fuel1'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:67:00:5e'/>
+ <source network='fuel2'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:3e:dd:0d'/>
+ <source network='fuel3'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:a6:3c:32'/>
+ <source network='fuel4'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+ <sound model='ich6'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute5 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute5
new file mode 100644
index 000000000..39059066c
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/compute5
@@ -0,0 +1,106 @@
+<domain type='kvm'>
+ <name>compute5</name>
+ <uuid>2c1e50fa-110f-4ab7-98ff-7c5e08c8f38f</uuid>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-1.0'>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='raw'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <mac address='52:54:00:69:a0:79'/>
+ <source network='fuel1'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:58:4c:df'/>
+ <source network='fuel2'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:27:54:1d'/>
+ <source network='fuel3'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:84:b8:c4'/>
+ <source network='fuel4'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+ <sound model='ich6'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/controller1 b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/controller1
new file mode 100644
index 000000000..ca1bd3b05
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/controller1
@@ -0,0 +1,106 @@
+<domain type='kvm'>
+ <name>controller1</name>
+ <uuid>ce9897c1-d9e7-452c-b998-9fad0cf5b9db</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-1.0'>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='raw'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <mac address='52:54:00:aa:dd:84'/>
+ <source network='fuel1'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:e4:6e:d9'/>
+ <source network='fuel2'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:60:88:73'/>
+ <source network='fuel3'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:f0:b2:0f'/>
+ <source network='fuel4'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+ <sound model='ich6'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/fuel-master b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/fuel-master
new file mode 100644
index 000000000..d2a78411c
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/conf/vms/fuel-master
@@ -0,0 +1,102 @@
+<domain type='kvm'>
+ <name>fuel-master</name>
+ <uuid>caabab80-b42f-4f9d-9c0d-18f274c4cb58</uuid>
+ <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-1.0'>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/>
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='disk.raw'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='network'>
+ <mac address='52:54:00:f8:b0:75'/>
+ <source network='fuel1'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+ <listen type='address' address='127.0.0.1'/>
+ </graphics>
+ <sound model='ich6'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </sound>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/install-ubuntu-packages.sh b/fuel/prototypes/auto-deploy/examples/libvirt/install-ubuntu-packages.sh
new file mode 100755
index 000000000..58ce19ac6
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/install-ubuntu-packages.sh
@@ -0,0 +1,16 @@
+#!/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
+##############################################################################
+
+# Tools for installation on the libvirt server/base host
+#
+apt-get install -y libvirt-bin qemu-kvm tightvncserver virt-manager \
+ sshpass fuseiso genisoimage blackbox xterm
+restart libvirt-bin
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/setup_example_vms.sh b/fuel/prototypes/auto-deploy/examples/libvirt/setup_example_vms.sh
new file mode 100755
index 000000000..e0388ac66
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/setup_example_vms.sh
@@ -0,0 +1,105 @@
+#!/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_handler() {
+ rm $tmpfile
+}
+
+
+error_exit () {
+ echo "$@"
+ exit 1
+}
+
+trap exit_handler EXIT
+
+# You can change these disk sizes to adapt to your needs
+fueldisk="30G"
+controllerdisk="20G"
+computedisk="20G"
+
+
+topdir=$(dirname $(readlink -f $BASH_SOURCE))
+netdir=$topdir/conf/networks
+vmdir=$topdir/conf/vms
+tmpfile=`mktemp /tmp/XXXXX`
+
+if [ ! -d $netdir ]; then
+ error_exit "No net directory $netdir"
+ exit 1
+elif [ ! -d $vmdir ]; then
+ error_exit "No VM directory $vmdir"
+ exit 1
+fi
+
+if [ $# -ne 1 ]; then
+ echo "Argument error."
+ echo "`basename $0` <path to storage dir>"
+ exit 1
+fi
+
+if [ "`whoami`" != "root" ]; then
+ error_exit "You need be root to run this script"
+fi
+
+echo "Cleaning up"
+tools/cleanup_example_vms.sh
+
+storagedir=$1
+
+if [ ! -d $storagedir ]; then
+ error_exit "Could not find storagedir directory $storagedir"
+fi
+
+# Create storage space and patch it in
+for vm in $vmdir/*
+do
+ vmname=`basename $vm`
+ virsh dumpxml $vmname >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "Found vm $vmname, deleting"
+ virsh destroy $vmname
+ virsh undefine $vmname
+ sleep 10
+
+ fi
+
+
+ storage=${storagedir}/`basename ${vm}`.raw
+ if [ -f ${storage} ]; then
+ echo "Storage already present, removing: $storage"
+ rm $storage
+ fi
+
+ echo `basename $vm` | grep -q fuel-master && size=$fueldisk
+ echo `basename $vm` | grep -q controller && size=$controllerdisk
+ echo `basename $vm` | grep -q compute && size=$computedisk
+
+ echo "Creating ${size} GB of storage in ${storage}"
+ fallocate -l ${size} ${storage} || \
+ error_exit "Could not create storage"
+ sed "s:<source file='disk.raw':<source file='${storage}':" $vm >$tmpfile
+ virsh define $tmpfile
+done
+
+for net in $netdir/*
+do
+ netname=`basename $net`
+ virsh net-dumpxml $netname >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "Found net $netname, deleting"
+ virsh net-destroy $netname
+ virsh net-undefine $netname
+ fi
+ virsh net-define $net
+ virsh net-autostart $netname
+ virsh net-start $netname
+done
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/tools/cleanup_example_vms.sh b/fuel/prototypes/auto-deploy/examples/libvirt/tools/cleanup_example_vms.sh
new file mode 100755
index 000000000..960b21ea6
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/tools/cleanup_example_vms.sh
@@ -0,0 +1,58 @@
+#!/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
+##############################################################################
+
+
+error_exit () {
+ echo "$@"
+ exit 1
+}
+
+topdir=$(cd $(dirname $(readlink -f $BASH_SOURCE)); cd ..; pwd)
+netdir=$topdir/conf/networks
+vmdir=$topdir/conf/vms
+
+if [ ! -d $netdir ]; then
+ error_exit "No net directory $netdir"
+ exit 1
+elif [ ! -d $vmdir ]; then
+ error_exit "No VM directory $vmdir"
+ exit 1
+fi
+
+
+if [ "`whoami`" != "root" ]; then
+ error_exit "You need be root to run this script"
+fi
+
+for vm in $vmdir/*
+do
+ vmname=`basename $vm`
+ virsh dumpxml $vmname >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ diskfile=`virsh dumpxml $vmname | grep "<source file=" | grep raw | \
+ sed "s/.*<source file='\(.*\)'.*/\1/"`
+ echo "Removing $vmname with disk $diskfile"
+ virsh destroy $vmname 2>/dev/null
+ virsh undefine $vmname
+ rm -f $diskfile
+ fi
+done
+
+for net in $netdir/*
+do
+ netname=`basename $net`
+ virsh net-dumpxml $netname >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "Found net $netname, deleting"
+ virsh net-destroy $netname
+ virsh net-undefine $netname
+ fi
+done
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh b/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh
new file mode 100755
index 000000000..cdd029fc5
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh
@@ -0,0 +1,68 @@
+#!/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
+##############################################################################
+
+topdir=$(cd $(dirname $(readlink -f $BASH_SOURCE)); cd ..; pwd)
+netdir=$topdir/conf/networks
+vmdir=$topdir/conf/vms
+vms="fuel-master controller1 compute4 compute5"
+networks="fuel1 fuel2 fuel3 fuel4"
+
+
+if [ "`whoami`" != "root" ]; then
+ error_exit "You need be root to run this script"
+fi
+
+mkdir -p $netdir
+mkdir -p $vmdir
+
+if [ `ls -1 $netdir/ | wc -l` -ne 0 ]; then
+ echo "There are files in $netdir already!"
+ exit 1
+elif [ `ls -1 $vmdir/ | wc -l` -ne 0 ]; then
+ echo "There are files in $vmdir already!"
+ exit 1
+fi
+
+
+# Check that no VM is up
+for vm in $vms
+do
+ if [ "`virsh domstate $vm`" == "running" ]; then
+ echo "Can't dump while VM are up: $vm"
+ exit 1
+ fi
+done
+
+# Dump all networks in the fuell* namespace
+for net in $networks
+do
+ virsh net-dumpxml $net > $netdir/$net
+done
+
+# Dump all fuel-master, compute* and controller* VMs
+for vm in $vms
+do
+ virsh dumpxml $vm > $vmdir/$vm
+done
+
+# Remove all attached ISOs, generalize disk file
+for vm in $vmdir/*
+do
+ sed -i '/.iso/d' $vm
+ sed -i "s/<source file='.*raw'/<source file='disk.raw'/" $vm
+done
+
+# Generalize all nets
+for net in $netdir/*
+do
+ sed -i '/<uuid/d' $net
+ sed -i '/<mac/d' $net
+done
diff --git a/fuel/prototypes/auto-deploy/list_fixmes.sh b/fuel/prototypes/auto-deploy/list_fixmes.sh
new file mode 100755
index 000000000..651c478f9
--- /dev/null
+++ b/fuel/prototypes/auto-deploy/list_fixmes.sh
@@ -0,0 +1,19 @@
+#!/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
+##############################################################################
+
+for file in `find . -type f -exec egrep -il "FIXME|TODO" {} \; \
+ | grep -v list_fixmes.sh \
+ | grep -v TODO.txt`
+do
+ echo "***** Things to fix in $file *****"
+ egrep -i "FIXME|TODO" $file
+ echo ""
+done
diff --git a/onboarding.txt b/onboarding.txt
new file mode 100644
index 000000000..a6a7fcc1c
--- /dev/null
+++ b/onboarding.txt
@@ -0,0 +1,8 @@
+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.
+
+Full Name:
+IRC Nick:
+Linux Foundation ID:
+Favourite Open Source project:
+How would you like to help with this project: