From 6cb518c68eb136ad448e96716ef8b1348440949f Mon Sep 17 00:00:00 2001 From: Jonas Bjurel Date: Mon, 2 Mar 2015 22:46:45 +0100 Subject: 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/opendaylight/Makefile | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 fuel/build/opendaylight/Makefile (limited to 'fuel/build/opendaylight/Makefile') 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: -- cgit 1.2.3-korg