aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opennebula
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2013-06-11 20:23:38 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2013-06-11 20:23:38 +0000
commite9a1b8eec6a8c001bb8c5e84634210c28cf968f3 (patch)
tree4c59ce921a67723fcbc81022881b4e36394b99de /testing/opennebula
parent81370338320d126b7fed9422b2a623f887ecbb17 (diff)
downloadaports-e9a1b8eec6a8c001bb8c5e84634210c28cf968f3.tar.bz2
aports-e9a1b8eec6a8c001bb8c5e84634210c28cf968f3.tar.xz
testing/opennebula: new aport
Diffstat (limited to 'testing/opennebula')
-rw-r--r--testing/opennebula/APKBUILD91
-rw-r--r--testing/opennebula/opennebula.confd23
-rw-r--r--testing/opennebula/opennebula.initd44
3 files changed, 158 insertions, 0 deletions
diff --git a/testing/opennebula/APKBUILD b/testing/opennebula/APKBUILD
new file mode 100644
index 0000000000..ae520f5153
--- /dev/null
+++ b/testing/opennebula/APKBUILD
@@ -0,0 +1,91 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=opennebula
+pkgver=4.0.1
+pkgrel=0
+pkgdesc="Virtual management infrastructure as a service (IaaS) toolkit for cloud computing"
+url="http://opennebula.org"
+arch="all"
+license="Apache"
+depends="ruby-sqlite ruby-nokogiri ruby-crack ruby-thin ruby-json ruby-sequel
+ ruby-mysql2 ruby-rack ruby-sinatra ruby-thin ruby-net-ldap ruby-uuidtools
+ ruby-curb ruby-amazon-ec2"
+depends_dev="xmlrpc-c-dev sqlite-dev openssl-dev libxml2-dev curl-dev"
+makedepends="$depends_dev scons ruby ruby-gems bash"
+install=""
+pkgusers=oneadmin
+pkggroups=oneadmin
+subpackages="$pkgname-dev $pkgname-doc $pkgname-sunstone $pkgname-ozones
+ $pkgname-clients $pkgname-node-kvm:node_kvm"
+source="http://dev.opennebula.org/packages/opennebula-$pkgver/opennebula-$pkgver.tar.gz
+ ${pkgname}.initd ${pkgname}.confd"
+
+_builddir="$srcdir"/opennebula-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ scons
+}
+
+package() {
+ cd "$_builddir"
+ DESTDIR="$pkgdir" ./install.sh \
+ -u oneadmin -g oneadmin || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+sunstone() {
+ pkgdesc="OpenNubula webinterface"
+ depends="ruby-json ruby-rack ruby-sinatra ruby-thin ruby-sequel ruby-nokogiri"
+ arch="noarch"
+ cd "$_builddir"
+ DESTDIR="$subpkgdir" ./install.sh \
+ -s -u oneadmin -g oneadmin || return 1
+}
+
+ozones() {
+ pkgdesc="OpenNebula Zones (OZones)"
+ depends="ruby-json ruby-sequel ruby-nokogiri ruby-sqlite ruby-mysql2 ruby-nokogiri"
+ arch="noarch"
+ cd "$_builddir"
+ DESTDIR="$subpkgdir" ./install.sh \
+ -o -u oneadmin -g oneadmin || return 1
+}
+
+clients() {
+ pkgdesc="Client utilities: OpenNebula cli, occi and ec2 client files"
+ arch="noarch"
+ cd "$_builddir"
+ DESTDIR="$subpkgdir" ./install.sh \
+ -c -u oneadmin -g oneadmin || return 1
+}
+
+node_kvm() {
+ pkgdesc="Node dependecies for OpenNebula"
+ arch="noarch"
+ depends="ruby openssh libvirt qemu-x86_64 libvirt-qemu"
+ mkdir -p "$subpkgdir"
+}
+
+md5sums="c45537dfb689a357e7300dc5ed996d75 opennebula-4.0.1.tar.gz
+ffd98ee7961fd3c7d076ff6da4e33d8c opennebula.initd
+f213d16b6b90115000950618a0640b99 opennebula.confd"
+sha256sums="258cb698b732454534c9729d6ee1abe3f43aa480ce5c7ccef477a198f832bf74 opennebula-4.0.1.tar.gz
+ed875ccf38c4b2a2ed96b110d00cca7d50d18cee9893e7da88fc0e7704981704 opennebula.initd
+cd358620bb8e76fd85e2f5b86d517569c12f0d44ec3440ef80f3a45a665f30db opennebula.confd"
+sha512sums="64ddf4b814e2d37aba9f6425fb7668dbcb6eaff33d2f609601d3738c2f5183a631ab90ed25c41b549b92e7f28d4920298a65d222ef7e8a56d27190a9738fa149 opennebula-4.0.1.tar.gz
+e9c2b4b2f7516277d8bd0ec8ce12bfc9d4a172b631fed7b0f977775467eb689e0daa8f487da9c01621d0381f68f8fefa6571002dc43ce8a6129b6a5ff75c74b5 opennebula.initd
+77cd2fb0108a5a6665edc0c3e392511e93abf22e31b7ea451a241288572b9b79a997975bb62214dd02be49b406ef42671bacb8a98e6b1aa20dc045df7c2e82fc opennebula.confd"
diff --git a/testing/opennebula/opennebula.confd b/testing/opennebula/opennebula.confd
new file mode 100644
index 0000000000..3b15e61bf8
--- /dev/null
+++ b/testing/opennebula/opennebula.confd
@@ -0,0 +1,23 @@
+
+# opennebula user
+USER="oneadmin"
+GROUP="oneadmin"
+
+# options for oned
+ONED_OPTIONS=""
+
+# scheduler pid file
+SCHED_PIDFILE="/var/run/one/sched.pid"
+
+# The following command line arguments are supported by mm_shed:
+# [-p port] to connect to oned - default: 2633
+# [-t timer] seconds between two scheduling actions - default: 30
+# [-m machines limit] max number of VMs managed in each scheduling action
+# - default: 300
+# [-d dispatch limit] max number of VMs dispatched in each scheduling action
+# - default: 30
+# [-h host dispatch] max number of VMs dispatched to a given host in each
+# scheduling action - default: 1
+SCHED_OPTIONS=""
+
+
diff --git a/testing/opennebula/opennebula.initd b/testing/opennebula/opennebula.initd
new file mode 100644
index 0000000000..d80d3753d9
--- /dev/null
+++ b/testing/opennebula/opennebula.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ after mysql
+}
+
+start() {
+ ebegin "Starting OpenNebula daemon"
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/oned \
+ --user ${USER}:${GROUP} \
+ -- ${ONED_OPTIONS}
+ eend $?
+
+ ebegin "Starting OpenNebula scheduler"
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/mm_sched \
+ --pidfile "${SCHED_PIDFILE}" \
+ --make-pidfile \
+ --background \
+ --user ${USER}:${GROUP} \
+ -- ${SCHED_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenNebula daemon"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/oned
+ eend $?
+
+ ebegin "Stopping OpenNebula scheduler"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/mm_sched \
+ --pidfile "${SCHED_PIDFILE}"
+ eend $?
+}