From 6cb518c68eb136ad448e96716ef8b1348440949f Mon Sep 17 00:00:00 2001 From: Jonas Bjurel Date: Mon, 2 Mar 2015 22:46:45 +0100 Subject: [PATCH] Starting point for ODL Integration ***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 --- fuel-build/f_osnaily/Makefile | 24 -- fuel-build/f_resolvconf/Makefile | 24 -- .../build}/DOC/BUILD/README.architecture | 0 {fuel-build => fuel/build}/DOC/BUILD/README.build | 55 ++-- .../build}/DOC/BUILD/README.examples | 0 {fuel-build => fuel/build}/DOC/INSTALL/README | 0 fuel/build/Makefile | 140 +++++++++ fuel-build/Makefile => fuel/build/Makefile~ | 60 +++- {fuel-build => fuel/build}/README | 3 +- fuel/build/RELEASENOTES | 32 +++ {fuel-build => fuel/build}/TODO | 6 +- {fuel-build => fuel/build}/add_opnfv_packages | 0 {fuel-build => fuel/build}/apply_patches | 0 fuel/build/config.mk | 25 ++ {fuel-build => fuel/build}/docker/Makefile | 2 +- {fuel-build => fuel/build}/docker/README | 0 {fuel-build => fuel/build}/docker/runcontext | 0 .../build}/docker/ubuntu-builder/Dockerfile | 8 +- .../build}/docker/ubuntu-builder/enable_dockerx2 | 1 + fuel/build/docker/ubuntu-builder/install.sh | 25 ++ .../build}/docker/ubuntu-builder/setcontext | 0 fuel/build/f_atk_wrap/Makefile | 42 +++ .../puppet/modules/opnfv/manifests/atk_wrap.pp | 12 + fuel/build/f_ca_cert/Makefile | 42 +++ .../puppet/modules/opnfv/manifests/ca_cert.pp | 11 + fuel/build/f_comm_java/Makefile | 42 +++ .../puppet/modules/opnfv/manifests/comm_java.pp | 11 + fuel/build/f_defjre/Makefile | 42 +++ .../puppet/modules/opnfv/manifests/defjre.pp | 11 + .../build/f_example_control_bond}/Makefile | 2 +- .../build}/f_example_control_bond/README | 0 .../puppet/modules/opnfv/files/control-bond | 0 .../puppet/modules/opnfv/manifests/control-bond.pp | 0 .../build}/f_example_packadd/Makefile | 23 +- .../build}/f_example_packadd/README | 0 .../foobar_1.0-1/DEBIAN/conffiles | 0 .../f_example_packadd/foobar_1.0-1/DEBIAN/control | 0 .../f_example_packadd/foobar_1.0-1/DEBIAN/postinst | 0 .../foobar_1.0-1/etc/foobar/foobar.conf | 0 .../f_example_packadd/foobar_1.0-1/usr/bin/foobar | 0 .../usr/share/doc/foobar/changelog.Debian | 0 .../foobar_1.0-1/usr/share/doc/foobar/copyright | 0 .../puppet/modules/opnfv/manifests/foobar.pp | 0 fuel/build/f_gif/Makefile | 42 +++ .../f_gif/puppet/modules/opnfv/manifests/gif.pp | 11 + {fuel-build => fuel/build}/f_isoroot/Makefile | 0 {fuel-build => fuel/build}/f_isoroot/README | 0 .../build}/f_isoroot/f_bootstrap/Makefile | 0 .../build}/f_isoroot/f_bootstrap/README | 0 .../f_isoroot/f_bootstrap/bootstrap_admin_node.sh | 0 .../f_bootstrap/bootstrap_admin_node.sh.orig | 0 .../f_bootstrap/post-scripts/00_post_example.sh | 0 .../f_bootstrap/post-scripts/01_fix_iommubug.sh | 0 .../post-scripts/02_fix_console_speed.sh | 0 .../f_bootstrap/pre-scripts/00_pre_example.sh | 0 .../build}/f_isoroot/f_kscfg/Makefile | 0 .../build}/f_isoroot/f_kscfg/README | 0 .../build}/f_isoroot/f_kscfg/ks.cfg | 0 .../build}/f_isoroot/f_kscfg/ks.cfg.orig | 0 .../build}/f_isoroot/f_predeployment/Makefile | 0 .../build}/f_isoroot/f_predeployment/README | 0 .../build}/f_isoroot/f_predeployment/pre-deploy.sh | 0 .../build}/f_isoroot/f_predeployment/sysinfo.sh | 0 .../f_isoroot/f_predeployment/transform_yaml.py | 0 fuel/build/f_java/Makefile | 42 +++ fuel/build/f_java/README | 44 +++ .../f_java/puppet/modules/opnfv/manifests/java.pp | 11 + fuel/build/f_java/testing/README | 12 + fuel/build/f_java/testing/fake_init.pp | 13 + fuel/build/f_jre/Makefile | 41 +++ fuel/build/f_jre/README | 44 +++ .../f_jre/puppet/modules/opnfv/manifests/jre.pp | 14 + fuel/build/f_jre/testing/README | 13 + fuel/build/f_jre/testing/fake_init.pp | 13 + fuel/build/f_jre_head/Makefile | 43 +++ .../puppet/modules/opnfv/manifests/jre_head.pp | 15 + .../f_ntp => fuel/build/f_l23network}/Makefile | 2 +- {fuel-build => fuel/build}/f_l23network/README | 0 .../lib/puppet/parser/functions/extras_to_hosts.rb | 0 .../modules/l23network/manifests/hosts_file.pp | 0 .../l23network/manifests/hosts_file.pp.orig | 0 .../build}/f_l23network/testing/README | 0 .../build}/f_l23network/testing/fake_init.pp | 0 fuel/build/f_libnss/Makefile | 42 +++ fuel/build/f_libnss/README | 44 +++ .../puppet/modules/opnfv/manifests/libnss.pp | 11 + fuel/build/f_libnss/testing/README | 12 + fuel/build/f_libnss/testing/fake_init.pp | 13 + fuel/build/f_libpcs/Makefile | 42 +++ .../puppet/modules/opnfv/manifests/libpcs.pp | 11 + fuel/build/f_libxt/Makefile | 42 +++ .../puppet/modules/opnfv/manifests/libxt.pp | 11 + .../f_l23network => fuel/build/f_ntp}/Makefile | 2 +- {fuel-build => fuel/build}/f_ntp/README | 1 + .../f_ntp/puppet/modules/opnfv/manifests/ntp.pp | 0 .../modules/opnfv/templates/ntp.conf.compute.erb | 0 .../opnfv/templates/ntp.conf.controller.erb | 0 {fuel-build => fuel/build}/f_ntp/testing/README | 0 .../build}/f_ntp/testing/fake_init.pp | 0 .../build/f_opnfv_puppet}/Makefile | 2 +- {fuel-build => fuel/build}/f_opnfv_puppet/README | 0 .../puppet/modules/opnfv/manifests/add_packages.pp | 0 .../puppet/modules/opnfv/manifests/init.pp | 15 +- .../puppet/modules/opnfv/manifests/opncheck.pp | 0 fuel/build/f_osnaily/Makefile | 24 ++ .../puppet/modules/osnailyfacter/examples/site.pp | 0 .../modules/osnailyfacter/examples/site.pp.orig | 0 fuel/build/f_resolvconf/Makefile | 24 ++ {fuel-build => fuel/build}/f_resolvconf/README | 1 + .../puppet/modules/opnfv/manifests/resolver.pp | 0 .../puppet/modules/opnfv/templates/resolv.conf.erb | 0 .../build}/f_resolvconf/testing/README | 0 .../build}/f_resolvconf/testing/fake_init.pp | 0 {fuel-build => fuel/build}/fuel-main_1.patch | 38 +-- {fuel-build => fuel/build}/fuel-main_2.patch | 1 + .../build}/install/apt-ftparchive-deb.conf | 0 .../build}/install/apt-ftparchive-release.conf | 0 {fuel-build => fuel/build}/install/install.sh | 0 {fuel-build => fuel/build}/install/uninstall.sh | 0 fuel/build/opendaylight/Makefile | 63 +++++ fuel/build/opendaylight/README | 52 ++++ fuel/build/opendaylight/f_odl/Makefile | 45 +++ fuel/build/opendaylight/f_odl/README | 49 ++++ .../f_odl/puppet/modules/opnfv/manifests/odl.pp | 13 + fuel/build/opendaylight/f_odl/testing/README | 12 + fuel/build/opendaylight/f_odl/testing/fake_init.pp | 13 + fuel/build/opendaylight/make-odl-deb.sh | 314 +++++++++++++++++++++ fuel/build/opendaylight/odl_maven/settings.xml | 46 +++ {fuel-build => fuel/build}/patch-packages/Makefile | 2 +- .../build}/patch-packages/python-nova/Makefile | 2 +- .../patch-packages/python-nova/nova-console.patch | 4 +- .../build}/patch-packages/tools/correct_deps | 0 .../build}/patch-packages/tools/deb_pack | 0 .../build}/patch-packages/tools/deb_unpack | 0 .../build}/patch-packages/tr_example/Makefile | 2 +- 135 files changed, 1830 insertions(+), 126 deletions(-) delete mode 100644 fuel-build/f_osnaily/Makefile delete mode 100644 fuel-build/f_resolvconf/Makefile rename {fuel-build => fuel/build}/DOC/BUILD/README.architecture (100%) rename {fuel-build => fuel/build}/DOC/BUILD/README.build (59%) rename {fuel-build => fuel/build}/DOC/BUILD/README.examples (100%) rename {fuel-build => fuel/build}/DOC/INSTALL/README (100%) create mode 100644 fuel/build/Makefile rename fuel-build/Makefile => fuel/build/Makefile~ (70%) rename {fuel-build => fuel/build}/README (97%) create mode 100644 fuel/build/RELEASENOTES rename {fuel-build => fuel/build}/TODO (63%) rename {fuel-build => fuel/build}/add_opnfv_packages (100%) rename {fuel-build => fuel/build}/apply_patches (100%) create mode 100644 fuel/build/config.mk rename {fuel-build => fuel/build}/docker/Makefile (88%) rename {fuel-build => fuel/build}/docker/README (100%) rename {fuel-build => fuel/build}/docker/runcontext (100%) rename {fuel-build => fuel/build}/docker/ubuntu-builder/Dockerfile (78%) rename {fuel-build => fuel/build}/docker/ubuntu-builder/enable_dockerx2 (97%) create mode 100755 fuel/build/docker/ubuntu-builder/install.sh rename {fuel-build => fuel/build}/docker/ubuntu-builder/setcontext (100%) mode change 100644 => 100755 create mode 100644 fuel/build/f_atk_wrap/Makefile create mode 100644 fuel/build/f_atk_wrap/puppet/modules/opnfv/manifests/atk_wrap.pp create mode 100644 fuel/build/f_ca_cert/Makefile create mode 100644 fuel/build/f_ca_cert/puppet/modules/opnfv/manifests/ca_cert.pp create mode 100644 fuel/build/f_comm_java/Makefile create mode 100644 fuel/build/f_comm_java/puppet/modules/opnfv/manifests/comm_java.pp create mode 100644 fuel/build/f_defjre/Makefile create mode 100644 fuel/build/f_defjre/puppet/modules/opnfv/manifests/defjre.pp rename {fuel-build/f_opnfv_puppet => fuel/build/f_example_control_bond}/Makefile (92%) rename {fuel-build => fuel/build}/f_example_control_bond/README (100%) rename {fuel-build => fuel/build}/f_example_control_bond/puppet/modules/opnfv/files/control-bond (100%) rename {fuel-build => fuel/build}/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp (100%) rename {fuel-build => fuel/build}/f_example_packadd/Makefile (52%) rename {fuel-build => fuel/build}/f_example_packadd/README (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/DEBIAN/control (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/DEBIAN/postinst (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/usr/bin/foobar (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian (100%) rename {fuel-build => fuel/build}/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright (100%) rename {fuel-build => fuel/build}/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp (100%) create mode 100644 fuel/build/f_gif/Makefile create mode 100644 fuel/build/f_gif/puppet/modules/opnfv/manifests/gif.pp rename {fuel-build => fuel/build}/f_isoroot/Makefile (100%) rename {fuel-build => fuel/build}/f_isoroot/README (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/Makefile (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/README (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/bootstrap_admin_node.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_kscfg/Makefile (100%) rename {fuel-build => fuel/build}/f_isoroot/f_kscfg/README (100%) rename {fuel-build => fuel/build}/f_isoroot/f_kscfg/ks.cfg (100%) rename {fuel-build => fuel/build}/f_isoroot/f_kscfg/ks.cfg.orig (100%) rename {fuel-build => fuel/build}/f_isoroot/f_predeployment/Makefile (100%) rename {fuel-build => fuel/build}/f_isoroot/f_predeployment/README (100%) rename {fuel-build => fuel/build}/f_isoroot/f_predeployment/pre-deploy.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_predeployment/sysinfo.sh (100%) rename {fuel-build => fuel/build}/f_isoroot/f_predeployment/transform_yaml.py (100%) create mode 100644 fuel/build/f_java/Makefile create mode 100644 fuel/build/f_java/README create mode 100644 fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp create mode 100644 fuel/build/f_java/testing/README create mode 100644 fuel/build/f_java/testing/fake_init.pp create mode 100644 fuel/build/f_jre/Makefile create mode 100644 fuel/build/f_jre/README create mode 100644 fuel/build/f_jre/puppet/modules/opnfv/manifests/jre.pp create mode 100644 fuel/build/f_jre/testing/README create mode 100644 fuel/build/f_jre/testing/fake_init.pp create mode 100644 fuel/build/f_jre_head/Makefile create mode 100644 fuel/build/f_jre_head/puppet/modules/opnfv/manifests/jre_head.pp rename {fuel-build/f_ntp => fuel/build/f_l23network}/Makefile (92%) rename {fuel-build => fuel/build}/f_l23network/README (100%) rename {fuel-build => fuel/build}/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb (100%) rename {fuel-build => fuel/build}/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp (100%) rename {fuel-build => fuel/build}/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig (100%) rename {fuel-build => fuel/build}/f_l23network/testing/README (100%) rename {fuel-build => fuel/build}/f_l23network/testing/fake_init.pp (100%) create mode 100644 fuel/build/f_libnss/Makefile create mode 100644 fuel/build/f_libnss/README create mode 100644 fuel/build/f_libnss/puppet/modules/opnfv/manifests/libnss.pp create mode 100644 fuel/build/f_libnss/testing/README create mode 100644 fuel/build/f_libnss/testing/fake_init.pp create mode 100644 fuel/build/f_libpcs/Makefile create mode 100644 fuel/build/f_libpcs/puppet/modules/opnfv/manifests/libpcs.pp create mode 100644 fuel/build/f_libxt/Makefile create mode 100644 fuel/build/f_libxt/puppet/modules/opnfv/manifests/libxt.pp rename {fuel-build/f_l23network => fuel/build/f_ntp}/Makefile (92%) rename {fuel-build => fuel/build}/f_ntp/README (99%) rename {fuel-build => fuel/build}/f_ntp/puppet/modules/opnfv/manifests/ntp.pp (100%) rename {fuel-build => fuel/build}/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb (100%) rename {fuel-build => fuel/build}/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb (100%) rename {fuel-build => fuel/build}/f_ntp/testing/README (100%) rename {fuel-build => fuel/build}/f_ntp/testing/fake_init.pp (100%) rename {fuel-build/f_example_control_bond => fuel/build/f_opnfv_puppet}/Makefile (92%) rename {fuel-build => fuel/build}/f_opnfv_puppet/README (100%) rename {fuel-build => fuel/build}/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp (100%) rename {fuel-build => fuel/build}/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp (72%) rename {fuel-build => fuel/build}/f_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp (100%) create mode 100644 fuel/build/f_osnaily/Makefile rename {fuel-build => fuel/build}/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp (100%) rename {fuel-build => fuel/build}/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig (100%) create mode 100644 fuel/build/f_resolvconf/Makefile rename {fuel-build => fuel/build}/f_resolvconf/README (99%) rename {fuel-build => fuel/build}/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp (100%) rename {fuel-build => fuel/build}/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb (100%) rename {fuel-build => fuel/build}/f_resolvconf/testing/README (100%) rename {fuel-build => fuel/build}/f_resolvconf/testing/fake_init.pp (100%) rename {fuel-build => fuel/build}/fuel-main_1.patch (99%) rename {fuel-build => fuel/build}/fuel-main_2.patch (99%) rename {fuel-build => fuel/build}/install/apt-ftparchive-deb.conf (100%) rename {fuel-build => fuel/build}/install/apt-ftparchive-release.conf (100%) rename {fuel-build => fuel/build}/install/install.sh (100%) rename {fuel-build => fuel/build}/install/uninstall.sh (100%) create mode 100644 fuel/build/opendaylight/Makefile create mode 100644 fuel/build/opendaylight/README create mode 100644 fuel/build/opendaylight/f_odl/Makefile create mode 100644 fuel/build/opendaylight/f_odl/README create mode 100644 fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp create mode 100644 fuel/build/opendaylight/f_odl/testing/README create mode 100644 fuel/build/opendaylight/f_odl/testing/fake_init.pp create mode 100755 fuel/build/opendaylight/make-odl-deb.sh create mode 100644 fuel/build/opendaylight/odl_maven/settings.xml rename {fuel-build => fuel/build}/patch-packages/Makefile (91%) rename {fuel-build => fuel/build}/patch-packages/python-nova/Makefile (96%) rename {fuel-build => fuel/build}/patch-packages/python-nova/nova-console.patch (99%) rename {fuel-build => fuel/build}/patch-packages/tools/correct_deps (100%) rename {fuel-build => fuel/build}/patch-packages/tools/deb_pack (100%) rename {fuel-build => fuel/build}/patch-packages/tools/deb_unpack (100%) rename {fuel-build => fuel/build}/patch-packages/tr_example/Makefile (96%) diff --git a/fuel-build/f_osnaily/Makefile b/fuel-build/f_osnaily/Makefile deleted file mode 100644 index 295fd0e..0000000 --- a/fuel-build/f_osnaily/Makefile +++ /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 index 295fd0e..0000000 --- a/fuel-build/f_resolvconf/Makefile +++ /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/DOC/BUILD/README.architecture b/fuel/build/DOC/BUILD/README.architecture similarity index 100% rename from fuel-build/DOC/BUILD/README.architecture rename to fuel/build/DOC/BUILD/README.architecture diff --git a/fuel-build/DOC/BUILD/README.build b/fuel/build/DOC/BUILD/README.build similarity index 59% rename from fuel-build/DOC/BUILD/README.build rename to fuel/build/DOC/BUILD/README.build index a5e1112..519ee6a 100644 --- a/fuel-build/DOC/BUILD/README.build +++ b/fuel/build/DOC/BUILD/README.build @@ -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/DOC/BUILD/README.examples b/fuel/build/DOC/BUILD/README.examples similarity index 100% rename from fuel-build/DOC/BUILD/README.examples rename to fuel/build/DOC/BUILD/README.examples diff --git a/fuel-build/DOC/INSTALL/README b/fuel/build/DOC/INSTALL/README similarity index 100% rename from fuel-build/DOC/INSTALL/README rename to fuel/build/DOC/INSTALL/README diff --git a/fuel/build/Makefile b/fuel/build/Makefile new file mode 100644 index 0000000..8e90fcc --- /dev/null +++ b/fuel/build/Makefile @@ -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" diff --git a/fuel-build/Makefile b/fuel/build/Makefile~ similarity index 70% rename from fuel-build/Makefile rename to fuel/build/Makefile~ index eb37b4d..7f16a28 100644 --- a/fuel-build/Makefile +++ b/fuel/build/Makefile~ @@ -12,18 +12,25 @@ # 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" diff --git a/fuel-build/README b/fuel/build/README similarity index 97% rename from fuel-build/README rename to fuel/build/README index 82b5598..9692f34 100644 --- a/fuel-build/README +++ b/fuel/build/README @@ -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 index 0000000..76b4208 --- /dev/null +++ b/fuel/build/RELEASENOTES @@ -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. diff --git a/fuel-build/TODO b/fuel/build/TODO similarity index 63% rename from fuel-build/TODO rename to fuel/build/TODO index 7e26449..897a7e8 100644 --- a/fuel-build/TODO +++ b/fuel/build/TODO @@ -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/add_opnfv_packages b/fuel/build/add_opnfv_packages similarity index 100% rename from fuel-build/add_opnfv_packages rename to fuel/build/add_opnfv_packages diff --git a/fuel-build/apply_patches b/fuel/build/apply_patches similarity index 100% rename from fuel-build/apply_patches rename to fuel/build/apply_patches diff --git a/fuel/build/config.mk b/fuel/build/config.mk new file mode 100644 index 0000000..da760df --- /dev/null +++ b/fuel/build/config.mk @@ -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 diff --git a/fuel-build/docker/Makefile b/fuel/build/docker/Makefile similarity index 88% rename from fuel-build/docker/Makefile rename to fuel/build/docker/Makefile index 360bb54..c2853c8 100644 --- a/fuel-build/docker/Makefile +++ b/fuel/build/docker/Makefile @@ -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 diff --git a/fuel-build/docker/README b/fuel/build/docker/README similarity index 100% rename from fuel-build/docker/README rename to fuel/build/docker/README diff --git a/fuel-build/docker/runcontext b/fuel/build/docker/runcontext similarity index 100% rename from fuel-build/docker/runcontext rename to fuel/build/docker/runcontext diff --git a/fuel-build/docker/ubuntu-builder/Dockerfile b/fuel/build/docker/ubuntu-builder/Dockerfile similarity index 78% rename from fuel-build/docker/ubuntu-builder/Dockerfile rename to fuel/build/docker/ubuntu-builder/Dockerfile index 3ec934d..b4e1b4e 100644 --- a/fuel-build/docker/ubuntu-builder/Dockerfile +++ b/fuel/build/docker/ubuntu-builder/Dockerfile @@ -11,15 +11,21 @@ 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 diff --git a/fuel-build/docker/ubuntu-builder/enable_dockerx2 b/fuel/build/docker/ubuntu-builder/enable_dockerx2 similarity index 97% rename from fuel-build/docker/ubuntu-builder/enable_dockerx2 rename to fuel/build/docker/ubuntu-builder/enable_dockerx2 index e79c8b7..1511c70 100644 --- a/fuel-build/docker/ubuntu-builder/enable_dockerx2 +++ b/fuel/build/docker/ubuntu-builder/enable_dockerx2 @@ -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 index 0000000..df1af72 --- /dev/null +++ b/fuel/build/docker/ubuntu-builder/install.sh @@ -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/docker/ubuntu-builder/setcontext b/fuel/build/docker/ubuntu-builder/setcontext old mode 100644 new mode 100755 similarity index 100% rename from fuel-build/docker/ubuntu-builder/setcontext rename to fuel/build/docker/ubuntu-builder/setcontext diff --git a/fuel/build/f_atk_wrap/Makefile b/fuel/build/f_atk_wrap/Makefile new file mode 100644 index 0000000..99010eb --- /dev/null +++ b/fuel/build/f_atk_wrap/Makefile @@ -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 index 0000000..144651e --- /dev/null +++ b/fuel/build/f_atk_wrap/puppet/modules/opnfv/manifests/atk_wrap.pp @@ -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 index 0000000..83069cf --- /dev/null +++ b/fuel/build/f_ca_cert/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..69b5d23 --- /dev/null +++ b/fuel/build/f_ca_cert/puppet/modules/opnfv/manifests/ca_cert.pp @@ -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 index 0000000..a0cac38 --- /dev/null +++ b/fuel/build/f_comm_java/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..dd7ddc5 --- /dev/null +++ b/fuel/build/f_comm_java/puppet/modules/opnfv/manifests/comm_java.pp @@ -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 index 0000000..5b295c1 --- /dev/null +++ b/fuel/build/f_defjre/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..605453b --- /dev/null +++ b/fuel/build/f_defjre/puppet/modules/opnfv/manifests/defjre.pp @@ -0,0 +1,11 @@ +class opnfv::defjre { + if $::osfamily == 'Debian' { + case $::fuel_settings['role'] { + /controller/: { + package { 'default-jre': + ensure => installed, + } + } + } + } +} diff --git a/fuel-build/f_opnfv_puppet/Makefile b/fuel/build/f_example_control_bond/Makefile similarity index 92% rename from fuel-build/f_opnfv_puppet/Makefile rename to fuel/build/f_example_control_bond/Makefile index 295fd0e..c311a2d 100644 --- a/fuel-build/f_opnfv_puppet/Makefile +++ b/fuel/build/f_example_control_bond/Makefile @@ -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_example_control_bond/README b/fuel/build/f_example_control_bond/README similarity index 100% rename from fuel-build/f_example_control_bond/README rename to fuel/build/f_example_control_bond/README diff --git a/fuel-build/f_example_control_bond/puppet/modules/opnfv/files/control-bond b/fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond similarity index 100% rename from fuel-build/f_example_control_bond/puppet/modules/opnfv/files/control-bond rename to fuel/build/f_example_control_bond/puppet/modules/opnfv/files/control-bond diff --git a/fuel-build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp b/fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp similarity index 100% rename from fuel-build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp rename to fuel/build/f_example_control_bond/puppet/modules/opnfv/manifests/control-bond.pp diff --git a/fuel-build/f_example_packadd/Makefile b/fuel/build/f_example_packadd/Makefile similarity index 52% rename from fuel-build/f_example_packadd/Makefile rename to fuel/build/f_example_packadd/Makefile index 3808884..eadc83f 100644 --- a/fuel-build/f_example_packadd/Makefile +++ b/fuel/build/f_example_packadd/Makefile @@ -11,27 +11,28 @@ 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_example_packadd/README b/fuel/build/f_example_packadd/README similarity index 100% rename from fuel-build/f_example_packadd/README rename to fuel/build/f_example_packadd/README diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles rename to fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/control b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/control rename to fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst rename to fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf b/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf rename to fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/usr/bin/foobar b/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/usr/bin/foobar rename to fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian rename to fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian diff --git a/fuel-build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright similarity index 100% rename from fuel-build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright rename to fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright diff --git a/fuel-build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp b/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp similarity index 100% rename from fuel-build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp rename to fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp diff --git a/fuel/build/f_gif/Makefile b/fuel/build/f_gif/Makefile new file mode 100644 index 0000000..7108242 --- /dev/null +++ b/fuel/build/f_gif/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..d51cbe7 --- /dev/null +++ b/fuel/build/f_gif/puppet/modules/opnfv/manifests/gif.pp @@ -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_isoroot/Makefile b/fuel/build/f_isoroot/Makefile similarity index 100% rename from fuel-build/f_isoroot/Makefile rename to fuel/build/f_isoroot/Makefile diff --git a/fuel-build/f_isoroot/README b/fuel/build/f_isoroot/README similarity index 100% rename from fuel-build/f_isoroot/README rename to fuel/build/f_isoroot/README diff --git a/fuel-build/f_isoroot/f_bootstrap/Makefile b/fuel/build/f_isoroot/f_bootstrap/Makefile similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/Makefile rename to fuel/build/f_isoroot/f_bootstrap/Makefile diff --git a/fuel-build/f_isoroot/f_bootstrap/README b/fuel/build/f_isoroot/f_bootstrap/README similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/README rename to fuel/build/f_isoroot/f_bootstrap/README diff --git a/fuel-build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh rename to fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh diff --git a/fuel-build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig rename to fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig diff --git a/fuel-build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh b/fuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh rename to fuel/build/f_isoroot/f_bootstrap/post-scripts/00_post_example.sh diff --git a/fuel-build/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh b/fuel/build/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh rename to fuel/build/f_isoroot/f_bootstrap/post-scripts/01_fix_iommubug.sh diff --git a/fuel-build/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh b/fuel/build/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh rename to fuel/build/f_isoroot/f_bootstrap/post-scripts/02_fix_console_speed.sh diff --git a/fuel-build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh b/fuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh similarity index 100% rename from fuel-build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh rename to fuel/build/f_isoroot/f_bootstrap/pre-scripts/00_pre_example.sh diff --git a/fuel-build/f_isoroot/f_kscfg/Makefile b/fuel/build/f_isoroot/f_kscfg/Makefile similarity index 100% rename from fuel-build/f_isoroot/f_kscfg/Makefile rename to fuel/build/f_isoroot/f_kscfg/Makefile diff --git a/fuel-build/f_isoroot/f_kscfg/README b/fuel/build/f_isoroot/f_kscfg/README similarity index 100% rename from fuel-build/f_isoroot/f_kscfg/README rename to fuel/build/f_isoroot/f_kscfg/README diff --git a/fuel-build/f_isoroot/f_kscfg/ks.cfg b/fuel/build/f_isoroot/f_kscfg/ks.cfg similarity index 100% rename from fuel-build/f_isoroot/f_kscfg/ks.cfg rename to fuel/build/f_isoroot/f_kscfg/ks.cfg diff --git a/fuel-build/f_isoroot/f_kscfg/ks.cfg.orig b/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig similarity index 100% rename from fuel-build/f_isoroot/f_kscfg/ks.cfg.orig rename to fuel/build/f_isoroot/f_kscfg/ks.cfg.orig diff --git a/fuel-build/f_isoroot/f_predeployment/Makefile b/fuel/build/f_isoroot/f_predeployment/Makefile similarity index 100% rename from fuel-build/f_isoroot/f_predeployment/Makefile rename to fuel/build/f_isoroot/f_predeployment/Makefile diff --git a/fuel-build/f_isoroot/f_predeployment/README b/fuel/build/f_isoroot/f_predeployment/README similarity index 100% rename from fuel-build/f_isoroot/f_predeployment/README rename to fuel/build/f_isoroot/f_predeployment/README diff --git a/fuel-build/f_isoroot/f_predeployment/pre-deploy.sh b/fuel/build/f_isoroot/f_predeployment/pre-deploy.sh similarity index 100% rename from fuel-build/f_isoroot/f_predeployment/pre-deploy.sh rename to fuel/build/f_isoroot/f_predeployment/pre-deploy.sh diff --git a/fuel-build/f_isoroot/f_predeployment/sysinfo.sh b/fuel/build/f_isoroot/f_predeployment/sysinfo.sh similarity index 100% rename from fuel-build/f_isoroot/f_predeployment/sysinfo.sh rename to fuel/build/f_isoroot/f_predeployment/sysinfo.sh diff --git a/fuel-build/f_isoroot/f_predeployment/transform_yaml.py b/fuel/build/f_isoroot/f_predeployment/transform_yaml.py similarity index 100% rename from fuel-build/f_isoroot/f_predeployment/transform_yaml.py rename to fuel/build/f_isoroot/f_predeployment/transform_yaml.py diff --git a/fuel/build/f_java/Makefile b/fuel/build/f_java/Makefile new file mode 100644 index 0000000..759081f --- /dev/null +++ b/fuel/build/f_java/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..776d47a --- /dev/null +++ b/fuel/build/f_java/README @@ -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 index 0000000..26e7c39 --- /dev/null +++ b/fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp @@ -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 index 0000000..c0ef7d6 --- /dev/null +++ b/fuel/build/f_java/testing/README @@ -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 index 0000000..237b0c1 --- /dev/null +++ b/fuel/build/f_java/testing/fake_init.pp @@ -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 index 0000000..43f5e76 --- /dev/null +++ b/fuel/build/f_jre/Makefile @@ -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 index 0000000..24e4cdd --- /dev/null +++ b/fuel/build/f_jre/README @@ -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 index 0000000..3c342d2 --- /dev/null +++ b/fuel/build/f_jre/puppet/modules/opnfv/manifests/jre.pp @@ -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 index 0000000..028230d --- /dev/null +++ b/fuel/build/f_jre/testing/README @@ -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 index 0000000..83c7adb --- /dev/null +++ b/fuel/build/f_jre/testing/fake_init.pp @@ -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 index 0000000..2efc81a --- /dev/null +++ b/fuel/build/f_jre_head/Makefile @@ -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 index 0000000..44b649b --- /dev/null +++ b/fuel/build/f_jre_head/puppet/modules/opnfv/manifests/jre_head.pp @@ -0,0 +1,15 @@ +class opnfv::jre_head { + if $::osfamily == 'Debian' { + + case $::fuel_settings['role'] { + /controller/: { + + package { 'openjdk-8-jre-headless' : + ensure => installed, + } + + } + } + } +} + diff --git a/fuel-build/f_ntp/Makefile b/fuel/build/f_l23network/Makefile similarity index 92% rename from fuel-build/f_ntp/Makefile rename to fuel/build/f_l23network/Makefile index 295fd0e..c311a2d 100644 --- a/fuel-build/f_ntp/Makefile +++ b/fuel/build/f_l23network/Makefile @@ -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_l23network/README b/fuel/build/f_l23network/README similarity index 100% rename from fuel-build/f_l23network/README rename to fuel/build/f_l23network/README diff --git a/fuel-build/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb b/fuel/build/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb similarity index 100% rename from fuel-build/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb rename to fuel/build/f_l23network/puppet/modules/l23network/lib/puppet/parser/functions/extras_to_hosts.rb diff --git a/fuel-build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp b/fuel/build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp similarity index 100% rename from fuel-build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp rename to fuel/build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp diff --git a/fuel-build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig b/fuel/build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig similarity index 100% rename from fuel-build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig rename to fuel/build/f_l23network/puppet/modules/l23network/manifests/hosts_file.pp.orig diff --git a/fuel-build/f_l23network/testing/README b/fuel/build/f_l23network/testing/README similarity index 100% rename from fuel-build/f_l23network/testing/README rename to fuel/build/f_l23network/testing/README diff --git a/fuel-build/f_l23network/testing/fake_init.pp b/fuel/build/f_l23network/testing/fake_init.pp similarity index 100% rename from fuel-build/f_l23network/testing/fake_init.pp rename to fuel/build/f_l23network/testing/fake_init.pp diff --git a/fuel/build/f_libnss/Makefile b/fuel/build/f_libnss/Makefile new file mode 100644 index 0000000..e17519a --- /dev/null +++ b/fuel/build/f_libnss/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..776d47a --- /dev/null +++ b/fuel/build/f_libnss/README @@ -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 index 0000000..17cfb8d --- /dev/null +++ b/fuel/build/f_libnss/puppet/modules/opnfv/manifests/libnss.pp @@ -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 index 0000000..c0ef7d6 --- /dev/null +++ b/fuel/build/f_libnss/testing/README @@ -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 index 0000000..237b0c1 --- /dev/null +++ b/fuel/build/f_libnss/testing/fake_init.pp @@ -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 index 0000000..3e480db --- /dev/null +++ b/fuel/build/f_libpcs/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..1f26247 --- /dev/null +++ b/fuel/build/f_libpcs/puppet/modules/opnfv/manifests/libpcs.pp @@ -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 index 0000000..bb5c2aa --- /dev/null +++ b/fuel/build/f_libxt/Makefile @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +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 index 0000000..a862778 --- /dev/null +++ b/fuel/build/f_libxt/puppet/modules/opnfv/manifests/libxt.pp @@ -0,0 +1,11 @@ +class opnfv::libxt { + if $::osfamily == 'Debian' { + case $::fuel_settings['role'] { + /controller/: { + package { 'libxtst6': + ensure => installed, + } + } + } + } +} diff --git a/fuel-build/f_l23network/Makefile b/fuel/build/f_ntp/Makefile similarity index 92% rename from fuel-build/f_l23network/Makefile rename to fuel/build/f_ntp/Makefile index 295fd0e..c311a2d 100644 --- a/fuel-build/f_l23network/Makefile +++ b/fuel/build/f_ntp/Makefile @@ -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_ntp/README b/fuel/build/f_ntp/README similarity index 99% rename from fuel-build/f_ntp/README rename to fuel/build/f_ntp/README index 77fd1da..2bade72 100644 --- a/fuel-build/f_ntp/README +++ b/fuel/build/f_ntp/README @@ -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. + diff --git a/fuel-build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp b/fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp similarity index 100% rename from fuel-build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp rename to fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp diff --git a/fuel-build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb b/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb similarity index 100% rename from fuel-build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb rename to fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb diff --git a/fuel-build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb b/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb similarity index 100% rename from fuel-build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb rename to fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb diff --git a/fuel-build/f_ntp/testing/README b/fuel/build/f_ntp/testing/README similarity index 100% rename from fuel-build/f_ntp/testing/README rename to fuel/build/f_ntp/testing/README diff --git a/fuel-build/f_ntp/testing/fake_init.pp b/fuel/build/f_ntp/testing/fake_init.pp similarity index 100% rename from fuel-build/f_ntp/testing/fake_init.pp rename to fuel/build/f_ntp/testing/fake_init.pp diff --git a/fuel-build/f_example_control_bond/Makefile b/fuel/build/f_opnfv_puppet/Makefile similarity index 92% rename from fuel-build/f_example_control_bond/Makefile rename to fuel/build/f_opnfv_puppet/Makefile index 295fd0e..c311a2d 100644 --- a/fuel-build/f_example_control_bond/Makefile +++ b/fuel/build/f_opnfv_puppet/Makefile @@ -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_opnfv_puppet/README b/fuel/build/f_opnfv_puppet/README similarity index 100% rename from fuel-build/f_opnfv_puppet/README rename to fuel/build/f_opnfv_puppet/README diff --git a/fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp b/fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp similarity index 100% rename from fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp rename to fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/add_packages.pp diff --git a/fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp b/fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp similarity index 72% rename from fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp rename to fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp index b06997b..d48956b 100644 --- a/fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp +++ b/fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp @@ -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_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp b/fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp similarity index 100% rename from fuel-build/f_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp rename to fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/opncheck.pp diff --git a/fuel/build/f_osnaily/Makefile b/fuel/build/f_osnaily/Makefile new file mode 100644 index 0000000..c311a2d --- /dev/null +++ b/fuel/build/f_osnaily/Makefile @@ -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_osnaily/puppet/modules/osnailyfacter/examples/site.pp b/fuel/build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp similarity index 100% rename from fuel-build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp rename to fuel/build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp diff --git a/fuel-build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig b/fuel/build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig similarity index 100% rename from fuel-build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig rename to fuel/build/f_osnaily/puppet/modules/osnailyfacter/examples/site.pp.orig diff --git a/fuel/build/f_resolvconf/Makefile b/fuel/build/f_resolvconf/Makefile new file mode 100644 index 0000000..c311a2d --- /dev/null +++ b/fuel/build/f_resolvconf/Makefile @@ -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/README b/fuel/build/f_resolvconf/README similarity index 99% rename from fuel-build/f_resolvconf/README rename to fuel/build/f_resolvconf/README index 77c6e6a..5ff570f 100644 --- a/fuel-build/f_resolvconf/README +++ b/fuel/build/f_resolvconf/README @@ -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. + diff --git a/fuel-build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp b/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp similarity index 100% rename from fuel-build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp rename to fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp diff --git a/fuel-build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb b/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb similarity index 100% rename from fuel-build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb rename to fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb diff --git a/fuel-build/f_resolvconf/testing/README b/fuel/build/f_resolvconf/testing/README similarity index 100% rename from fuel-build/f_resolvconf/testing/README rename to fuel/build/f_resolvconf/testing/README diff --git a/fuel-build/f_resolvconf/testing/fake_init.pp b/fuel/build/f_resolvconf/testing/fake_init.pp similarity index 100% rename from fuel-build/f_resolvconf/testing/fake_init.pp rename to fuel/build/f_resolvconf/testing/fake_init.pp diff --git a/fuel-build/fuel-main_1.patch b/fuel/build/fuel-main_1.patch similarity index 99% rename from fuel-build/fuel-main_1.patch rename to fuel/build/fuel-main_1.patch index a982e80..24b25b2 100644 --- a/fuel-build/fuel-main_1.patch +++ b/fuel/build/fuel-main_1.patch @@ -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 diff --git a/fuel-build/fuel-main_2.patch b/fuel/build/fuel-main_2.patch similarity index 99% rename from fuel-build/fuel-main_2.patch rename to fuel/build/fuel-main_2.patch index 0cea655..72588cb 100644 --- a/fuel-build/fuel-main_2.patch +++ b/fuel/build/fuel-main_2.patch @@ -15,3 +15,4 @@ + rm $(SANDBOX_UBUNTU)/sbin/start.orig) echo "SANDBOX_UBUNTU_UP: done" endef + diff --git a/fuel-build/install/apt-ftparchive-deb.conf b/fuel/build/install/apt-ftparchive-deb.conf similarity index 100% rename from fuel-build/install/apt-ftparchive-deb.conf rename to fuel/build/install/apt-ftparchive-deb.conf diff --git a/fuel-build/install/apt-ftparchive-release.conf b/fuel/build/install/apt-ftparchive-release.conf similarity index 100% rename from fuel-build/install/apt-ftparchive-release.conf rename to fuel/build/install/apt-ftparchive-release.conf diff --git a/fuel-build/install/install.sh b/fuel/build/install/install.sh similarity index 100% rename from fuel-build/install/install.sh rename to fuel/build/install/install.sh diff --git a/fuel-build/install/uninstall.sh b/fuel/build/install/uninstall.sh similarity index 100% rename from fuel-build/install/uninstall.sh rename to fuel/build/install/uninstall.sh diff --git a/fuel/build/opendaylight/Makefile b/fuel/build/opendaylight/Makefile new file mode 100644 index 0000000..9c3d22d --- /dev/null +++ b/fuel/build/opendaylight/Makefile @@ -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 " +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 index 0000000..7aa392e --- /dev/null +++ b/fuel/build/opendaylight/README @@ -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 index 0000000..8ac5108 --- /dev/null +++ b/fuel/build/opendaylight/f_odl/Makefile @@ -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 index 0000000..077962d --- /dev/null +++ b/fuel/build/opendaylight/f_odl/README @@ -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_ + | (this file) / + | | + | 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 index 0000000..6165646 --- /dev/null +++ b/fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp @@ -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 index 0000000..2ef4976 --- /dev/null +++ b/fuel/build/opendaylight/f_odl/testing/README @@ -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 index 0000000..0600d2e --- /dev/null +++ b/fuel/build/opendaylight/f_odl/testing/fake_init.pp @@ -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 index 0000000..24974dc --- /dev/null +++ b/fuel/build/opendaylight/make-odl-deb.sh @@ -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 < -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 <> "$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 index 0000000..35a4442 --- /dev/null +++ b/fuel/build/opendaylight/odl_maven/settings.xml @@ -0,0 +1,46 @@ + + + + + opendaylight-release + + + + true + never + + + false + + opendaylight-mirror + opendaylight-mirror + http://nexus.opendaylight.org/content/groups/public/ + + + + + + opendaylight-snapshots + + + + false + + + true + + opendaylight-snapshot + opendaylight-snapshot + http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + + + + + + opendaylight-release + opendaylight-snapshots + + diff --git a/fuel-build/patch-packages/Makefile b/fuel/build/patch-packages/Makefile similarity index 91% rename from fuel-build/patch-packages/Makefile rename to fuel/build/patch-packages/Makefile index 56bbc89..9eb22fe 100644 --- a/fuel-build/patch-packages/Makefile +++ b/fuel/build/patch-packages/Makefile @@ -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) diff --git a/fuel-build/patch-packages/python-nova/Makefile b/fuel/build/patch-packages/python-nova/Makefile similarity index 96% rename from fuel-build/patch-packages/python-nova/Makefile rename to fuel/build/patch-packages/python-nova/Makefile index 17ef1e1..fbf5fb4 100644 --- a/fuel-build/patch-packages/python-nova/Makefile +++ b/fuel/build/patch-packages/python-nova/Makefile @@ -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 diff --git a/fuel-build/patch-packages/python-nova/nova-console.patch b/fuel/build/patch-packages/python-nova/nova-console.patch similarity index 99% rename from fuel-build/patch-packages/python-nova/nova-console.patch rename to fuel/build/patch-packages/python-nova/nova-console.patch index fbc0318..d5b3853 100644 --- a/fuel-build/patch-packages/python-nova/nova-console.patch +++ b/fuel/build/patch-packages/python-nova/nova-console.patch @@ -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: diff --git a/fuel-build/patch-packages/tools/correct_deps b/fuel/build/patch-packages/tools/correct_deps similarity index 100% rename from fuel-build/patch-packages/tools/correct_deps rename to fuel/build/patch-packages/tools/correct_deps diff --git a/fuel-build/patch-packages/tools/deb_pack b/fuel/build/patch-packages/tools/deb_pack similarity index 100% rename from fuel-build/patch-packages/tools/deb_pack rename to fuel/build/patch-packages/tools/deb_pack diff --git a/fuel-build/patch-packages/tools/deb_unpack b/fuel/build/patch-packages/tools/deb_unpack similarity index 100% rename from fuel-build/patch-packages/tools/deb_unpack rename to fuel/build/patch-packages/tools/deb_unpack diff --git a/fuel-build/patch-packages/tr_example/Makefile b/fuel/build/patch-packages/tr_example/Makefile similarity index 96% rename from fuel-build/patch-packages/tr_example/Makefile rename to fuel/build/patch-packages/tr_example/Makefile index 07ce28a..b7cab35 100644 --- a/fuel-build/patch-packages/tr_example/Makefile +++ b/fuel/build/patch-packages/tr_example/Makefile @@ -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 -- 2.16.6