diff options
author | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2015-03-02 22:46:45 +0100 |
---|---|---|
committer | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2015-03-09 23:00:13 +0100 |
commit | 6cb518c68eb136ad448e96716ef8b1348440949f (patch) | |
tree | 757551a8efdc4e85e19fc1b0f27555825580e5c9 /fuel/build/f_example_packadd | |
parent | 1e106bbaca2780c10bd02b4e5fa3702d36acdf39 (diff) |
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 <jonas.bjurel@ericsson.com>
Diffstat (limited to 'fuel/build/f_example_packadd')
10 files changed, 132 insertions, 0 deletions
diff --git a/fuel/build/f_example_packadd/Makefile b/fuel/build/f_example_packadd/Makefile new file mode 100644 index 0000000..eadc83f --- /dev/null +++ b/fuel/build/f_example_packadd/Makefile @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) +PACKAGE := foobar +VERSION := 1.0-1 +DEB_NAME := $(PACKAGE)_$(VERSION).deb + +.PHONY: all +all: release/pool/main/$(DEB_NAME) + +release/pool/main/$(DEB_NAME): + @mkdir -p tmp/src + @mkdir -p release/pool/main + @cp -r $(DEB_NAME) tmp/src + @gzip -9 tmp/src/$(DEB_NAME)/usr/share/doc/$(PACKAGE)/changelog.Debian + @fakeroot dpkg-deb --build tmp/src/$(DEB_NAME) + @lintian tmp/src/$(DEB_NAME) + @cp tmp/src/$(DEB_NAME) release/pool/main + +.PHONY: clean +clean: + @rm -rf tmp + @rm -rf release + @rm -f ../release/packages/ubuntu/pool/main/$(DEB_NAME) + + +.PHONY: release +release:release/pool/main/$(DEB_NAME) + @cp release/pool/main/$(DEB_NAME) $(DEB_DEST) + @cp -Rvp puppet/modules/* $(PUPPET_DEST) diff --git a/fuel/build/f_example_packadd/README b/fuel/build/f_example_packadd/README new file mode 100644 index 0000000..55fa7c1 --- /dev/null +++ b/fuel/build/f_example_packadd/README @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +This is an example of a an addition of an arbitrary debian package: foobar +It adds the debian package foobar_1.0-1 to the fuel .iso image and deploys it +to the controllers and the computes. + +The f_example_packadd has the following structure: +. ++--------+----------+-----------+------------+ + | | | | + puppet/ Makefile README foobar_1.0-1/ + | (this file) (deb pack) + | + | + modules/ + | + | + | + opnfv/ + | + | + | + manifests/ + | + | + | + foobar.pp + +Makefile: +Invoked by the git root Makefile, based on the foobar_1.0-1 deb pack artifacts, and the pupet manifests, it builds a deb package +and adds it together with the manifest to a fuel build artifact directory, such that it eventually gets built into the new fuel .iso + +foobar_1.0-1: +Contains arbitrary debian package artifacts + +foobar.pp: +Controls the installation and configuration of foobar + +To activate this example feature, add "SUBDIRS += f_example_packadd" in the git root Makefile. diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles new file mode 100644 index 0000000..bad6a0e --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/foobar/foobar.conf diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control new file mode 100644 index 0000000..f3f0eb6 --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/control @@ -0,0 +1,10 @@ +Package: foobar +Version: 1.0-1 +Section: utils +Priority: optional +Architecture: amd64 +Depends: python2.7 +Maintainer: Main Tainer <maintainer@somwhere.org> +Description: foo bar daemon + This is a daemon for the Foobar service. + Foo is bar! diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst new file mode 100755 index 0000000..f48f260 --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/bash -e +date diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf b/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf new file mode 100644 index 0000000..e0eee5c --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/etc/foobar/foobar.conf @@ -0,0 +1,2 @@ +# Foobar config file +foo=bar diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar b/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar new file mode 100755 index 0000000..c9651a4 --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/usr/bin/foobar @@ -0,0 +1,2 @@ +#!/bin/bash +echo Hello from the foobar package diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian new file mode 100644 index 0000000..fe776f3 --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/changelog.Debian @@ -0,0 +1,5 @@ +foobar (1.0-1) precise-proposed; urgency=low + + * Genesis + + -- Main Tainer <maintainer@somewhere.org> Tue, 23 Sep 2014 11:13:27 +0200 diff --git a/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright new file mode 100644 index 0000000..4279ce4 --- /dev/null +++ b/fuel/build/f_example_packadd/foobar_1.0-1/usr/share/doc/foobar/copyright @@ -0,0 +1,18 @@ +foobar - a test daemon +Copyright (C) 2014 Main Tainer + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License with +your Debian GNU system, in /usr/share/common-licenses/GPL, or with the +Debian GNU gnupg source package as the file COPYING. If not, see +<http://www.gnu.org/licenses/> or write to the Free Software Foundation, +Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp b/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp new file mode 100644 index 0000000..c6219ba --- /dev/null +++ b/fuel/build/f_example_packadd/puppet/modules/opnfv/manifests/foobar.pp @@ -0,0 +1,7 @@ +class opnfv::foobar { + if $::osfamily == 'Debian' { + package { 'foobar': + ensure => installed, + } + } +} |