Skip to content

Commit

Permalink
Added recipes for OpenvSwitch, OpenFlow, CRIU et.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
nysan committed Nov 28, 2012
1 parent 7bd4ae3 commit 75f5887
Show file tree
Hide file tree
Showing 48 changed files with 1,045 additions and 7,944 deletions.
50 changes: 44 additions & 6 deletions README
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
meta-virt
meta-cloud
===========

This layer provides support for building Xen, Libvirt, OpenvSwitch et.c.
and associated packages necessary for constructing virtuaized solutions for
Openembedded based distros.
This layer provides support for building KVM, Libvirt, OpenvSwitch et.c.
and associated packages necessary for constructing virtualized solutions for
Openembedded based distros. End goal is some neato OpenStack rootfs:es,
hopefully without too much manual work after booting the images to get a
minimal setup of OpenStack.

This layer is maintained by ENEA Software AB
Bit's and pieces taken from the meta-xen layer.

This layer is far from "fully operational", and if you want to contribute,
see below:
When sending single patches, please using something like:
'git send-email -1 --to david.nystrom@enea.com --cc=yocto@yoctoproject.org --subject-prefix=meta-virt][PATCH'
'git send-email -1 --to david.nystrom@enea.com --cc=yocto@yoctoproject.org --subject-prefix=meta-cloud][PATCH'


Tested on x86-64:
--
Build Configuration:
BB_VERSION = "1.16.0"
TARGET_ARCH = "x86_64"
TARGET_OS = "linux"
MACHINE = "qemux86-64"
DISTRO = "poky"
DISTRO_VERSION = "1.3"
TUNE_FEATURES = "m64"
TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp = "danny:27af23e65f63b41962a7cfddba9e9372d5212396"
meta-oe = "danny:f8ad0760abf8055bac27036853c56f56b40a36c7"
meta-cloud = "master:296a793b2eab57275a3e85424da913483c43e2a4"


Layer dependencies:
--
meta-oe:
git clone -b danny git://git.openembedded.org/meta-openembedded
BBFILE_PRIORITY_openembedded-layer = "4"

meta & meta-yocto
git clone -b danny git://git.yoctoproject.org/poky
BBFILE_PRIORITY_core = "5"

0. Modify BBFILE_PRIORITY of meta-openembedded to above.
1. Add: 'PREFERRED_VERSION_libnl = "3%"' to your local.conf.
2. Add: 'PREFERRED_PROVIDER_jpeg = "jpeg"' to your local.conf
3. Add: 'PREFERRED_PROVIDER_jpeg-native = "jpeg-native"' to your local.conf
4. bitbake cloud-image-controller
19 changes: 19 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The end goal with this layer is to create two separate images,
and OpenStack controller image, and an OpenStack compute image.

Final format is TBD, but for starters a bootable usb stick image will
suffice. The main goal is to have a reasonably quick setup of an
OpenEmbedded based cloud solution.

On the recipe TODO list:

* nova
* glance
* swift
* euca2ools
* rabbitMQ
* keystone
* quantum

Bugfix todo list:
* dmtcp recipe not functional
10 changes: 10 additions & 0 deletions conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
BBFILES += "${LAYERDIR}/images/*.bb ${LAYERDIR}/images/*.bbappend"

BBFILE_COLLECTIONS += "cloud-layer"
BBFILE_PATTERN_cloud-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_cloud-layer = "7"
14 changes: 14 additions & 0 deletions images/cloud-image-compute.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
IMAGE_FEATURES += "ssh-server-openssh"
EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks"

IMAGE_INSTALL = "\
${CORE_IMAGE_BASE_INSTALL} \
packagegroup-core-basic \
openvswitch \
libvirt \
openflow \
"

inherit core-image

IMAGE_FSTYPES = "tar.gz"
27 changes: 27 additions & 0 deletions images/cloud-image-controller.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
IMAGE_FEATURES += "ssh-server-openssh package-management"
EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks"

IMAGE_INSTALL = "\
${CORE_IMAGE_BASE_INSTALL} \
${ROOTFS_PKGMANAGE_BOOTSTRAP} \
packagegroup-core-basic \
openvswitch \
openvswitch-controller \
openvswitch-switch \
openvswitch-brcompat \
libvirt \
libvirt-libvirtd \
libvirt-python \
libvirt-virsh \
openflow \
qemu \
kernel-modules \
tcpdump \
mysql5 \
dhcp-client \
grub \
"

inherit core-image

IMAGE_FSTYPES += "tar.gz"
29 changes: 29 additions & 0 deletions recipes-containers/criu/criu_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
SUMMARY = "CRIU"
DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux operating system. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space"
HOMEPAGE = "http://criu.org"
SECTION = "console/tools"
LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=12920dfe6b35a0758155f0e62878b366"

SRCREV = "d81c9a4618db2f618bdb8e207b7f0fec631c7142"
PR = "r0"
PV = "0.2+git${SRCPV}"

SRC_URI = "git://git.criu.org/crtools.git;protocol=git \
file://0001-Fixed-hardcoding.patch"

DEPENDS = "protobuf-c-native protobuf-c"

S = "${WORKDIR}/git"

EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} WERROR=0"

do_compile () {
oe_runmake
}

do_install () {
mkdir -p ${D}/${bindir}
install -m 755 ${S}/crtools ${D}/${bindir}/crtools
}
47 changes: 47 additions & 0 deletions recipes-containers/criu/files/0001-Fixed-hardcoding.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 32c6c037a6de0a0972e16949ebb64ffebb5b7bcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Nystr=C3=B6m?= <david.nystrom@enea.com>
Date: Wed, 28 Nov 2012 15:07:27 +0100
Subject: [PATCH] Fixed hardcoding

---
Makefile.inc | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 722cbfc..3ae693e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -11,18 +11,18 @@ else
endif
export E Q

-FIND := find
-CSCOPE := cscope
-TAGS := ctags
-RM := rm
-LD := ld
-HEXDUMP := hexdump
-CC := gcc
-ECHO := echo
-NM := nm
-AWK := awk
-SH := sh
-MAKE := make
+FIND ?= find
+CSCOPE ?= cscope
+TAGS ?= ctags
+RM ?= rm
+LD ?= ld
+HEXDUMP ?= hexdump
+CC ?= gcc
+ECHO ?= echo
+NM ?= nm
+AWK ?= awk
+SH ?= sh
+MAKE ?= make

# Additional ARCH settings for x86
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
--
1.7.9.5

19 changes: 19 additions & 0 deletions recipes-containers/criu/files/disable_tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff -Naur protobuf-c-0.15.old/src/Makefile.am protobuf-c-0.15/src/Makefile.am
--- protobuf-c-0.15.old/src/Makefile.am 2012-11-28 14:59:57.845251943 +0100
+++ protobuf-c-0.15/src/Makefile.am 2012-11-28 15:00:23.549252632 +0100
@@ -1,5 +1,5 @@
if BUILD_PROTOC_C
-SUBDIRS = . test
+
bin_PROGRAMS = protoc-c
protoc_c_SOURCES = \
google/protobuf/compiler/c/c_service.cc \
@@ -23,7 +23,7 @@
lib_LTLIBRARIES = libprotobuf-c.la
protobufcincludedir = $(includedir)/google/protobuf-c

-EXTRA_DIST = CMakeLists.txt test/CMakeLists.txt
+EXTRA_DIST = CMakeLists.txt

libprotobuf_c_la_SOURCES = \
google/protobuf-c/protobuf-c-dispatch.c \
20 changes: 20 additions & 0 deletions recipes-containers/criu/protobuf-c_0.15.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SUMMARY = "protobuf-c"
DESCRIPTION = "This package provides a code generator and runtime libraries to use Protocol Buffers from pure C"
HOMEPAGE = "http://code.google.com/p/protobuf-c/"
SECTION = "console/tools"
LICENSE = "Apache-2.0"

LIC_FILES_CHKSUM = "file://src/google/protobuf-c/protobuf-c.c;endline=33;md5=333140fae7cf8a38dc5f980ddb63704b"

PR = "r0"

DEPENDS = "protobuf"

SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8"
SRC_URI[sha256sum] = "8fcb538e13a5431c46168fc8f2e6ad2574e2db9b684c0c72b066e24f010a0036"
SRC_URI = "http://protobuf-c.googlecode.com/files/protobuf-c-${PV}.tar.gz \
file://disable_tests.patch"

inherit autotools

BBCLASSEXTEND = "native nativesdk"
18 changes: 18 additions & 0 deletions recipes-containers/criu/protobuf_2.4.1.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SUMMARY = "protobuf"
DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats."
HOMEPAGE = "http://code.google.com/p/protobuf/"
SECTION = "console/tools"
LICENSE = "BSD-3-Clause"

LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514"

PR = "r0"

SRC_URI[md5sum] = "dc84e9912ea768baa1976cb7bbcea7b5"
SRC_URI[sha256sum] = "eac6969b617f397247e805267da2b0db3ff9e5a9163b123503a192fbb5776567"
SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz"

EXTRA_OECONF += " --with-protoc=echo"
inherit autotools

BBCLASSEXTEND = "native nativesdk"
24 changes: 24 additions & 0 deletions recipes-containers/dmtcp/dmtcp_1.2.6.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SUMMARY = "DMTCP"
DESCRIPTION = "DMTCP is a tool to transparently checkpoint the state of multiple simultaneous applications, including multi-threaded and distributed applications. It operates directly on the user binary executable, without any Linux kernel modules or other kernel modifications"
HOMEPAGE = "http://dmtcp.sourceforge.net/"
SECTION = "console/utils"
LICENSE = "LGPLv1"

LIC_FILES_CHKSUM = "file://COPYING;md5=c0411eef53a349b26014aaef2944ea04"
#DEPENDS = "python"

PR = "r0"
inherit autotools

SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/dmtcp/dmtcp-${PV}.tar.gz \
file://automake_fix.patch \
file://automake_fix2.patch \
"
SRC_URI[md5sum] = "c433f7f08ca777cd8ab49967e69b4601"
SRC_URI[sha256sum] = "ede0ef3544f08befe2b3df45d9087b4bfa02d52074cf805181c857f5de9fbfca"

S = "${WORKDIR}/${PN}-${PV}"




13 changes: 13 additions & 0 deletions recipes-containers/dmtcp/files/automake_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff -Naur dmtcp-1.2.6.old/dmtcp/src/Makefile.am dmtcp-1.2.6/dmtcp/src/Makefile.am
--- dmtcp-1.2.6.old/dmtcp/src/Makefile.am 2012-11-27 10:29:17.515536634 +0100
+++ dmtcp-1.2.6/dmtcp/src/Makefile.am 2012-11-27 10:30:15.211538179 +0100
@@ -21,7 +21,8 @@
libjalib.a
bin_PROGRAMS = dmtcp_checkpoint dmtcp_command dmtcp_coordinator \
dmtcp_restart dmtcp_inspector dmtcp_nocheckpoint
-pkglib_PROGRAMS = dmtcphijack.so libdmtcpaware.so.1.0.0
+programfilesdir = $(pkglibdir)
+programfiles_PROGRAMS = dmtcphijack.so libdmtcpaware.so.1.0.0
include_HEADERS = dmtcpaware.h
lib_LIBRARIES = libdmtcpaware.a

10 changes: 10 additions & 0 deletions recipes-containers/dmtcp/files/automake_fix2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff -Naur dmtcp-1.2.6.old/Makefile.in dmtcp-1.2.6/Makefile.in
--- dmtcp-1.2.6.old/Makefile.in 2012-11-28 13:12:13.925078845 +0100
+++ dmtcp-1.2.6/Makefile.in 2012-11-28 13:12:40.213079549 +0100
@@ -303,3 +303,5 @@
display-build-env display-release display-config build \
mtcp dmtcp plugin \
clean distclean bin dmtcpaware examples dmtcp_noexamples
+
+am--refresh:
\ No newline at end of file
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
PRIORITY = "optional"
PR = "r1"
PR = "r0"
DEPENDS = "libxml2 libcap"
RDEPENDS_${PN} = " \
rsync \
Expand All @@ -21,15 +21,13 @@ RDEPENDS_${PN} = " \

SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \
file://noldconfig.patch \
file://libmounts.patch \
"

SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29"
SRC_URI[sha256sum] = "32bf83902c07387646c55de440d6d12cf61bd54c97417109c2d1ac47d17cb911"
SRC_URI[md5sum] = "7304fa57146ce687f749b5df876bb20d"
SRC_URI[sha256sum] = "eac833730b94e423d4bef6834bc4a716437d2abd6ab8b24334c506aaaa08692c"

S = "${WORKDIR}/${PN}-${PV}"

EXTRA_OECONF = "--disable-doc --disable-rpath"
EXTRA_OECONF = "--disable-doc --disable-rpath --disable-apparmor"

inherit autotools

Expand Down
37 changes: 0 additions & 37 deletions recipes-extended/dev86/dev86_0.16.18.bb

This file was deleted.

Loading

0 comments on commit 75f5887

Please sign in to comment.