Starting point for ODL Integration 94/94/5
authorJonas Bjurel <jonas.bjurel@ericsson.com>
Mon, 2 Mar 2015 21:46:45 +0000 (22:46 +0100)
committerJonas Bjurel <jonas.bjurel@ericsson.com>
Mon, 9 Mar 2015 22:00:13 +0000 (23:00 +0100)
***CAN BE MERGED***
- ODL build and installation (puppet manifests) including needed dependencies
- Modified in accordance with Randy Levensalors comments
- Added chmod 4755 /bin/fusermount due to that lately some systems dont install fuseiso
  withe SUID set for fusermount. Investing ongoing on why and why not consistent.
- Rebased with master
- ODL disabled in top Make (enable it by uncommenting the odl dirs
- Removed white spaces
- Hopefully fixed an issue with the docker ubuntu repos, added --no-cache=true to the fuel/docker/Make file.

TODO:
- Refactor collecting ODL and Java dependencies to one common place
- Refactoring top Makefile
- Adding CI hooks for build and deploy
- Finishing integration plumbing wit Neutron/ML2 and OVS/OVSDB

Change-Id: I13dd4d3a72d099316dfaa9f7cd9140781be2397b
Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
135 files changed:
fuel-build/f_osnaily/Makefile [deleted file]
fuel-build/f_resolvconf/Makefile [deleted file]
fuel/build/DOC/BUILD/README.architecture [moved from fuel-build/DOC/BUILD/README.architecture with 100% similarity]
fuel/build/DOC/BUILD/README.build [moved from fuel-build/DOC/BUILD/README.build with 59% similarity]
fuel/build/DOC/BUILD/README.examples [moved from fuel-build/DOC/BUILD/README.examples with 100% similarity]
fuel/build/DOC/INSTALL/README [moved from fuel-build/DOC/INSTALL/README with 100% similarity]
fuel/build/Makefile [new file with mode: 0644]
fuel/build/Makefile~ [moved from fuel-build/Makefile with 70% similarity]
fuel/build/README [moved from fuel-build/README with 97% similarity]
fuel/build/RELEASENOTES [new file with mode: 0644]
fuel/build/TODO [moved from fuel-build/TODO with 63% similarity]
fuel/build/add_opnfv_packages [moved from fuel-build/add_opnfv_packages with 100% similarity]
fuel/build/apply_patches [moved from fuel-build/apply_patches with 100% similarity]
fuel/build/config.mk [new file with mode: 0644]
fuel/build/docker/Makefile [moved from fuel-build/docker/Makefile with 88% similarity]
fuel/build/docker/README [moved from fuel-build/docker/README with 100% similarity]
fuel/build/docker/runcontext [moved from fuel-build/docker/runcontext with 100% similarity]
fuel/build/docker/ubuntu-builder/Dockerfile [moved from fuel-build/docker/ubuntu-builder/Dockerfile with 78% similarity]
fuel/build/docker/ubuntu-builder/enable_dockerx2 [moved from fuel-build/docker/ubuntu-builder/enable_dockerx2 with 97% similarity]
fuel/build/docker/ubuntu-builder/install.sh [new file with mode: 0755]
fuel/build/docker/ubuntu-builder/setcontext [moved from fuel-build/docker/ubuntu-builder/setcontext with 100% similarity, mode: 0755]
fuel/build/f_atk_wrap/Makefile [new file with mode: 0644]
fuel/build/f_atk_wrap/puppet/modules/opnfv/manifests/atk_wrap.pp [new file with mode: 0644]
fuel/build/f_ca_cert/Makefile [new file with mode: 0644]
fuel/build/f_ca_cert/puppet/modules/opnfv/manifests/ca_cert.pp [new file with mode: 0644]
fuel/build/f_comm_java/Makefile [new file with mode: 0644]
fuel/build/f_comm_java/puppet/modules/opnfv/manifests/comm_java.pp [new file with mode: 0644]
fuel/build/f_defjre/Makefile [new file with mode: 0644]
fuel/build/f_defjre/puppet/modules/opnfv/manifests/defjre.pp [new file with mode: 0644]
fuel/build/f_example_control_bond/Makefile [moved from fuel-build/f_opnfv_puppet/Makefile with 92% similarity]
fuel/build/f_example_control_bond/README [moved from fuel-build/f_example_control_bond/README with 100% similarity]
fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond [moved from fuel-build/f_example_control_bond/puppet/modules/opnfv/files/control-bond with 100% similarity]
fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp [moved from fuel-build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp with 100% similarity]
fuel/build/f_example_packadd/Makefile [moved from fuel-build/f_example_packadd/Makefile with 52% similarity]
fuel/build/f_example_packadd/README [moved from fuel-build/f_example_packadd/README with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles [moved from fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control [moved from fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/control with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst [moved from fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf [moved from fuel-build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar [moved from fuel-build/f_example_packadd/foobar_1.0-1/usr/bin/foobar with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian [moved from fuel-build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian with 100% similarity]
fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright [moved from fuel-build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright with 100% similarity]
fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp [moved from fuel-build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp with 100% similarity]
fuel/build/f_gif/Makefile [new file with mode: 0644]
fuel/build/f_gif/puppet/modules/opnfv/manifests/gif.pp [new file with mode: 0644]
fuel/build/f_isoroot/Makefile [moved from fuel-build/f_isoroot/Makefile with 100% similarity]
fuel/build/f_isoroot/README [moved from fuel-build/f_isoroot/README with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/Makefile [moved from fuel-build/f_isoroot/f_bootstrap/Makefile with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/README [moved from fuel-build/f_isoroot/f_bootstrap/README with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh [moved from fuel-build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig [moved from fuel-build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh [moved from fuel-build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh [moved from fuel-build/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh [moved from fuel-build/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh with 100% similarity]
fuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh [moved from fuel-build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh with 100% similarity]
fuel/build/f_isoroot/f_kscfg/Makefile [moved from fuel-build/f_isoroot/f_kscfg/Makefile with 100% similarity]
fuel/build/f_isoroot/f_kscfg/README [moved from fuel-build/f_isoroot/f_kscfg/README with 100% similarity]
fuel/build/f_isoroot/f_kscfg/ks.cfg [moved from fuel-build/f_isoroot/f_kscfg/ks.cfg with 100% similarity]
fuel/build/f_isoroot/f_kscfg/ks.cfg.orig [moved from fuel-build/f_isoroot/f_kscfg/ks.cfg.orig with 100% similarity]
fuel/build/f_isoroot/f_predeployment/Makefile [moved from fuel-build/f_isoroot/f_predeployment/Makefile with 100% similarity]
fuel/build/f_isoroot/f_predeployment/README [moved from fuel-build/f_isoroot/f_predeployment/README with 100% similarity]
fuel/build/f_isoroot/f_predeployment/pre-deploy.sh [moved from fuel-build/f_isoroot/f_predeployment/pre-deploy.sh with 100% similarity]
fuel/build/f_isoroot/f_predeployment/sysinfo.sh [moved from fuel-build/f_isoroot/f_predeployment/sysinfo.sh with 100% similarity]
fuel/build/f_isoroot/f_predeployment/transform_yaml.py [moved from fuel-build/f_isoroot/f_predeployment/transform_yaml.py with 100% similarity]
fuel/build/f_java/Makefile [new file with mode: 0644]
fuel/build/f_java/README [new file with mode: 0644]
fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp [new file with mode: 0644]
fuel/build/f_java/testing/README [new file with mode: 0644]
fuel/build/f_java/testing/fake_init.pp [new file with mode: 0644]
fuel/build/f_jre/Makefile [new file with mode: 0644]
fuel/build/f_jre/README [new file with mode: 0644]
fuel/build/f_jre/puppet/modules/opnfv/manifests/jre.pp [new file with mode: 0644]
fuel/build/f_jre/testing/README [new file with mode: 0644]
fuel/build/f_jre/testing/fake_init.pp [new file with mode: 0644]
fuel/build/f_jre_head/Makefile [new file with mode: 0644]
fuel/build/f_jre_head/puppet/modules/opnfv/manifests/jre_head.pp [new file with mode: 0644]
fuel/build/f_l23network/Makefile [moved from fuel-build/f_ntp/Makefile with 92% similarity]
fuel/build/f_l23network/README [moved from fuel-build/f_l23network/README with 100% similarity]
fuel/build/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb [moved from fuel-build/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb with 100% similarity]
fuel/build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp [moved from fuel-build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp with 100% similarity]
fuel/build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig [moved from fuel-build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig with 100% similarity]
fuel/build/f_l23network/testing/README [moved from fuel-build/f_l23network/testing/README with 100% similarity]
fuel/build/f_l23network/testing/fake_init.pp [moved from fuel-build/f_l23network/testing/fake_init.pp with 100% similarity]
fuel/build/f_libnss/Makefile [new file with mode: 0644]
fuel/build/f_libnss/README [new file with mode: 0644]
fuel/build/f_libnss/puppet/modules/opnfv/manifests/libnss.pp [new file with mode: 0644]
fuel/build/f_libnss/testing/README [new file with mode: 0644]
fuel/build/f_libnss/testing/fake_init.pp [new file with mode: 0644]
fuel/build/f_libpcs/Makefile [new file with mode: 0644]
fuel/build/f_libpcs/puppet/modules/opnfv/manifests/libpcs.pp [new file with mode: 0644]
fuel/build/f_libxt/Makefile [new file with mode: 0644]
fuel/build/f_libxt/puppet/modules/opnfv/manifests/libxt.pp [new file with mode: 0644]
fuel/build/f_ntp/Makefile [moved from fuel-build/f_l23network/Makefile with 92% similarity]
fuel/build/f_ntp/README [moved from fuel-build/f_ntp/README with 99% similarity]
fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp [moved from fuel-build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp with 100% similarity]
fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb [moved from fuel-build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb with 100% similarity]
fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb [moved from fuel-build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb with 100% similarity]
fuel/build/f_ntp/testing/README [moved from fuel-build/f_ntp/testing/README with 100% similarity]
fuel/build/f_ntp/testing/fake_init.pp [moved from fuel-build/f_ntp/testing/fake_init.pp with 100% similarity]
fuel/build/f_opnfv_puppet/Makefile [moved from fuel-build/f_example_control_bond/Makefile with 92% similarity]
fuel/build/f_opnfv_puppet/README [moved from fuel-build/f_opnfv_puppet/README with 100% similarity]
fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp [moved from fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp with 100% similarity]
fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp [moved from fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp with 72% similarity]
fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp [moved from fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp with 100% similarity]
fuel/build/f_osnaily/Makefile [new file with mode: 0644]
fuel/build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp [moved from fuel-build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp with 100% similarity]
fuel/build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig [moved from fuel-build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig with 100% similarity]
fuel/build/f_resolvconf/Makefile [new file with mode: 0644]
fuel/build/f_resolvconf/README [moved from fuel-build/f_resolvconf/README with 99% similarity]
fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp [moved from fuel-build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp with 100% similarity]
fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb [moved from fuel-build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb with 100% similarity]
fuel/build/f_resolvconf/testing/README [moved from fuel-build/f_resolvconf/testing/README with 100% similarity]
fuel/build/f_resolvconf/testing/fake_init.pp [moved from fuel-build/f_resolvconf/testing/fake_init.pp with 100% similarity]
fuel/build/fuel-main_1.patch [moved from fuel-build/fuel-main_1.patch with 99% similarity]
fuel/build/fuel-main_2.patch [moved from fuel-build/fuel-main_2.patch with 99% similarity]
fuel/build/install/apt-ftparchive-deb.conf [moved from fuel-build/install/apt-ftparchive-deb.conf with 100% similarity]
fuel/build/install/apt-ftparchive-release.conf [moved from fuel-build/install/apt-ftparchive-release.conf with 100% similarity]
fuel/build/install/install.sh [moved from fuel-build/install/install.sh with 100% similarity]
fuel/build/install/uninstall.sh [moved from fuel-build/install/uninstall.sh with 100% similarity]
fuel/build/opendaylight/Makefile [new file with mode: 0644]
fuel/build/opendaylight/README [new file with mode: 0644]
fuel/build/opendaylight/f_odl/Makefile [new file with mode: 0644]
fuel/build/opendaylight/f_odl/README [new file with mode: 0644]
fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp [new file with mode: 0644]
fuel/build/opendaylight/f_odl/testing/README [new file with mode: 0644]
fuel/build/opendaylight/f_odl/testing/fake_init.pp [new file with mode: 0644]
fuel/build/opendaylight/make-odl-deb.sh [new file with mode: 0755]
fuel/build/opendaylight/odl_maven/settings.xml [new file with mode: 0644]
fuel/build/patch-packages/Makefile [moved from fuel-build/patch-packages/Makefile with 91% similarity]
fuel/build/patch-packages/python-nova/Makefile [moved from fuel-build/patch-packages/python-nova/Makefile with 96% similarity]
fuel/build/patch-packages/python-nova/nova-console.patch [moved from fuel-build/patch-packages/python-nova/nova-console.patch with 99% similarity]
fuel/build/patch-packages/tools/correct_deps [moved from fuel-build/patch-packages/tools/correct_deps with 100% similarity]
fuel/build/patch-packages/tools/deb_pack [moved from fuel-build/patch-packages/tools/deb_pack with 100% similarity]
fuel/build/patch-packages/tools/deb_unpack [moved from fuel-build/patch-packages/tools/deb_unpack with 100% similarity]
fuel/build/patch-packages/tr_example/Makefile [moved from fuel-build/patch-packages/tr_example/Makefile with 96% similarity]

diff --git a/fuel-build/f_osnaily/Makefile b/fuel-build/f_osnaily/Makefile
deleted file mode 100644 (file)
index 295fd0e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-##############################################################################
-# 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: release
-release:
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
diff --git a/fuel-build/f_resolvconf/Makefile b/fuel-build/f_resolvconf/Makefile
deleted file mode 100644 (file)
index 295fd0e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-##############################################################################
-# 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: release
-release:
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
similarity index 59%
rename from fuel-build/DOC/BUILD/README.build
rename to fuel/build/DOC/BUILD/README.build
index a5e1112..519ee6a 100644 (file)
@@ -8,21 +8,25 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-How to setup and use the OPNFV/BGS/FUEL build system - work in progress
+How to setup and use the OPNFV/BGS/FUEL build system
+====================================================
 
 1. Build system requirements
 ----------------------------
 1.1 Host HW/VM requirements
 ---------------------------
-- A x86_64 host (real iron or VM) with Ubuntu 12.04/14.04 LTS installed
-- 100 GB storage
-- 8 GB RAM
+- An x86_64 host (real iron or VM) with Ubuntu 14.04 LTS installed
+- ~30 GB available disc
+- 4 GB RAM
 
 1.2 Host SW dependencies
 ------------------------
+The host should run Ubuntu 14.04
 On the host, the following packages must be installed:
-- docker - see https://docs.docker.com/installation/ubuntulinux/ for installation notes for 12.04 and 14.04
+- 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 apt-get install git)
+- make (simply available through apt-get install make)
 
 2 Setting up the Docker build container
 ----------------------------------------
@@ -33,7 +37,7 @@ Also make sure to define rellevant dns servers part of the global dns chain in
 in your /etc/default/docker config file, eg.
 DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
 
-Then restart docker with "service docker restart".:
+Then restart docker with "service docker.io restart".:
 
 3. Setting up OPNFV Gerrit in order to being able to clone the code
 -------------------------------------------------------------------
@@ -54,18 +58,10 @@ Then restart docker with "service docker restart".:
 
 5. Set up (build) your build environment
 ----------------------------------------
-YOU DO NOT NEED TO SET UP YOUR BUILD ENVIRONMENT, THE TOP MAKE ALL TARGET WILL DO THAT FOR YOU IF NOT ALREADY DONE,
-THE BELOW ACTIONS IN THIS SECTION ARE NOT NEEDED!
-
-Note and TODO:
-The build system will for now partly run as sudo as that is needed for the debootstrap procedure to create the root file
-system for the Ubuntu 12.04 Docker image - BUT NOTE, NONE OF THE MAKEFILES OR SCRIPTS SHALL BE EXECUTED WITH SUDO/ROOT PRIVILEDGES!
-(TODO: Change the scripts so that no root priviledges will be needed)
-
-With your ordinary user-, run the following commands from your git root:
-cd docker
-make (and you will be prompted for your password by sudo)
-cd ..
+Select the versions of the components you want to build by editing the
+fuel-build/config-spec file. Note if you want to build with OpenDaylight
+SDN controller you need to uncomment the lines starting with odl-main and
+java-main
 
 6. Build your fuel .iso image
 -----------------------------
@@ -74,11 +70,28 @@ make [all]
 
 This will:
 - If not allready existing, initialize the docker build environment
-- If not already done, build fuel from upstream
-- Build the defined derivate of fuel (as defined by the structure of this framework)
+- 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
+
+If the build is successful, you will find the generated ISO file in the release
+subdirectory!
 
-If the build is successful, you will find the generated ISO file in the release subdirectory!
+NOTE: the build of the baseline for Fuel and odl are cached, if build results reffering
+to the same versions as specified in fuel-build/config spec has been built before, these
+packages will not be rebuilt. The cache is cleared by "make clean"
 
 7. Install your stack
 ---------------------
 Please see DOC/INSTALL/README
+
+NOTES and TODO:
+---------------
+The build system will for now partly run as sudo
+BUT NOTE, NONE OF THE MAKEFILES OR SCRIPTS SHALL BE EXECUTED WITH
+SUDO/ROOT PRIVILEDGES!
+TODO: Change the scripts so that no root priviledges will be needed
+
diff --git a/fuel/build/Makefile b/fuel/build/Makefile
new file mode 100644 (file)
index 0000000..8e90fcc
--- /dev/null
@@ -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
+##############################################################################
+
+############################################################################
+# BEGIN of variables to customize
+#
+SHELL = /bin/bash
+
+include config.mk
+
+export BUILD_BASE = $(shell pwd)
+export DEB_DEST := $(BUILD_BASE)/release/packages/ubuntu/pool/main
+export PUPPET_DEST := $(BUILD_BASE)/release/puppet/modules
+
+ISOSRC = file:$(shell pwd)/fuel-6.0.1.iso
+ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
+PRODNO = "OPNFV_BGS"
+REVSTATE = "P0000"
+NEWISO = $(shell pwd)/release/opnfv-${REVSTATE}.iso
+DOCKERIMG = opnfv.org/ubuntu-builder:14.04
+# Note! Invoke with "make REVSTATE=RXXXX iso" to make release build!
+# Invoke with ICOCACHE=/full/path/to/iso if cached ISO is in non-standard location.
+#
+# END of variables to customize
+#############################################################################
+export TOPDIR := $(shell pwd)
+ORIGDIR := $(TOPDIR)/origiso
+
+SUBDIRS := f_isoroot
+SUBDIRS += f_opnfv_puppet
+SUBDIRS += f_osnaily
+SUBDIRS += f_l23network
+SUBDIRS += f_resolvconf
+SUBDIRS += f_ntp
+#SUBDIRS += f_gif
+#SUBDIRS += f_libnss
+#SUBDIRS += f_libpcs
+#SUBDIRS += f_libxt
+#SUBDIRS += f_comm_java
+#SUBDIRS += f_ca_cert
+#SUBDIRS += f_atk_wrap
+#SUBDIRS += f_jre_head
+#SUBDIRS += f_jre
+#SUBDIRS += f_java
+#SUBDIRS += f_odl
+
+
+
+# f_example is only an example of how to generate a .deb package and
+# should not be enabled in official builds.
+#SUBDIRS += f_example
+
+SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
+
+.PHONY: all
+all:
+       @docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1)
+       @make -C docker
+       @docker/runcontext $(DOCKERIMG) $(MAKE) $(MAKEFLAGS) iso
+
+$(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)
+       # Setup cgroups for docker-in-docker
+       sudo /root/enable_dockerx2
+       # Patch to fix race condition when doing "Docker-in-Docker" build
+       cd /tmp/fuel-main && patch -p1 < $(TOPDIR)/fuel-main_1.patch
+       # Patch to make the sandbox chroot in Fuel succeed with package
+       # installation in a Docker build
+       cd /tmp/fuel-main && patch -p1 < $(TOPDIR)/fuel-main_2.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 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/puppet/modules release/isoroot
+       $(MAKE) -C $@ -f Makefile release
+
+.PHONY: patch-packages
+patch-packages:
+       ORIGISO=$(ISOCACHE) REVSTATE=$(REVSTATE) $(MAKE) -C $@ -f Makefile release
+
+.PHONY: prepare
+prepare:
+       $(MAKE) -C opendaylight -f Makefile setup
+
+.PHONY: odl
+odl:
+       $(MAKE) -C opendaylight -f Makefile
+
+.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: prepare $(SUBCLEAN)
+       $(MAKE) -C patch-packages -f Makefile clean
+       $(MAKE) -C opendaylight -f Makefile clean
+       @rm -f *.iso
+       @rm -Rf release
+       @rm -Rf newiso
+       @rm -f f_odl
+       @rm -f $(NEWISO)
+
+$(SUBCLEAN): %.clean:
+       $(MAKE) -C $* -f Makefile clean
+
+# Todo: Make things smarter - we shouldn't need to clean everything
+# betwen make invocations.
+.PHONY: iso
+iso:   prepare build-clean odl $(ISOCACHE) $(SUBDIRS) patch-packages
+       install/install.sh iso $(ISOCACHE) $(NEWISO) $(PRODNO) $(REVSTATE)
+       @printf "\n\nProduct ISO is $(NEWISO)\n\n"
similarity index 70%
rename from fuel-build/Makefile
rename to fuel/build/Makefile~
index eb37b4d..7f16a28 100644 (file)
 # BEGIN of variables to customize
 #
 SHELL = /bin/bash
+
+include config.mk
+
+export BUILD_BASE = $(shell pwd)
+export DEB_DEST := $(BUILD_BASE)/release/packages/ubuntu/pool/main
+export PUPPET_DEST := $(BUILD_BASE)/release/puppet/modules
+
 ISOSRC = file:$(shell pwd)/fuel-6.0.1.iso
 ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
-PRODUCT_NAME = "OPNFV_BGS"
-VERSION = "P0000"
-NEWISO = $(shell pwd)/release/opnfv-${VERSION}.iso
+PRODNO = "OPNFV_BGS"
+REVSTATE = "P0000"
+NEWISO = $(shell pwd)/release/opnfv-${REVSTATE}.iso
 DOCKERIMG = opnfv.org/ubuntu-builder:14.04
-# Note! Invoke with "make VERSION=RXXXX iso" to make release build!
+# Note! Invoke with "make REVSTATE=RXXXX iso" to make release build!
 # Invoke with ICOCACHE=/full/path/to/iso if cached ISO is in non-standard location.
 #
 # END of variables to customize
 #############################################################################
-TOPDIR := $(shell pwd)
+export TOPDIR := $(shell pwd)
 ORIGDIR := $(TOPDIR)/origiso
 
 SUBDIRS := f_isoroot
@@ -32,6 +39,19 @@ SUBDIRS += f_osnaily
 SUBDIRS += f_l23network
 SUBDIRS += f_resolvconf
 SUBDIRS += f_ntp
+SUBDIRS += f_gif
+SUBDIRS += f_libnss
+SUBDIRS += f_libpcs
+SUBDIRS += f_libxt
+SUBDIRS += f_comm_java
+SUBDIRS += f_ca_cert
+SUBDIRS += f_atk_wrap
+SUBDIRS += f_jre_head
+SUBDIRS += f_jre
+SUBDIRS += f_java
+SUBDIRS += f_odl
+
+
 
 # f_example is only an example of how to generate a .deb package and
 # should not be enabled in official builds.
@@ -47,8 +67,8 @@ all:
 
 $(ISOCACHE):
        # Clone Fuel to non-persistent location and build
-       cd /tmp && git clone https://github.com/stackforge/fuel-main
-       cd /tmp/fuel-main && git checkout stable/6.0
+       cd /tmp && git clone $(FUEL_MAIN_REPO)
+       cd /tmp/fuel-main && git checkout $(FUEL_MAIN_TAG)
        # Setup cgroups for docker-in-docker
        sudo /root/enable_dockerx2
        # Patch to fix race condition when doing "Docker-in-Docker" build
@@ -82,13 +102,31 @@ $(SUBDIRS):
 
 .PHONY: patch-packages
 patch-packages:
-       ORIGISO=$(ISOCACHE) VERSION=$(VERSION) $(MAKE) -C $@ -f Makefile release
+       ORIGISO=$(ISOCACHE) REVSTATE=$(REVSTATE) $(MAKE) -C $@ -f Makefile release
+
+.PHONY: prepare
+prepare:
+       $(MAKE) -C opendaylight -f Makefile setup
+
+.PHONY: odl
+odl:
+       $(MAKE) -C opendaylight -f Makefile
+
+.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: $(SUBCLEAN)
+clean: prepare $(SUBCLEAN)
        $(MAKE) -C patch-packages -f Makefile clean
+       $(MAKE) -C opendaylight -f Makefile clean
+       @rm -f *.iso
        @rm -Rf release
        @rm -Rf newiso
+       @rm -f f_odl
        @rm -f $(NEWISO)
 
 $(SUBCLEAN): %.clean:
@@ -97,6 +135,6 @@ $(SUBCLEAN): %.clean:
 # Todo: Make things smarter - we shouldn't need to clean everything
 # betwen make invocations.
 .PHONY: iso
-iso:   clean $(ISOCACHE) $(SUBDIRS) patch-packages
-       install/install.sh iso $(ISOCACHE) $(NEWISO) $(PRODUCT_NAME) $(VERSION)
+iso:   prepare build-clean odl $(ISOCACHE) $(SUBDIRS) patch-packages
+       install/install.sh iso $(ISOCACHE) $(NEWISO) $(PRODNO) $(REVSTATE)
        @printf "\n\nProduct ISO is $(NEWISO)\n\n"
similarity index 97%
rename from fuel-build/README
rename to fuel/build/README
index 82b5598..9692f34 100644 (file)
@@ -20,5 +20,4 @@ This purpose of this framework is to:
 3)      Re factor/rebuild the .iso image for deployment (also builds in a container, for the same reason as mentioned above)
 4)      Through a pre-deployment script, setting config's not part of the pristine fuel build can be achieved
 
-For detailed instructions on how to add content, configuration, build and deply - please see:
-DOC/
+For detailed instructions on how to add content, configuration, build and deply - please see: DOC/
diff --git a/fuel/build/RELEASENOTES b/fuel/build/RELEASENOTES
new file mode 100644 (file)
index 0000000..76b4208
--- /dev/null
@@ -0,0 +1,32 @@
+##############################################################################
+# 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 patch introduces the following features and bug fixes:
+-----------------------------------------------------------
+1) The OpenDaylight SDN server - unplumbed (config.mk needs to be changed
+   in order to enable it, see: fuel-build/DOC/BUILD/README.build)
+2) cofig-spec - a way to configure the stack component versions
+   to be built - see the fuel-build/config.mk file
+3) A simplified Docker build startegy, pulling a pre-fabricated
+   docker base image from the Internet
+
+NOTE: Before you start building - you need to purge any previous
+"opnfv.org/ubuntu-builder" docker image: "sudo docker rmi -f opnfv.org/ubuntu-builder
+Double check that you dont have any remaining "opnfv.org/ubuntu-builder" images by
+"docker images".
+A new docker image will automatically be rebuilt in the build process.
+
+Limitations and known issues:
+-----------------------------
+1) OpenDaylight is for now just sitting in the controllers, not plumbed to anything
+   northbound or southbound.
+2) OpenDaylight is currently only building with Oracle Java JDK, that is Oracle Java
+   is used in the build process while OpenJava is used in the runtime environment.
+   Read the licencing obligations in /fuel-build/LICENCE before you start building.
similarity index 63%
rename from fuel-build/TODO
rename to fuel/build/TODO
index 7e26449..897a7e8 100644 (file)
@@ -3,6 +3,8 @@
 # jonas.bjurel@ericsson.com 0.1 2015.01.28
 ############################################
 Following items needs to be done to achieve an OPNFV/BGS R1 Stack:
-1) Rebase to Fuel 6.0/6.1
-2) Add support for CentOS 6.5
+1) Rebase to Fuel 6.0/6.1 - DONE
+2) Add support for CentOS 6.5 - REMAINING
 3) Add build-support and manifests for Open daylight Ubuntu and CentOS
+   - Initial build and deployment of ODL/Helium - DONE
+   - Configuration and plumbing - IN PROGRESS
\ No newline at end of file
diff --git a/fuel/build/config.mk b/fuel/build/config.mk
new file mode 100644 (file)
index 0000000..da760df
--- /dev/null
@@ -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
+##############################################################################
+
+ODL_MAIN_REPO := https://git.opendaylight.org/gerrit/p/controller.git
+ODL_MAIN_TAG := release/helium
+
+FUEL_MAIN_REPO := https://github.com/stackforge/fuel-main
+FUEL_MAIN_TAG = stable/6.0
+
+JAVA_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8
+ATK_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/j/java-atk-wrapper
+GIF_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/g/giflib
+CERT_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/c/ca-certificates
+COMM_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/j/java-common
+LIBPCS_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/p/pcsc-lite
+LIBXT_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/libx/libxtst
+DEFJRE_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/j/java-common
+LIBNSS_MAIN_REPO := https://mirrors.kernel.org/ubuntu/pool/main/n/nss
similarity index 88%
rename from fuel-build/docker/Makefile
rename to fuel/build/docker/Makefile
index 360bb54..c2853c8 100644 (file)
@@ -14,7 +14,7 @@ FILES = $(wildcard ubuntu-builder/*) runcontext
 all:   .docker
 
 .docker: $(FILES)
-       /usr/bin/docker build --rm=true -t opnfv.org/ubuntu-builder:14.04 ubuntu-builder
+       /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
 
similarity index 78%
rename from fuel-build/docker/ubuntu-builder/Dockerfile
rename to fuel/build/docker/ubuntu-builder/Dockerfile
index 3ec934d..b4e1b4e 100644 (file)
 
 FROM ubuntu:14.04
 RUN apt-get update
-RUN apt-get install -y make python-setuptools python-all dpkg-dev debhelper \
+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
 
 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
+ADD ./install.sh /root/install.sh
+RUN chmod +x /root/install.sh
+RUN /root/install.sh
+
 VOLUME /var/lib/docker
@@ -10,6 +10,7 @@
 ##############################################################################
 #
 # 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
 
diff --git a/fuel/build/docker/ubuntu-builder/install.sh b/fuel/build/docker/ubuntu-builder/install.sh
new file mode 100755 (executable)
index 0000000..df1af72
--- /dev/null
@@ -0,0 +1,25 @@
+#!/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
+##############################################################################
+
+#Install Oracle Java 7 jdk
+echo "Installing JAVA 7"
+apt-get update
+add-apt-repository ppa:webupd8team/java -y
+apt-get update
+echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
+apt-get install oracle-java7-installer -y
+
+#Install Maven 3
+echo deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main >> /etc/apt/sources.list
+echo deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main >> /etc/apt/sources.list
+apt-get update || exit 1
+sudo apt-get install -y --force-yes maven3 || exit 1
+ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn
diff --git a/fuel/build/f_atk_wrap/Makefile b/fuel/build/f_atk_wrap/Makefile
new file mode 100644 (file)
index 0000000..99010eb
--- /dev/null
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# daniel.smith@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)
+include ../config.mk
+
+PACKAGE := libatk-wrapper-java
+VERSION := 0.30.4-4_all
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:    release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(ATK_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(ATK_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(ATK_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
+
diff --git a/fuel/build/f_atk_wrap/puppet/modules/opnfv/manifests/atk_wrap.pp b/fuel/build/f_atk_wrap/puppet/modules/opnfv/manifests/atk_wrap.pp
new file mode 100644 (file)
index 0000000..144651e
--- /dev/null
@@ -0,0 +1,12 @@
+class opnfv::atk_wrap {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'libatk-wrapper-java':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
+
diff --git a/fuel/build/f_ca_cert/Makefile b/fuel/build/f_ca_cert/Makefile
new file mode 100644 (file)
index 0000000..83069cf
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := ca-certificates
+VERSION := 20130906ubuntu2_all
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(CERT_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(CERT_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(CERT_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_ca_cert/puppet/modules/opnfv/manifests/ca_cert.pp b/fuel/build/f_ca_cert/puppet/modules/opnfv/manifests/ca_cert.pp
new file mode 100644 (file)
index 0000000..69b5d23
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::ca_cert {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'ca-certificates':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/f_comm_java/Makefile b/fuel/build/f_comm_java/Makefile
new file mode 100644 (file)
index 0000000..a0cac38
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := java-common
+VERSION := 0.51_all
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(COMM_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(COMM_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(COMM_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_comm_java/puppet/modules/opnfv/manifests/comm_java.pp b/fuel/build/f_comm_java/puppet/modules/opnfv/manifests/comm_java.pp
new file mode 100644 (file)
index 0000000..dd7ddc5
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::comm_java {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'java-common':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/f_defjre/Makefile b/fuel/build/f_defjre/Makefile
new file mode 100644 (file)
index 0000000..5b295c1
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := default-jre
+VERSION := 1.7-51_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(DEFJRE_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(DEFJRE_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(DEFJRE_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_defjre/puppet/modules/opnfv/manifests/defjre.pp b/fuel/build/f_defjre/puppet/modules/opnfv/manifests/defjre.pp
new file mode 100644 (file)
index 0000000..605453b
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::defjre {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'default-jre':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
similarity index 92%
rename from fuel-build/f_opnfv_puppet/Makefile
rename to fuel/build/f_example_control_bond/Makefile
index 295fd0e..c311a2d 100644 (file)
@@ -21,4 +21,4 @@ clean:
 
 .PHONY: release
 release:
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
similarity index 52%
rename from fuel-build/f_example_packadd/Makefile
rename to fuel/build/f_example_packadd/Makefile
index 3808884..eadc83f 100644 (file)
 TOP := $(shell pwd)
 PACKAGE := foobar
 VERSION := 1.0-1
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
 
 .PHONY: all
-all:   release/pool/main/$(PACKAGE)_$(VERSION).deb
+all:   release/pool/main/$(DEB_NAME)
 
-release/pool/main/$(PACKAGE)_$(VERSION).deb:
+release/pool/main/$(DEB_NAME):
        @mkdir -p tmp/src
        @mkdir -p release/pool/main
-       @cp -r $(PACKAGE)_$(VERSION) tmp/src
-       @gzip -9 tmp/src/$(PACKAGE)_$(VERSION)/usr/share/doc/$(PACKAGE)/changelog.Debian
-       @fakeroot dpkg-deb --build tmp/src/$(PACKAGE)_$(VERSION)
-       @lintian tmp/src/$(PACKAGE)_$(VERSION).deb
-       @cp tmp/src/$(PACKAGE)_$(VERSION).deb 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/$(PACKAGE)_$(VERSION).deb
+       @rm -f ../release/packages/ubuntu/pool/main/$(DEB_NAME)
 
 
 .PHONY: release
-release:release/pool/main/$(PACKAGE)_$(VERSION).deb
-       @cp release/pool/main/$(PACKAGE)_$(VERSION).deb ../release/packages/ubuntu/pool/main
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
+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_gif/Makefile b/fuel/build/f_gif/Makefile
new file mode 100644 (file)
index 0000000..7108242
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := libgif4
+VERSION := 4.1.6-11_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(GIF_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(GIF_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(GIF_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_gif/puppet/modules/opnfv/manifests/gif.pp b/fuel/build/f_gif/puppet/modules/opnfv/manifests/gif.pp
new file mode 100644 (file)
index 0000000..d51cbe7
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::gif {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'libgif4':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/f_java/Makefile b/fuel/build/f_java/Makefile
new file mode 100644 (file)
index 0000000..759081f
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := openjdk-8-jdk
+VERSION := 8u40~b09-1_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(JAVA_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(JAVA_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(JAVA_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_java/README b/fuel/build/f_java/README
new file mode 100644 (file)
index 0000000..776d47a
--- /dev/null
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 directory adds the openjdk-8-jdk Java package and related puppet
+deployment manifest such that it gets built into the .iso image an deployed
+on the stack controller cluster.
+
+The f_java has the following structure:
+.
++--------+----------+-----------+
+         |          |           |
+      puppet/    Makefile     README
+         |                  (this file)
+         |
+         |
+      modules/
+         |
+         |
+         |
+       opnfv/
+         |
+         |
+         |
+     manifests/
+         |
+         |
+         |
+      java.pp
+
+Makefile:
+Invoked by the git root Makefile, it pulls the openjdk-8-jdk deb package
+from a propper mirror and pushes i together with the manifests to a fuel
+build artifact directory, such that it eventually gets built into the new
+fuel .iso
+
+java.pp:
+Controls the installation and configuration of java
diff --git a/fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp b/fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp
new file mode 100644 (file)
index 0000000..26e7c39
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::java {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'openjdk-8-jdk':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/f_java/testing/README b/fuel/build/f_java/testing/README
new file mode 100644 (file)
index 0000000..c0ef7d6
--- /dev/null
@@ -0,0 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
+In order to test the functionality without performing a full deployment, run "puppet apply" on the
+fake_init.pp which will call only the opnfv::java class.
diff --git a/fuel/build/f_java/testing/fake_init.pp b/fuel/build/f_java/testing/fake_init.pp
new file mode 100644 (file)
index 0000000..237b0c1
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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_settings = parseyaml($astute_settings_yaml)
+
+include opnfv::java
diff --git a/fuel/build/f_jre/Makefile b/fuel/build/f_jre/Makefile
new file mode 100644 (file)
index 0000000..43f5e76
--- /dev/null
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# daniel.smith@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)
+include ../config.mk
+
+PACKAGE := openjdk-8-jre
+VERSION := 8u40~b09-1_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:    release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(JAVA_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(JAVA_MAIN_REPO)/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(JAVA_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
+
diff --git a/fuel/build/f_jre/README b/fuel/build/f_jre/README
new file mode 100644 (file)
index 0000000..24e4cdd
--- /dev/null
@@ -0,0 +1,44 @@
+
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# daniel.smith@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 directory adds the openjdk-8-jre Java package and related puppet
+deployment manifest such that it gets built into the .iso image an deployed
+on the stack controller cluster.
+
+The f_jre has the following structure:
+.
++--------+----------+-----------+
+         |          |           |
+      puppet/    Makefile     README
+         |                  (this file)
+         |
+         |
+      modules/
+         |
+         |
+         |
+       opnfv/
+         |
+         |
+         |
+     manifests/
+         |
+         |
+         |
+      jre.pp
+
+Makefile:
+Invoked by the git root Makefile, it pulls the openjdk-8-jre deb package
+from a propper mirror and pushes i together with the manifests to a fuel
+build artifact directory, such that it eventually gets built into the new
+fuel .iso
+
+jre.pp:
+Controls the installation and configuration of java
diff --git a/fuel/build/f_jre/puppet/modules/opnfv/manifests/jre.pp b/fuel/build/f_jre/puppet/modules/opnfv/manifests/jre.pp
new file mode 100644 (file)
index 0000000..3c342d2
--- /dev/null
@@ -0,0 +1,14 @@
+class opnfv::jre {
+  if $::osfamily == 'Debian' {
+
+
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'openjdk-8-jre':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
+
diff --git a/fuel/build/f_jre/testing/README b/fuel/build/f_jre/testing/README
new file mode 100644 (file)
index 0000000..028230d
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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
+##############################################################################
+
+In order to test the functionality without performing a full deployment, run "puppet apply" on the
+fake_init.pp which will call only the opnfv::java class.
+
diff --git a/fuel/build/f_jre/testing/fake_init.pp b/fuel/build/f_jre/testing/fake_init.pp
new file mode 100644 (file)
index 0000000..83c7adb
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# daniel.smith@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_settings = parseyaml($astute_settings_yaml)
+
+include opnfv::jre
+
diff --git a/fuel/build/f_jre_head/Makefile b/fuel/build/f_jre_head/Makefile
new file mode 100644 (file)
index 0000000..2efc81a
--- /dev/null
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# daniel.smith@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)
+include ../config.mk
+
+PACKAGE := openjdk-8-jre-headless
+VERSION := 8u40~b09-1_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+
+.PHONY: all
+all:    release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(JAVA_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(JAVA_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(JAVA_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
+
diff --git a/fuel/build/f_jre_head/puppet/modules/opnfv/manifests/jre_head.pp b/fuel/build/f_jre_head/puppet/modules/opnfv/manifests/jre_head.pp
new file mode 100644 (file)
index 0000000..44b649b
--- /dev/null
@@ -0,0 +1,15 @@
+class opnfv::jre_head {
+  if $::osfamily == 'Debian' {
+
+    case $::fuel_settings['role'] {
+      /controller/: {
+
+       package { 'openjdk-8-jre-headless' :
+         ensure => installed,
+        }
+
+      }
+    }
+  }
+}
+
similarity index 92%
rename from fuel-build/f_ntp/Makefile
rename to fuel/build/f_l23network/Makefile
index 295fd0e..c311a2d 100644 (file)
@@ -21,4 +21,4 @@ clean:
 
 .PHONY: release
 release:
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
diff --git a/fuel/build/f_libnss/Makefile b/fuel/build/f_libnss/Makefile
new file mode 100644 (file)
index 0000000..e17519a
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := libnss3
+VERSION := 3.17.4-0ubuntu0.14.04.1_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(LIBNSS_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(LIBNSS_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(LIBNSS_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_libnss/README b/fuel/build/f_libnss/README
new file mode 100644 (file)
index 0000000..776d47a
--- /dev/null
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 directory adds the openjdk-8-jdk Java package and related puppet
+deployment manifest such that it gets built into the .iso image an deployed
+on the stack controller cluster.
+
+The f_java has the following structure:
+.
++--------+----------+-----------+
+         |          |           |
+      puppet/    Makefile     README
+         |                  (this file)
+         |
+         |
+      modules/
+         |
+         |
+         |
+       opnfv/
+         |
+         |
+         |
+     manifests/
+         |
+         |
+         |
+      java.pp
+
+Makefile:
+Invoked by the git root Makefile, it pulls the openjdk-8-jdk deb package
+from a propper mirror and pushes i together with the manifests to a fuel
+build artifact directory, such that it eventually gets built into the new
+fuel .iso
+
+java.pp:
+Controls the installation and configuration of java
diff --git a/fuel/build/f_libnss/puppet/modules/opnfv/manifests/libnss.pp b/fuel/build/f_libnss/puppet/modules/opnfv/manifests/libnss.pp
new file mode 100644 (file)
index 0000000..17cfb8d
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::libnss {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'libnss3':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/f_libnss/testing/README b/fuel/build/f_libnss/testing/README
new file mode 100644 (file)
index 0000000..c0ef7d6
--- /dev/null
@@ -0,0 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
+In order to test the functionality without performing a full deployment, run "puppet apply" on the
+fake_init.pp which will call only the opnfv::java class.
diff --git a/fuel/build/f_libnss/testing/fake_init.pp b/fuel/build/f_libnss/testing/fake_init.pp
new file mode 100644 (file)
index 0000000..237b0c1
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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_settings = parseyaml($astute_settings_yaml)
+
+include opnfv::java
diff --git a/fuel/build/f_libpcs/Makefile b/fuel/build/f_libpcs/Makefile
new file mode 100644 (file)
index 0000000..3e480db
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := libpcsclite1
+VERSION := 1.8.10-1ubuntu1_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(LIBPCS_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(LIBPCS_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(LIBPCS_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_libpcs/puppet/modules/opnfv/manifests/libpcs.pp b/fuel/build/f_libpcs/puppet/modules/opnfv/manifests/libpcs.pp
new file mode 100644 (file)
index 0000000..1f26247
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::libpcs {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'libpcsclite1':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/f_libxt/Makefile b/fuel/build/f_libxt/Makefile
new file mode 100644 (file)
index 0000000..bb5c2aa
--- /dev/null
@@ -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)
+include ../config.mk
+
+PACKAGE := libxtst6
+VERSION := 1.2.2-1_amd64
+DEB_NAME := $(PACKAGE)_$(VERSION).deb
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME)
+
+release/pool/main/$(DEB_NAME):
+ifeq ($(LIBXT_MAIN_REPO),)
+       @echo "No config-spec target for Java, nothing to build"
+else
+       @mkdir -p release/pool/main && \
+       cd release/pool/main && \
+       wget -N $(LIBXT_MAIN_REPO)/$(DEB_NAME)
+       @lintian release/pool/main/$(DEB_NAME)
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME)
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME)
+ifneq ($(LIBXT_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME) $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/f_libxt/puppet/modules/opnfv/manifests/libxt.pp b/fuel/build/f_libxt/puppet/modules/opnfv/manifests/libxt.pp
new file mode 100644 (file)
index 0000000..a862778
--- /dev/null
@@ -0,0 +1,11 @@
+class opnfv::libxt {
+  if $::osfamily == 'Debian' {
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'libxtst6':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
similarity index 92%
rename from fuel-build/f_l23network/Makefile
rename to fuel/build/f_ntp/Makefile
index 295fd0e..c311a2d 100644 (file)
@@ -21,4 +21,4 @@ clean:
 
 .PHONY: release
 release:
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
similarity index 99%
rename from fuel-build/f_ntp/README
rename to fuel/build/f_ntp/README
index 77fd1da..2bade72 100644 (file)
@@ -30,3 +30,4 @@ but before actually deploying:
 3. Upload the modifed deployment information: fuel --env 1 deployment --upload
 
 After deploying, the additions will be included in /etc/astute.yaml of each host.
+
similarity index 92%
rename from fuel-build/f_example_control_bond/Makefile
rename to fuel/build/f_opnfv_puppet/Makefile
index 295fd0e..c311a2d 100644 (file)
@@ -21,4 +21,4 @@ clean:
 
 .PHONY: release
 release:
-       @cp -Rvp puppet/modules/* ../release/puppet/modules
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
@@ -21,6 +21,19 @@ class opnfv {
   include opnfv::resolver
   # Setup OPNFV style NTP config
   include opnfv::ntp
-   # Make sure all added packages are installed
+  # Make sure all added packages are installed
   include opnfv::add_packages
+  # Setup OpenDaylight
+  include opnfv::odl
+  include opnfv::java
+  include opnfv::jre
+  include opnfv::jre_head
+  include opnfv::atk_wrap
+  include opnfv::gif
+  include opnfv::ca_cert
+  include opnfv::comm_java
+  include opnfv::libpcs
+  include opnfv::libxt
+  include opnfv::libnss
+  include opnfv::defjre
 }
diff --git a/fuel/build/f_osnaily/Makefile b/fuel/build/f_osnaily/Makefile
new file mode 100644 (file)
index 0000000..c311a2d
--- /dev/null
@@ -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
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all:
+
+.PHONY: clean
+clean:
+       @rm -rf tmp
+       @rm -rf release
+
+
+.PHONY: release
+release:
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
diff --git a/fuel/build/f_resolvconf/Makefile b/fuel/build/f_resolvconf/Makefile
new file mode 100644 (file)
index 0000000..c311a2d
--- /dev/null
@@ -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
+##############################################################################
+
+TOP := $(shell pwd)
+
+.PHONY: all
+all:
+
+.PHONY: clean
+clean:
+       @rm -rf tmp
+       @rm -rf release
+
+
+.PHONY: release
+release:
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
similarity index 99%
rename from fuel-build/f_resolvconf/README
rename to fuel/build/f_resolvconf/README
index 77c6e6a..5ff570f 100644 (file)
@@ -33,3 +33,4 @@ with the Fuel GUI or CLI, but before actually deploying:
 
 After deploying, the additions will be included in /etc/astute.yaml of each
 host.
+
similarity index 99%
rename from fuel-build/fuel-main_1.patch
rename to fuel/build/fuel-main_1.patch
index a982e80..24b25b2 100644 (file)
@@ -5,10 +5,10 @@ index 55f617a..cd05f19 100644
 @@ -5,7 +5,7 @@
  FROM fuel/centos
  MAINTAINER Matthew Mosesohn mmosesohn@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y ruby21-nailgun-mcagents sysstat
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y ruby21-nailgun-mcagents sysstat
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/cobbler/Dockerfile b/docker/cobbler/Dockerfile
@@ -18,10 +18,10 @@ index 0c80abd..3a3d966 100644
 @@ -5,7 +5,7 @@
  FROM fuel/centos
  MAINTAINER Matthew Mosesohn mmosesohn@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*;echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y httpd cobbler dnsmasq xinetd tftp-server; ln -s /etc/dnsmasq.conf /etc/cobbler.dnsmasq.conf
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*;echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y httpd cobbler dnsmasq xinetd tftp-server; ln -s /etc/dnsmasq.conf /etc/cobbler.dnsmasq.conf
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/mcollective/Dockerfile b/docker/mcollective/Dockerfile
@@ -29,12 +29,12 @@ index e70e87d..d6554b7 100644
 --- a/docker/mcollective/Dockerfile
 +++ b/docker/mcollective/Dockerfile
 @@ -4,7 +4,7 @@ MAINTAINER Aleksandr Didenko adidenko@mirantis.com
+
  WORKDIR /root
+
 -RUN rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y sudo ruby21-mcollective
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y sudo ruby21-mcollective
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/ostf/Dockerfile b/docker/ostf/Dockerfile
@@ -44,10 +44,10 @@ index 43f911e..8da9108 100644
 @@ -5,7 +5,7 @@
  FROM fuel/centos
  MAINTAINER Matthew Mosesohn mmosesohn@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*;echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo;yum clean all; yum --quiet install -y python-fuelclient supervisor postgresql-libs
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*;echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo;yum clean all; yum --quiet install -y python-fuelclient supervisor postgresql-libs
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile
@@ -55,12 +55,12 @@ index b2930db..63cc4c2 100644
 --- a/docker/postgres/Dockerfile
 +++ b/docker/postgres/Dockerfile
 @@ -3,7 +3,7 @@ FROM fuel/centos
+
  MAINTAINER Aleksandr Didenko adidenko@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo;yum clean all;yum --quiet install -y sudo
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo;yum clean all;yum --quiet install -y sudo
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/rabbitmq/Dockerfile b/docker/rabbitmq/Dockerfile
@@ -70,10 +70,10 @@ index 201648f..4f3b67c 100644
 @@ -3,7 +3,7 @@
  FROM fuel/centos
  MAINTAINER Aleksandr Didenko adidenko@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y rabbitmq-server
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all; yum --quiet install -y rabbitmq-server
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/rsync/Dockerfile b/docker/rsync/Dockerfile
@@ -83,10 +83,10 @@ index ef737bd..b6eefd1 100644
 @@ -5,7 +5,7 @@
  FROM fuel/centos
  MAINTAINER Matthew Mosesohn mmosesohn@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo;yum clean all;yum --quiet install -y ruby21-puppet xinetd rsync logrotate
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo;yum clean all;yum --quiet install -y ruby21-puppet xinetd rsync logrotate
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
 diff --git a/docker/rsyslog/Dockerfile b/docker/rsyslog/Dockerfile
@@ -94,11 +94,11 @@ index 5efd623..8721b39 100644
 --- a/docker/rsyslog/Dockerfile
 +++ b/docker/rsyslog/Dockerfile
 @@ -2,7 +2,7 @@ FROM fuel/centos
+
  MAINTAINER Aleksandr Didenko adidenko@mirantis.com
+
 -RUN rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all;yum --quiet install -y anacron rsyslog
 +RUN sleep 15; rm -rf /etc/yum.repos.d/*; echo -e "[nailgun]\nname=Nailgun Local Repo\nbaseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\ngpgcheck=0" > /etc/yum.repos.d/nailgun.repo; yum clean all;yum --quiet install -y anacron rsyslog
+
  ADD etc /etc
  ADD start.sh /usr/local/bin/start.sh
similarity index 99%
rename from fuel-build/fuel-main_2.patch
rename to fuel/build/fuel-main_2.patch
index 0cea655..72588cb 100644 (file)
@@ -15,3 +15,4 @@
 +      rm $(SANDBOX_UBUNTU)/sbin/start.orig)
   echo "SANDBOX_UBUNTU_UP: done"
   endef
+
diff --git a/fuel/build/opendaylight/Makefile b/fuel/build/opendaylight/Makefile
new file mode 100644 (file)
index 0000000..9c3d22d
--- /dev/null
@@ -0,0 +1,63 @@
+##############################################################################
+# 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 variables to customize
+#
+SHELL = /bin/bash
+include ../config.mk
+
+BUILD_DIR := $(shell pwd)
+GIT_DIR := /tmp
+export CONFIG_SPEC_SCRIPT
+export MAVEN_OPTS = -Xmx1024m -XX:MaxPermSize=512m
+MAINTAINER = "Main Tainer <main.tainer@example.org>"
+ODL_SHORT_NAME = odl
+ODL_VERSION = 0.1-1
+DEPEND = openjdk-8-jdk
+TARGET_BUILD_PATH="/tmp/controller/opendaylight/distribution/opendaylight-karaf/target/"
+MAVEN_SPEC = $(BUILD_DIR)/odl_maven/settings.xml
+
+#
+# END of variables to customize
+#############################################################################
+
+.PHONY: all
+all:   odl
+
+.PHONY: setup
+setup:
+       @if [ ! -d "$(TOPDIR)/f_odl" ]; then ln -s "$(realpath $(BUILD_DIR))/f_odl" "$(realpath $(TOPDIR))/f_odl";  fi
+
+.PHONY: odl
+odl:
+ifeq ($(ODL_MAIN_REPO),)
+       @echo "No config-spec target for ODL, nothing to build"
+else
+
+ifeq ($(shell if [ -e .odl-build.log ];then cat .odl-build.log; fi;),$(ODL_MAIN_TAG))
+       @cd /tmp && git clone $(ODL_MAIN_REPO) && cd /tmp/controller && git checkout $(ODL_MAIN_TAG)
+       @echo "ODL is up to date"
+else
+       @if [ ! -d "/tmp/controller" ]; then cd /tmp && git clone $(ODL_MAIN_REPO); fi;
+       @cd /tmp/controller && git checkout $(ODL_MAIN_TAG) && mvn -Dmaven.test.skip=true -gs $(MAVEN_SPEC) clean install;
+       @./make-odl-deb.sh -N $(ODL_SHORT_NAME)_`cd /tmp/controller; git rev-parse --short HEAD` -n $(ODL_SHORT_NAME) -v "$(ODL_VERSION)" -t "$(ODL_MAIN_TAG)" -m $(MAINTAINER) -d $(DEPEND) -p $(TARGET_BUILD_PATH)
+       @echo $(ODL_MAIN_TAG) > .odl-build.log
+endif
+endif
+
+.PHONY: clean $(SUBCLEAN)
+clean: $(SUBCLEAN)
+       @rm -Rf /tmp/controller
+       @rm -f .odl-build.log
+       @./make-odl-deb.sh -C
+
+.PHONY: release
+release:
diff --git a/fuel/build/opendaylight/README b/fuel/build/opendaylight/README
new file mode 100644 (file)
index 0000000..7aa392e
--- /dev/null
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 directory builds the OpenDaylight debian package by cloning the
+opendaylight.org repo, building the odl tag specified in
+"fuel-build/config-spec" and constructing a debian package source tree under
+"f_odl", which automatically is linked into "fuel_build/." for further build processing.
+
+The opendaylight has the following structure:
+.
++--------+-------------+-----------+
+|        |             |           |
+|     Makefile  make-odl-deb.sh  README
+|                              (this file)
+|
++----------+----------+
+           |          |
+       odl_maven/   f_odl/
+
+Makefile:
+Invoked by the git root Makefile, it builds the clones the odl repo from
+odl, checkout the tag/branch indicated in "fuelbuild/config-spec", builds
+odl, and calls "make-odl-deb.sh" to create a debian package source tree.
+
+make-odl-deb.sh:
+Creates the odl debian package source tree in "f_odl" from the odl build
+results.
+
+odl_maven/:
+Contains needed control files for maven OpenDaylight build
+
+f_odl/:
+Contains buildscripts and the generated odl debian package source tree produced
+by the odl build (make-odl-deb.sh) which is later used by the root build system.
+
+NOTE on the controller/ git repo clone:
+The git controller repo clone Contains all artifacts from the odl build, it only
+exists in /tmp inside the build docker container and is not visible anywhere on
+the build host
+
+Note on build caching:
+The latest build results are cached, and will not be rebuilt unless the fuel-build/
+config-spec is changed in respect to odl version or if make clean is applied.
+./.odl-build.log and ./.odl-build.history are used to keep adequate bookmaking to
+track caching and needed cleanout.
diff --git a/fuel/build/opendaylight/f_odl/Makefile b/fuel/build/opendaylight/f_odl/Makefile
new file mode 100644 (file)
index 0000000..8ac5108
--- /dev/null
@@ -0,0 +1,45 @@
+##############################################################################
+# 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
+##############################################################################
+
+include $(BUILD_BASE)/config.mk
+ODL_NAME_SHORT := odl
+PACKAGE := odl_$(shell cd /tmp/controller; git rev-parse --short HEAD)
+VERSION := 0.1-1
+DEB_NAME := $(PACKAGE)_$(VERSION)
+
+.PHONY: all
+all:   release/pool/main/$(DEB_NAME).deb
+
+release/pool/main/$(DEB_NAME).deb:
+ifeq ($(ODL_MAIN_REPO),)
+       @echo "No config-spec target for ODL, nothing to build"
+else
+       @mkdir -p tmp/src
+       @mkdir -p release/pool/main
+       @cp -rp $(DEB_NAME) tmp/src
+       @gzip -f9 tmp/src/$(DEB_NAME)/usr/share/doc/$(ODL_NAME_SHORT)/changelog.Debian
+       @fakeroot dpkg-deb --build tmp/src/$(DEB_NAME)
+       @lintian tmp/src/$(DEB_NAME).deb
+       @cp tmp/src/$(DEB_NAME).deb release/pool/main
+endif
+
+.PHONY: clean
+clean:
+       @rm -rf tmp
+       @rm -rf release
+       @rm -f $(DEB_DEST)/$(DEB_NAME).deb
+
+
+.PHONY: release
+release:release/pool/main/$(DEB_NAME).deb
+ifneq ($(ODL_MAIN_REPO),)
+       @cp release/pool/main/$(DEB_NAME).deb $(DEB_DEST)
+       @cp -Rvp puppet/modules/* $(PUPPET_DEST)
+endif
diff --git a/fuel/build/opendaylight/f_odl/README b/fuel/build/opendaylight/f_odl/README
new file mode 100644 (file)
index 0000000..077962d
--- /dev/null
@@ -0,0 +1,49 @@
+##############################################################################
+# 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 directory adds the OpenDaylight (odl) package and related puppet
+deployment manifest such that it gets built into the .iso image an deployed
+on the stack controller cluster.
+
+The f_odl has the following structure:
+.
++--------+----------+-----------+------------+
+         |          |           |            |
+      puppet/    Makefile     README   odl_<change_id>
+         |                  (this file)  /<version>
+         |                                   |
+         |                            odl deb pkg src
+      modules/
+         |
+         |
+         |
+       opnfv/
+         |
+         |
+         |
+     manifests/
+         |
+         |
+         |
+      odl.pp
+
+Makefile:
+Invoked by the git root Makefile, it builds the odl debian package from the
+debian pkg source directory (inside this directory) and pushes it together
+with the manifests to the fuel build source artifact directory, such that it
+eventually gets built into the new fuel .iso
+
+odl.pp:
+Controls the installation and configuration of odl
+
+odl deb pkg src:
+Is the debian package source directory tree including all needed odl artifacts
+and debian pakage meta data. This debian source package tree is built from
+fuel-build/opendaylight and doesnt exist before it has bee built.
diff --git a/fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp b/fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp
new file mode 100644 (file)
index 0000000..6165646
--- /dev/null
@@ -0,0 +1,13 @@
+class opnfv::odl {
+  if $::osfamily == 'Debian' {
+
+
+    case $::fuel_settings['role'] {
+      /controller/: {
+        package { 'odl':
+          ensure => installed,
+        }
+      }
+    }
+  }
+}
diff --git a/fuel/build/opendaylight/f_odl/testing/README b/fuel/build/opendaylight/f_odl/testing/README
new file mode 100644 (file)
index 0000000..2ef4976
--- /dev/null
@@ -0,0 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
+In order to test the functionality without performing a full deployment, run "puppet apply" on the
+fake_init.pp which will call only the opnfv::odl class.
diff --git a/fuel/build/opendaylight/f_odl/testing/fake_init.pp b/fuel/build/opendaylight/f_odl/testing/fake_init.pp
new file mode 100644 (file)
index 0000000..0600d2e
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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_settings = parseyaml($astute_settings_yaml)
+
+include opnfv::odl
diff --git a/fuel/build/opendaylight/make-odl-deb.sh b/fuel/build/opendaylight/make-odl-deb.sh
new file mode 100755 (executable)
index 0000000..24974dc
--- /dev/null
@@ -0,0 +1,314 @@
+#!/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
+##############################################################################
+
+##############################################################################
+# Default variable declarations
+
+COMMAND=
+PACKAGE_NAME=
+PACKAGE_SHORT_NAME=
+PACKAGE_VERSION=
+TARGET_BUILD_PATH=
+DEPENDENCIES=
+MAINTAINER=
+ARCH="amd64"
+BUILD_HISTORY=".odl-build-history"
+
+##############################################################################
+# subroutine: usage
+# Description: Prints out usage of this script
+
+usage ()
+{
+cat <<EOF
+usage: $0 options
+
+$0 creates a ${PACKAGE_NAME} Debian package
+
+OPTIONS:
+  -n Package shoer name
+  -N Package name
+  -v Version
+  -t Tag
+  -p Target build path, the path where the built tar ball is to be fetched
+  -m Maintainer
+  -d Package dependencies
+  -h Prints this message
+  -C Clean
+
+E.g.: $0 -n my/deb/src/dest/path -N my-package -v 1.0-1 -t myTag -p path/to/the/source -m "Main Tainer <main.tainer.exampe.org> -d myJavaDependence
+EOF
+}
+
+##############################################################################
+# subroutine: clean
+# Description: Cleans up all artifacts from earlier builds
+
+clean ()
+{
+if [ -e $BUILD_HISTORY ]; then
+    while read line
+    do
+       rm -rf $line
+    done < $BUILD_HISTORY
+    rm ${BUILD_HISTORY}
+    exit 0
+fi
+}
+
+##############################################################################
+# make-DEBIAN_control
+# Description: constructs the Debian pack control file
+
+make-DEBIAN_control ()
+{
+cat <<EOF
+Package: $PACKAGE_SHORT_NAME
+Version: $PACKAGE_VERSION
+Section: base
+Priority: optional
+Architecture: $ARCH
+Depends: $DEPENDENCIES
+Maintainer: $MAINTAINER
+Description: OpenDaylight deamon
+ This is a daemon for the opendaylight/odl controller service.
+EOF
+}
+
+##############################################################################
+# subroutine: make-DEBIAN_conffiles
+# Description: Constructs the Debian package config files assignment
+
+make-DEBIAN_conffiles ()
+{
+cat <<EOF
+/etc/odl/etc/all.policy
+/etc/odl/etc/config.properties
+/etc/odl/etc/custom.properties
+/etc/odl/etc/distribution.info
+/etc/odl/etc/equinox-debug.properties
+/etc/odl/etc/java.util.logging.properties
+/etc/odl/etc/jmx.acl.cfg
+/etc/odl/etc/jmx.acl.java.lang.Memory.cfg
+/etc/odl/etc/jmx.acl.org.apache.karaf.bundle.cfg
+/etc/odl/etc/jmx.acl.org.apache.karaf.config.cfg
+/etc/odl/etc/jmx.acl.org.apache.karaf.security.jmx.cfg
+/etc/odl/etc/jmx.acl.osgi.compendium.cm.cfg
+/etc/odl/etc/jre.properties
+/etc/odl/etc/keys.properties
+/etc/odl/etc/org.apache.felix.fileinstall-deploy.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.bundle.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.config.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.feature.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.jaas.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.kar.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.shell.cfg
+/etc/odl/etc/org.apache.karaf.command.acl.system.cfg
+/etc/odl/etc/org.apache.karaf.features.cfg
+/etc/odl/etc/org.apache.karaf.features.obr.cfg
+/etc/odl/etc/org.apache.karaf.features.repos.cfg
+/etc/odl/etc/org.apache.karaf.jaas.cfg
+/etc/odl/etc/org.apache.karaf.kar.cfg
+/etc/odl/etc/org.apache.karaf.log.cfg
+/etc/odl/etc/org.apache.karaf.management.cfg
+/etc/odl/etc/org.apache.karaf.shell.cfg
+/etc/odl/etc/org.ops4j.pax.logging.cfg
+/etc/odl/etc/org.ops4j.pax.url.mvn.cfg
+/etc/odl/etc/regions-config.xml
+/etc/odl/etc/shell.init.script
+/etc/odl/etc/startup.properties
+/etc/odl/etc/system.properties
+/etc/odl/etc/users.properties
+/etc/odl/configuration/context.xml
+/etc/odl/configuration/logback.xml
+/etc/odl/configuration/tomcat-logging.properties
+/etc/odl/configuration/tomcat-server.xml
+EOF
+}
+
+##############################################################################
+# subroutine: make-DEBIAN_postinst
+# Description: Constructs the Debian package post installation script
+
+make-DEBIAN_postinst ()
+{
+cat <<EOF
+#!/bin/bash -e
+ln -s /etc/${PACKAGE_SHORT_NAME}/* ${TARGET_INSTALL_PATH}
+echo "OpenDaylight $TAG version $PACKAGE_VERSION has been installed"
+EOF
+}
+
+##############################################################################
+# subroutine: make-DEBIAN_bin
+# Description: Constructs the bin script (normally under /usr/bin)
+
+make-DEBIAN_bin ()
+{
+cat <<EOF
+#!/bin/bash -e
+${TARGET_INSTALL_PATH}bin/karaf $@
+EOF
+}
+
+##############################################################################
+# subroutine: make-DEBIAN_copyright
+# Description: Constructs the copyright text (normally under /usr/share/doc...)
+
+make-DEBIAN_copyright ()
+{
+cat <<EOF
+OpenDaylight - an open source SDN controller
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+EOF
+}
+
+##############################################################################
+# subroutine: make-DEBIAN_changelog
+# Description: Constructs the changelog text (normally under /usr/share/doc...)
+
+make-DEBIAN_changelog ()
+{
+cat <<EOF
+$PACKAGE_SHORT_NAME ($PACKAGE_VERSION) precise-proposed; urgency=low
+
+  * Derived from $PACKAGE_NAME $PACHAGE_VERSION
+
+ -- $MAINTAINER  $(date)
+EOF
+}
+
+##############################################################################
+# MAIN
+
+while getopts "N:n:v:d:Chm:t:p:" OPTION
+do
+    case $OPTION in
+        h)
+            usage
+            exit 0
+            ;;
+
+        N)
+            PACKAGE_NAME=$OPTARG
+            COMMAND+="-N ${PACKAGE_NAME} "
+            ;;
+
+        n)
+            PACKAGE_SHORT_NAME=$OPTARG
+            COMMAND+="-n ${PACKAGE_SHORT_NAME} "
+            ;;
+
+       v)
+            PACKAGE_VERSION=$OPTARG
+            COMMAND+="-v ${PACKAGE_VERSION} "
+            ;;
+
+       p)
+           TARGET_BUILD_PATH=$OPTARG
+           COMMAND+="-p ${TARGET_BUILD_PATH} "
+           ;;
+
+       t)
+            TAG=$OPTARG
+            COMMAND+="-t ${TAG} "
+            ;;
+
+       m)
+           MAINTAINER=$OPTARG
+            COMMAND+="-m ${MAINTAINER} "
+            ;;
+
+       d)
+           DEPENDENCIES=$OPTARG
+            COMMAND+="-d ${DEPENDENCIES} "
+            ;;
+
+        A)
+           ARCH=$OPTARG
+           COMMAND+="-A ${ARCH} "
+            ;;
+
+        C)
+           COMMAND+="-C "
+           clean
+           exit 0
+            ;;
+    esac
+done
+
+# Constructing script variables
+DEB_PACK_BASE_PATH="f_${PACKAGE_SHORT_NAME}/${PACKAGE_NAME}_${PACKAGE_VERSION}/"
+echo ${DEB_PACK_BASE_PATH} >> "$BUILD_HISTORY"
+TARGET_INSTALL_PATH="/usr/share/java/${PACKAGE_SHORT_NAME}/"
+DEB_PACK_CONTENT_PATH="${DEB_PACK_BASE_PATH}usr/share/java/${PACKAGE_SHORT_NAME}/"
+DEB_PACK_CONFIG_PATH="${DEB_PACK_BASE_PATH}etc/${PACKAGE_SHORT_NAME}"
+TARGET_TAR=$(ls ${TARGET_BUILD_PATH}*.tar.gz)
+TARGET_TAR="${TARGET_TAR##*/}"
+TAR_PATH="${TARGET_TAR%.*}"
+TAR_PATH="${TAR_PATH%.*}"
+if [ -e $DEB_PACK_BASE_PATH ]; then
+    rm -R $DEB_PACK_BASE_PATH
+fi
+
+# Create Deb pack content and configuration
+mkdir -p ${DEB_PACK_CONTENT_PATH}
+cp ${TARGET_BUILD_PATH}${TARGET_TAR} ${DEB_PACK_CONTENT_PATH}
+tar -xzf ${DEB_PACK_CONTENT_PATH}${TARGET_TAR} -C ${DEB_PACK_CONTENT_PATH}
+rm ${DEB_PACK_CONTENT_PATH}${TARGET_TAR}
+mv ${DEB_PACK_CONTENT_PATH}${TAR_PATH}/* ${DEB_PACK_CONTENT_PATH}.
+rm -R ${DEB_PACK_CONTENT_PATH}${TAR_PATH}
+
+# Crate and populate Deb pack config target
+mkdir -p ${DEB_PACK_CONFIG_PATH}/etc
+mv ${DEB_PACK_CONTENT_PATH}etc/* ${DEB_PACK_CONFIG_PATH}/etc/
+rm -R ${DEB_PACK_CONTENT_PATH}etc
+mkdir -p ${DEB_PACK_CONFIG_PATH}/configuration
+mv ${DEB_PACK_CONTENT_PATH}configuration/* ${DEB_PACK_CONFIG_PATH}/configuration/
+rm -R ${DEB_PACK_CONTENT_PATH}configuration
+
+# Set package permisions
+find ${DEB_PACK_CONTENT_PATH} -type d -print -exec chmod 755 {} \;
+find ${DEB_PACK_CONFIG_PATH}/etc/ -type f -print -exec chmod 644 {} \;
+find ${DEB_PACK_CONFIG_PATH}/etc/ -type d -print -exec chmod 755 {} \;
+
+# Create package usr/bin odl script
+mkdir  "${DEB_PACK_BASE_PATH}usr/bin"
+chmod 755 "${DEB_PACK_BASE_PATH}usr/bin"
+make-DEBIAN_bin > "${DEB_PACK_BASE_PATH}usr/bin/odl"
+chmod 755 "${DEB_PACK_BASE_PATH}usr/bin/odl"
+
+# Create Deb pack install meta-data
+mkdir "${DEB_PACK_BASE_PATH}DEBIAN"
+make-DEBIAN_control > "${DEB_PACK_BASE_PATH}DEBIAN/control"
+make-DEBIAN_conffiles > "${DEB_PACK_BASE_PATH}DEBIAN/conffiles"
+mkdir -p "${DEB_PACK_BASE_PATH}usr/share/doc/${PACKAGE_SHORT_NAME}"
+make-DEBIAN_copyright > "${DEB_PACK_BASE_PATH}usr/share/doc/${PACKAGE_SHORT_NAME}/copyright"
+make-DEBIAN_changelog > "${DEB_PACK_BASE_PATH}usr/share/doc/${PACKAGE_SHORT_NAME}/changelog.Debian"
+
+# Create Deb pack post install symlinks and usr/bin scripts
+make-DEBIAN_postinst > "${DEB_PACK_BASE_PATH}DEBIAN/postinst"
+chmod 755  "${DEB_PACK_BASE_PATH}DEBIAN/postinst"
+mkdir -p "${DEB_PACK_BASE_PATH}usr/bin"
diff --git a/fuel/build/opendaylight/odl_maven/settings.xml b/fuel/build/opendaylight/odl_maven/settings.xml
new file mode 100644 (file)
index 0000000..35a4442
--- /dev/null
@@ -0,0 +1,46 @@
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+    <profiles>
+        <profile>
+            <id>opendaylight-release</id>
+            <repositories>
+                <repository>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </releases>
+                    <snapshots>
+                        <enabled>false</enabled>
+                    </snapshots>
+                    <id>opendaylight-mirror</id>
+                    <name>opendaylight-mirror</name>
+                    <url>http://nexus.opendaylight.org/content/groups/public/</url>
+                </repository>
+            </repositories>
+        </profile>
+
+        <profile>
+            <id>opendaylight-snapshots</id>
+            <repositories>
+                <repository>
+                    <releases>
+                        <enabled>false</enabled>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                    <id>opendaylight-snapshot</id>
+                    <name>opendaylight-snapshot</name>
+                    <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+                </repository>
+            </repositories>
+        </profile>
+    </profiles>
+
+    <activeProfiles>
+        <activeProfile>opendaylight-release</activeProfile>
+        <activeProfile>opendaylight-snapshots</activeProfile>
+    </activeProfiles>
+</settings>
similarity index 91%
rename from fuel-build/patch-packages/Makefile
rename to fuel/build/patch-packages/Makefile
index 56bbc89..9eb22fe 100644 (file)
@@ -14,7 +14,7 @@ SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
 .PHONY: $(SUBDIRS) $(SUBCLEAN) clean
 $(SUBDIRS):
        @mkdir -p release/packages
-       ORIGISO=$(ORIGISO) VERSION=$(VERSION) $(MAKE) -C $@ -f Makefile release
+       ORIGISO=$(ORIGISO) REVSTATE=$(REVSTATE) $(MAKE) -C $@ -f Makefile release
 
 release: $(SUBDIRS)
        @echo $(ORIGISO)
@@ -24,6 +24,6 @@ clean:
 release:
        ../tools/deb_unpack python-nova_*.deb $(ORIGISO)
        patch -s -p0 < nova-console.patch
-       ../tools/deb_pack $(VERSION)
+       ../tools/deb_pack $(REVSTATE)
        @cp *.deb ../release/packages
        @cat patch-replacements >> ../release/patch-replacements
@@ -9,7 +9,7 @@
 !                 consolelog.type = "file"
 !                 consolelog.source_path = self._get_console_log_path(instance)
 !                 guest.add_device(consolelog)
-  
+
               consolepty = vconfig.LibvirtConfigGuestSerial()
           else:
 --- 3959,3971 ----
@@ -23,6 +23,6 @@
 !                 # guest.add_device(consolelog)
 !                 pass
 !                 # Disabled by OPNFV END
-  
+
               consolepty = vconfig.LibvirtConfigGuestSerial()
           else:
@@ -25,6 +25,6 @@ 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 $(VERSION)
+       ../tools/deb_pack $(REVSTATE)
        @cp *.deb ../release/packages
        @cat patch-replacements >> ../release/patch-replacements