From 7957a97c3476f3e2f9c29d22c91d7c117e1df38c Mon Sep 17 00:00:00 2001 From: Jonas Bjurel Date: Wed, 19 Aug 2015 11:58:53 +0200 Subject: [PATCH] Removed opendaylight build capabilities as a preparation toward Arno SR1 Note: The local branch name "removedocker" is missleading! Change-Id: I4086bb3f47f720407a6356796a9724367cca2898 Signed-off-by: Jonas Bjurel --- fuel/build/Makefile | 8 +- fuel/build/docker/ubuntu-builder/Dockerfile | 3 - fuel/build/docker/ubuntu-builder/install.sh | 25 -- fuel/build/opendaylight/Makefile | 102 ------- fuel/build/opendaylight/README | 52 ---- fuel/build/opendaylight/f_odl/Makefile | 49 ---- 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 --- 12 files changed, 1 insertion(+), 685 deletions(-) delete mode 100755 fuel/build/docker/ubuntu-builder/install.sh delete mode 100644 fuel/build/opendaylight/Makefile delete mode 100644 fuel/build/opendaylight/README delete mode 100644 fuel/build/opendaylight/f_odl/Makefile delete mode 100644 fuel/build/opendaylight/f_odl/README delete mode 100644 fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp delete mode 100644 fuel/build/opendaylight/f_odl/testing/README delete mode 100644 fuel/build/opendaylight/f_odl/testing/fake_init.pp delete mode 100755 fuel/build/opendaylight/make-odl-deb.sh delete mode 100644 fuel/build/opendaylight/odl_maven/settings.xml diff --git a/fuel/build/Makefile b/fuel/build/Makefile index d3afe83..284f519 100644 --- a/fuel/build/Makefile +++ b/fuel/build/Makefile @@ -43,7 +43,6 @@ SUBDIRS += f_l23network SUBDIRS += f_resolvconf SUBDIRS += f_ntp SUBDIRS += f_odl_docker -#SUBDIRS += f_odl # f_example is only an example of how to generate a .deb package and # should not be enabled in official builds. @@ -128,10 +127,6 @@ patch-packages: 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 @@ -146,7 +141,6 @@ clean: clean-cache prepare $(SUBCLEAN) @rm -f *.iso @rm -Rf release @rm -Rf newiso - @rm -f f_odl @rm -f $(NEWISO) @rm -f $(BUILD_BASE)/.versions @@ -156,6 +150,6 @@ $(SUBCLEAN): %.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 +iso: prepare build-clean $(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/docker/ubuntu-builder/Dockerfile b/fuel/build/docker/ubuntu-builder/Dockerfile index b4e1b4e..76fe401 100644 --- a/fuel/build/docker/ubuntu-builder/Dockerfile +++ b/fuel/build/docker/ubuntu-builder/Dockerfile @@ -24,8 +24,5 @@ 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/install.sh b/fuel/build/docker/ubuntu-builder/install.sh deleted file mode 100755 index df1af72..0000000 --- a/fuel/build/docker/ubuntu-builder/install.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/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/opendaylight/Makefile b/fuel/build/opendaylight/Makefile deleted file mode 100644 index bd2eeb5..0000000 --- a/fuel/build/opendaylight/Makefile +++ /dev/null @@ -1,102 +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 -############################################################################## - -############################################################################ -# BEGIN of variables to customize -# -SHELL = /bin/bash - - -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 - -############################################################################ -# BEGIN of Include definitions -# -include ../config.mk -# -# END Include definitions -############################################################################# - -.PHONY: setup -setup: - rm -f "$(BUILD_BASE)/f_odl" - ln -s "$(shell readlink -e $(BUILD_DIR))/f_odl" "$(shell readlink -e $(BUILD_BASE))/f_odl" - -.PHONY: validate-cache -validate-cache: - @REMOTE_ID=$(shell git ls-remote $(ODL_MAIN_REPO) $(ODL_MAIN_TAG)^{} | awk '{print $$(NF-1)}'); \ - if [ -z $$REMOTE_ID ] || [ $$REMOTE_ID = " " ]; \ - then \ - REMOTE_ID=$(shell git ls-remote $(ODL_MAIN_REPO) $(ODL_MAIN_TAG) | awk '{print $$(NF-1)}'); \ - fi; \ - if [ $$REMOTE_ID != $(shell cat $(VERSION_FILE) | grep odl | awk '{print $$NF}') ]; \ - then \ - echo "Cache does not match upstream OpenDaylight, cache must be rebuilt!"; \ - exit 1; \ - 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; - - @if [ "$(UNIT_TEST)" = "FALSE" ]; then\ - echo "Building ODL without unit test";\ - cd /tmp/controller &&\ - git checkout $(ODL_MAIN_TAG) &&\ - mvn -D maven.test.skip=true -gs $(MAVEN_SPEC) clean install;\ - else\ - echo "Building ODL with unit test";\ - cd /tmp/controller &&\ - git checkout $(ODL_MAIN_TAG) &&\ - mvn -gs $(MAVEN_SPEC) clean install;\ - fi; - - @echo "odl" `git -C /tmp/controller show | grep commit | head -1 | cut -d " " -f2` >> $(VERSION_FILE) - @./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 deleted file mode 100644 index 7aa392e..0000000 --- a/fuel/build/opendaylight/README +++ /dev/null @@ -1,52 +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 -############################################################################## - -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 deleted file mode 100644 index f7ebd3e..0000000 --- a/fuel/build/opendaylight/f_odl/Makefile +++ /dev/null @@ -1,49 +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 -############################################################################## - -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 package/$(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: validate-cache -validate-cache: - @echo "No cache validation schema available for $(shell pwd)" - @echo "Continuing ..." - -.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 deleted file mode 100644 index 077962d..0000000 --- a/fuel/build/opendaylight/f_odl/README +++ /dev/null @@ -1,49 +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 -############################################################################## - -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 deleted file mode 100644 index 6165646..0000000 --- a/fuel/build/opendaylight/f_odl/puppet/modules/opnfv/manifests/odl.pp +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 2ef4976..0000000 --- a/fuel/build/opendaylight/f_odl/testing/README +++ /dev/null @@ -1,12 +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 -############################################################################## - -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 deleted file mode 100644 index 0600d2e..0000000 --- a/fuel/build/opendaylight/f_odl/testing/fake_init.pp +++ /dev/null @@ -1,13 +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 -############################################################################## - -$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 deleted file mode 100755 index 5222087..0000000 --- a/fuel/build/opendaylight/make-odl-deb.sh +++ /dev/null @@ -1,314 +0,0 @@ -#!/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 deleted file mode 100644 index 35a4442..0000000 --- a/fuel/build/opendaylight/odl_maven/settings.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - 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 - - -- 2.16.6