Commit 962aff92 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge remote-tracking branch 'origin/master' into slapos-testing

Conflicts:
	setup.py
parents 7845f117 73b5e348
Changes Changes
======= =======
0.59 (Unreleased) 0.65 (Unrelease)
----------------
* No change yet.
0.64.2 (2012-08.28)
-------------------
* Specify description on gitinit recipe. [Antoine Catton]
0.64.1 (2012-08-28)
-------------------
* Fix: minor fix on downloader recipe in order to allow cross-device renaming.
[Antoine Catton]
0.64 (2012-08-27)
----------------
* Fix: remove "template" recipe which was collinding with slapos.recipe.template.
[Antoine Catton]
0.63 (2012-08-22)
----------------
* Add the ability to run command line in shellinabox. [Antoine Catton]
* Add the ability to run shellinabox as root. (for LXC purpose) [Antoine Catton]
* Add "uuid" recipe. [Antoine Catton]
* Add "downloader" recipe. [Antoine Catton]
0.62 (2012-08-21)
----------------- -----------------
* Add "wrapper" recipe. [Antoine Catton]
* Add "gitinit" recipe. [Antoine Catton]
* librecipe.execute code clean up and factorization. [Antoine Catton]
* Add "template" recipe. [Antoine Catton]
0.61 (2012-08-17)
-----------------
* Add "debug" option for slaprunner. [Alain Takoudjou]
0.60 (2012-08-13)
-----------------
* New recipe: requestoptional, like "request", but won't fail if instance is
not ready. [Cedric de Saint Martin]
* Update zabbix to return strings as parameters. [Cedric de Saint Martin]
* Add check in check_url_promise in case of empty URL. [Cedric de Saint
Martin]
* Upgrade slaprunner recipe to be compatible with newest version. [Alain
Takoudjou]
0.59 (2012-07-12)
-----------------
* Zabbix: add temperature monitoring using custom commands.
0.58 (2012-07-06) 0.58 (2012-07-06)
----------------- -----------------
...@@ -86,7 +141,7 @@ Changes ...@@ -86,7 +141,7 @@ Changes
[Cedric de Saint Martin] [Cedric de Saint Martin]
* Apache Frontend: listens to plain http port as well to redirect to https. * Apache Frontend: listens to plain http port as well to redirect to https.
[Cedric de Saint Martin] [Cedric de Saint Martin]
0.49 (2012-05-10) 0.49 (2012-05-10)
----------------- -----------------
...@@ -152,7 +207,7 @@ Changes ...@@ -152,7 +207,7 @@ Changes
----------------- -----------------
* apache_frontend initial release. [Cedric de Saint Martin] * apache_frontend initial release. [Cedric de Saint Martin]
0.39 (2012-02-20) 0.39 (2012-02-20)
----------------- -----------------
...@@ -205,7 +260,7 @@ Changes ...@@ -205,7 +260,7 @@ Changes
0.32 (2011-10-28) 0.32 (2011-10-28)
----------------- -----------------
* LAMP : Recipe can now call lampconfigure from slapos.toolbox which will * LAMP : Recipe can now call lampconfigure from slapos.toolbox which will
configure PHP application instance when needed. [Alain Takoudjou Kamdem] configure PHP application instance when needed. [Alain Takoudjou Kamdem]
0.31 (2011-10-16) 0.31 (2011-10-16)
......
[buildout]
parts = attr
[attr]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.igh.cnrs.fr/pub/nongnu/attr/attr-2.4.46.src.tar.gz
md5sum = db557c17fdfa4f785333ecda08654010
configure-options =
--enable-shared=yes
--enable-gettext=no
make-targets = install install-lib install-dev
...@@ -7,8 +7,8 @@ parts = ...@@ -7,8 +7,8 @@ parts =
[autoconf] [autoconf]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
md5sum = c3b5247592ce694f7097873aa07d66fe md5sum = 82d05e03b93e45f5a39b828dc9c6c29b
environment = environment =
M4=${m4:location}/bin/m4 M4=${m4:location}/bin/m4
PATH=${perl:location}/bin:%(PATH)s PATH=${perl:location}/bin:%(PATH)s
[buildout] [buildout]
extends =
../patch/buildout.cfg
# https://bugs.busybox.net/show_bug.cgi?id=4838 parts = busybox
[busybox-1.19.3.packed_hack.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = faa5ce46be086763202d7ca24601fbde
filename = busybox-1.19.3.packed_hack.patch
download-only = true
[busybox] [busybox]
recipe = slapos.recipe.build recipe = slapos.recipe.build
url = http://busybox.net/downloads/busybox-1.19.4.tar.bz2 url = http://git.busybox.net/busybox/snapshot/busybox-1_20_1.tar.gz
md5sum = 9c0cae5a0379228e7b55e5b29528df8e md5sum = 15758fc37ae8051d6def1b8afb691821
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${busybox-1.19.3.packed_hack.patch:location}/${busybox-1.19.3.packed_hack.patch:filename}
script = script =
extract_dir = self.extract(self.download(%(url)r, %(md5sum)r)) extract_dir = self.extract(self.download(%(url)r, %(md5sum)r))
workdir = guessworkdir(extract_dir) workdir = guessworkdir(extract_dir)
self.applyPatchList(self.options.get('patches'), self.options.get('patch-options'), self.options.get('patch-binary'), workdir)
call(['patch', 'defconfig'], cwd=workdir, env=env)
self.logger.info("Creating default configuration") self.logger.info("Creating default configuration")
call(['make', 'defconfig'], cwd=workdir, env=env) call(['make', 'defconfig'], cwd=workdir, env=env)
self.logger.info("Building") self.logger.info("Building")
......
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c
index 2a426db..35f44ac 100644
--- a/miscutils/ubi_tools.c
+++ b/miscutils/ubi_tools.c
@@ -60,6 +60,16 @@
//kbuild:lib-$(CONFIG_UBIUPDATEVOL) += ubi_tools.o
#include "libbb.h"
+#if 1
+// __packed hack for broken kernel headers ubi-user.h
+// See: https://lkml.org/lkml/2011/6/22/25
+// Once ubi-user.h is correctly installed without "__packed", or kernel
+// guys correct this another way (with a compiler header??), this can
+// go away.
+# ifndef __packed
+# define __packed __attribute__((packed))
+# endif // ndef __packed
+#endif // 1
#include <mtd/ubi-user.h>
#define OPTION_M (1 << 0)
# CA certificates # CA certificates
[buildout] [buildout]
extends =
../patch/buildout.cfg
parts = parts =
ca-certificates ca-certificates
...@@ -16,6 +20,7 @@ download-only = true ...@@ -16,6 +20,7 @@ download-only = true
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 20120623 version = 20120623
url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_${:version}.tar.gz url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_${:version}.tar.gz
patch-binary = ${patch:location}/bin/patch
md5sum = 5105d4cc086f0d4ecf7bf2e4c4667289 md5sum = 5105d4cc086f0d4ecf7bf2e4c4667289
patches = patches =
${ca-certificates-sbin-dir.patch:location}/${ca-certificates-sbin-dir.patch:filename} ${ca-certificates-sbin-dir.patch:location}/${ca-certificates-sbin-dir.patch:filename}
......
...@@ -21,20 +21,33 @@ node = nodejs ...@@ -21,20 +21,33 @@ node = nodejs
environment = environment =
PATH=${nodejs:location}/bin:%(PATH)s PATH=${nodejs:location}/bin:%(PATH)s
[cloud9-git] [cloud9-stable]
# Online IDE written in javascript/node.js # Online IDE written in javascript/node.js
# URL : c9.io # URL : c9.io
# You can use it using the following command : # You can use it using the following command :
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
commit = ab689c5d3cc29d02d788506c0f1b2ab0742a0f05 commit = 97db1467c517d265438684bd2a70b0b76ee282f6
repository = https://github.com/ajaxorg/cloud9.git repository = https://github.com/ajaxorg/cloud9.git
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
git-binary = ${git:location}/bin/git git-binary = ${git:location}/bin/git
npm-binary = ${nodejs:location}/bin/node ${nodejs:location}/bin/npm npm-binary = ${nodejs-0.4:location}/bin/node ${npm:location}/bin/npm
environment = export GIT_SSL_NO_VERIFY=true; export PATH=${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin/:$PATH; export LDFLAGS=-L${libxml2:location}/lib; export HOME=${:location}; command = export GIT_SSL_NO_VERIFY=true; export HOME=${:location}; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${:git-binary} submodule update --init && cd support/jsdav && PATH=${nodejs-0.4:location}/bin:$PATH LDFLAGS=-L${libxml2:location}/lib ${:npm-binary} install) || (rm -fr ${:location}; exit 1)
command = ${:environment} (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${node-sm:location}/node_modules/.bin/sm install) || (rm -fr ${:location}; exit 1) update-command =
[cloud9-git]
# Online IDE written in javascript/node.js
# URL : c9.io
# You can use it using the following command :
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command
stop-on-error = true
commit = 1f46081df51e6654cef17c205fbf589b219133a7
repository = https://github.com/ajaxorg/cloud9.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location};
command = ${:environment} (git clone --quiet ${:repository} ${:location} && cd ${:location} && git reset --hard ${:commit} && ${node-sm:location}/node_modules/.bin/sm install) || (rm -fr ${:location}; exit 1)
update-command = update-command =
[cloud9-npm] [cloud9-npm]
...@@ -50,4 +63,4 @@ packages = ...@@ -50,4 +63,4 @@ packages =
cloud9==0.7 cloud9==0.7
# Specify environment jsDAV (dependency of cloud9) needs libxml2 # Specify environment jsDAV (dependency of cloud9) needs libxml2
environment = environment =
LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib
\ No newline at end of file
...@@ -21,9 +21,13 @@ configure-options = ...@@ -21,9 +21,13 @@ configure-options =
--with-expat=${libexpat:location} --with-expat=${libexpat:location}
--without-python --without-python
--without-tcltk --without-tcltk
environment = environment =
NO_PERL=y NO_PERL=y
PATH=${curl:location}/bin:${gettext:location}/bin:%(PATH)s PATH=${curl:location}/bin:${gettext:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib
[gitweb]
<= git
make-targets = install-gitweb
make-options = bindir="${git:location}/bin/"
[buildout]
extends =
../attr/buildout.cfg
parts = libcap
[libcap2]
recipe = slapos.recipe.build
format = no
url = http://pkgs.fedoraproject.org/lookaside/pkgs/libcap/libcap-2.22.tar.bz2/ce64058bdb3f086ddbfca8ce6c919845/libcap-2.22.tar.bz2
md5sum = ce64058bdb3f086ddbfca8ce6c919845
attr-include = ${attr:location}/include/
attr-lib = ${attr:location}/lib/
slapos_promise =
directory:sbin
directory:usr/include
statlib:lib/libcap.a
file:lib/libcap.so
file:sbin/getcap
file:sbin/setcap
script =
import os
url = self.download(self.options['url'], self.options['md5sum'])
extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir)
cflags = '-I%(attr)s' % {'attr': self.options['attr-include']}
ldflags = '-L%(attr)s -Wl,-rpath=%(attr)s' % {'attr': self.options['attr-lib']}
call(['make', 'CFLAGS=%s' % cflags, 'LDFLAGS=%s' % ldflags, 'DESTDIR=%s' % self.options['location'], 'RAISE_SETFCAP=no', 'install'],
cwd=workdir, env=env)
lib64 = os.path.join(self.options['location'], 'lib64')
lib = os.path.join(self.options['location'], 'lib')
# XXX: Dirty if case
# if lib64 exists, then create a symlink from lib to lib64
os.path.exists(lib64) and os.symlink(lib64, lib)
[libcap]
<= libcap2
[buildout]
parts =
libyaml
[libyaml]
recipe = hexagonit.recipe.cmmi
url = http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
md5sum = 36c852831d02cf90508c29852361d01b
[buildout]
extends =
../patch/buildout.cfg
../attr/buildout.cfg
../libcap/buildout.cfg
parts = lxc
[lxc]
<= lxc-0.8
[lxc-0.8.0-rc2-libexecdir-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = libexecdir-fix.patch
download-only = true
md5sum = d674463ccb3a7c205c2326fb4ab5436b
[lxc-0.8.0-rc2-lxc-ls-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = lxc-ls-fix.patch
download-only = true
md5sum = 28c155a554d4f4856351085494585c73
[lxc-0.8.0-rc2-cap_get_flag-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = cap_get_flag-fix.patch
download-only = true
md5sum = 8d3706a9bd60b6ebfea33998644b1a99
[lxc-0.8]
recipe = hexagonit.recipe.cmmi
url = http://lxc.sourceforge.net/download/lxc/lxc-0.8.0-rc2.tar.gz
md5sum = 9bd6988542fd7dd198d056ef3a2db9f6
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${lxc-0.8.0-rc2-cap_get_flag-patch:location}/${lxc-0.8.0-rc2-cap_get_flag-patch:filename}
${lxc-0.8.0-rc2-libexecdir-patch:location}/${lxc-0.8.0-rc2-libexecdir-patch:filename}
${lxc-0.8.0-rc2-lxc-ls-patch:location}/${lxc-0.8.0-rc2-lxc-ls-patch:filename}
environment =
PATH=%(PATH)s:${attr:location}/bin/:${libcap:location}/sbin/
CFLAGS=-I${libcap:location}/usr/include
LDFLAGS=-L${libcap:location}/lib/ -Wl,-rpath=${libcap:location}/lib/
commit 94767c5249b5802a894f6d84f6245ef86f50bff3
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Date: Fri Jun 29 10:37:07 2012 -0500
Fix lxc's handling of CAP_LAST_CAP
CAP_LAST_CAP in linux/capability.h doesn't always match what the kernel
actually supports. If the kernel supports fewer capabilities, then a
cap_get_flag for an unsupported capability returns -EINVAL.
Recognize that, and don't fail when initializing capabilities when this
happens, rather accept that we've reached the last capability.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
diff --git a/src/lxc/caps.c b/src/lxc/caps.c
index 10a0b4a..c32e7e4 100644
--- a/src/lxc/caps.c
+++ b/src/lxc/caps.c
@@ -28,6 +28,7 @@
#include <limits.h>
#include <sys/prctl.h>
#include <sys/capability.h>
+#include <errno.h>
#include "log.h"
@@ -90,6 +91,7 @@ int lxc_caps_up(void)
cap_t caps;
cap_value_t cap;
int ret;
+ int lastcap = 0;
/* when we are run as root, we don't want to play
* with the capabilities */
@@ -108,9 +110,15 @@ int lxc_caps_up(void)
ret = cap_get_flag(caps, cap, CAP_PERMITTED, &flag);
if (ret) {
- ERROR("failed to cap_get_flag: %m");
- goto out;
+ if (errno == EINVAL) {
+ INFO("Last supported cap was %d\n", cap-1);
+ break;
+ } else {
+ ERROR("failed to cap_get_flag: %m");
+ goto out;
+ }
}
+ lastcap = cap;
ret = cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap, flag);
if (ret) {
commit 00ad19d4dba5c05401125d4217dc8f4e7fd9403a
Author: David Ward <david.ward@ll.mit.edu>
Date: Fri May 4 00:50:15 2012 +0200
lxc-setcap/lxc-setuid: add autoconf expansion for $libexecdir
Support new default location for LXCINITDIR.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
diff --git a/configure.ac b/configure.ac
index c2bf4b0..0c8aa69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,7 @@ AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
AS_AC_EXPAND(PREFIX, $prefix)
AS_AC_EXPAND(LIBDIR, $libdir)
AS_AC_EXPAND(BINDIR, $bindir)
+AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
AS_AC_EXPAND(INCLUDEDIR, $includedir)
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
AS_AC_EXPAND(DATADIR, $datadir)
diff --git a/src/lxc/lxc-setcap.in b/src/lxc/lxc-setcap.in
index 52d4b48..71e3710 100644
--- a/src/lxc/lxc-setcap.in
+++ b/src/lxc/lxc-setcap.in
@@ -84,6 +84,7 @@ lxc_dropcaps()
shortoptions='hd'
longoptions='help'
libdir=@LIBDIR@
+libexecdir=@LIBEXECDIR@
localstatedir=@LOCALSTATEDIR@
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
diff --git a/src/lxc/lxc-setuid.in b/src/lxc/lxc-setuid.in
index 0919eac..020dfae 100644
--- a/src/lxc/lxc-setuid.in
+++ b/src/lxc/lxc-setuid.in
@@ -81,6 +81,7 @@ lxc_dropuid()
shortoptions='hd'
longoptions='help'
libdir=@LIBDIR@
+libexecdir=@LIBEXECDIR@
localstatedir=@LOCALSTATEDIR@
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
commit 7ef0141356454503ab81460290b5dffa32c1f441
Author: David Ward <david.ward@ll.mit.edu>
Date: Fri May 4 00:50:15 2012 +0200
refresh lxc-ls
Add an '--active' option that lists active containers by searching
cgroups. (Otherwise, the directories in /var/lib/lxc are listed.)
Modify the cgroup search to only use hierarchies that contain one
or more subsystems. When searching, if a hierarchy contains the
'ns' subsystem, do not append '/lxc' to the parent cgroup.
Add a '--help' option that prints the command syntax.
Print error messages and help information to stderr.
Update the documentation.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
diff --git a/doc/lxc-ls.sgml.in b/doc/lxc-ls.sgml.in
index 3ffd4f8..d33e9b3 100644
--- a/doc/lxc-ls.sgml.in
+++ b/doc/lxc-ls.sgml.in
@@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<refsynopsisdiv>
<cmdsynopsis>
- <command>lxc-ls <optional>ls option</optional>
+ <command>lxc-ls <optional>--active</optional> <optional>ls option</optional>
</command>
</cmdsynopsis>
</refsynopsisdiv>
@@ -67,6 +67,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<varlistentry>
<term>
+ <option><optional>--active</optional></option>
+ </term>
+ <listitem>
+ <para>
+ List active containers.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
<option><optional>ls options</optional></option>
</term>
<listitem>
@@ -94,10 +105,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</varlistentry>
<varlistentry>
- <term>lxc-ls -1</term>
+ <term>lxc-ls --active -1</term>
<listitem>
<para>
- list all the containers and display the list in one column.
+ list active containers and display the list in one column.
</para>
</listitem>
</varlistentry>
diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in
index a1ad642..11a3b45 100644
--- a/src/lxc/lxc-ls.in
+++ b/src/lxc/lxc-ls.in
@@ -1,43 +1,100 @@
#!/bin/bash
-localstatedir=@LOCALSTATEDIR@
-lxcpath=@LXCPATH@
+#
+# lxc: linux Container library
-if [ ! -r $lxcpath ]; then
- exit 0
-fi
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library 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
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+localstatedir=@LOCALSTATEDIR@
+lxc_path=@LXCPATH@
-function get_cgroup()
+usage()
{
- local mount_string
- mount_string=$(mount -t cgroup |grep -E -e '^lxc ')
- if test -n "$mount_string"; then
- mount_point=$(echo $mount_string |cut -d' ' -f3)
- return
- fi
- mount_string=`grep -m1 -E '^[^ \t]+[ \t]+[^ \t]+[ \t]+cgroup' /proc/self/mounts`;
- if test -z "$mount_string"; then
- echo "failed to find mounted cgroup"
- exit 1
- fi
- mount_point=`echo "$mount_string" |cut -d' ' -f2`;
+ echo "usage: $(basename $0) [--active] [--] [LS_OPTIONS...]" >&2
}
-ls "$@" $lxcpath
+help() {
+ usage
+ echo >&2
+ echo "List containers existing on the system." >&2
+ echo >&2
+ echo " --active list active containers" >&2
+ echo " LS_OPTIONS ls command options (see \`ls --help')" >&2
+}
+
+get_parent_cgroup()
+{
+ local hierarchies hierarchy fields subsystems init_cgroup mountpoint
+
+ parent_cgroup=""
+
+ # Obtain a list of hierarchies that contain one or more subsystems
+ hierarchies=$(tail -n +2 /proc/cgroups | cut -f 2)
-active=$(netstat -xl 2>/dev/null | grep $lxcpath | \
- sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#');
+ # Iterate through the list until a suitable hierarchy is found
+ for hierarchy in $hierarchies; do
+ # Obtain information about the init process in the hierarchy
+ fields=$(grep -E "^$hierarchy:" /proc/1/cgroup | head -n 1)
+ if [ -z "$fields" ]; then continue; fi
+ fields=${fields#*:}
-if test -n "$active"; then
- get_cgroup
- if test -n "$mount_point"; then
- # get cgroup for init
- init_cgroup=`cat /proc/1/cgroup | awk -F: '{ print $3 }' | head -1`
- if [ ! -d $mount_point/$init_cgroup/lxc ]; then
- cd $mount_point/$init_cgroup
+ # Get a comma-separated list of the hierarchy's subsystems
+ subsystems=${fields%:*}
+
+ # Get the cgroup of the init process in the hierarchy
+ init_cgroup=${fields#*:}
+
+ # Get the filesystem mountpoint of the hierarchy
+ mountpoint=$(grep -E "^cgroup [^ ]+ [^ ]+ ([^ ]+,)?$subsystems(,[^ ]+)? " /proc/self/mounts | cut -d ' ' -f 2)
+ if [ -z "$mountpoint" ]; then continue; fi
+
+ # Return the absolute path to the containers' parent cgroup
+ # (do not append '/lxc' if the hierarchy contains the 'ns' subsystem)
+ if [[ ",$subsystems," == *,ns,* ]]; then
+ parent_cgroup="${mountpoint}${init_cgroup%/}"
else
- cd $mount_point/$init_cgroup/lxc
+ parent_cgroup="${mountpoint}${init_cgroup%/}/lxc"
fi
- ls "$@" -d $active
- fi
+ break
+ done
+}
+
+directory="$lxc_path"
+
+for i in "$@"; do
+ case $i in
+ --help)
+ help; exit 1;;
+ --active)
+ get_parent_cgroup; directory="$parent_cgroup"; shift;;
+ --)
+ shift; break;;
+ *)
+ break;;
+ esac
+done
+
+containers=""
+if [ ! -z "$directory" ]; then
+ containers=$(find $directory -mindepth 1 -maxdepth 1 -type d -printf "%f\n" 2>/dev/null)
fi
+
+if [ -z "$containers" ]; then
+ echo "$(basename $0): no containers found" >&2
+ exit 1
+fi
+
+cd "$directory"
+ls -d $@ $containers
[buildout]
extends =
../pcre/buildout.cfg
../zlib/buildout.cfg
../openssl/buildout.cfg
parts = nginx
[nginx]
recipe = hexagonit.recipe.cmmi
url = http://nginx.org/download/nginx-1.0.14.tar.gz
configure-options=
--with-ipv6
--with-http_ssl_module
--with-ld-opt="-L ${zlib:location}/lib -L ${openssl:location}/lib -L ${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib"
--with-cc-opt="-I ${pcre:location}/include -I ${openssl:location}/include -I ${zlib:location}/include"
...@@ -4,5 +4,6 @@ parts = ...@@ -4,5 +4,6 @@ parts =
[noVNC] [noVNC]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = https://github.com/kanaka/noVNC/tarball/v0.2 url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.3.tar.gz
md5sum = 95d3c58921fa188c179491e8ef2acc12
strip-top-level-dir = true strip-top-level-dir = true
...@@ -3,7 +3,6 @@ extends = ...@@ -3,7 +3,6 @@ extends =
../git/buildout.cfg ../git/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../python-2.7/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
parts = parts =
...@@ -12,14 +11,14 @@ parts = ...@@ -12,14 +11,14 @@ parts =
[nodejs] [nodejs]
# Server-side Javascript. # Server-side Javascript.
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz url = http://nodejs.org/dist/v0.6.21/node-v0.6.21.tar.gz
md5sum = f5669a9717422b811c6bad1cc961b1e5 md5sum = 0da985a0bf820400af92363b9f453fe4
configure-options = configure-options =
--openssl-includes=${openssl:location}/include --openssl-includes=${openssl:location}/include
--openssl-libpath=${openssl:location}/lib --openssl-libpath=${openssl:location}/lib
environment = environment =
HOME=${buildout:parts-directory}/${:_buildout_section_name_} HOME=${buildout:parts-directory}/${:_buildout_section_name_}
PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/ PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -32,7 +31,7 @@ configure-options = ...@@ -32,7 +31,7 @@ configure-options =
--openssl-includes=${openssl:location}/include --openssl-includes=${openssl:location}/include
--openssl-libpath=${openssl:location}/lib --openssl-libpath=${openssl:location}/lib
environment = environment =
PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/ PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
extends = extends =
../ca-certificates/buildout.cfg ../ca-certificates/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../patch/buildout.cfg
parts = parts =
openssl openssl
...@@ -30,6 +31,7 @@ download-only = true ...@@ -30,6 +31,7 @@ download-only = true
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.1c.tar.gz url = https://www.openssl.org/source/openssl-1.0.1c.tar.gz
md5sum = ae412727c8c15b67880aef7bd2999b2e md5sum = ae412727c8c15b67880aef7bd2999b2e
patch-binary = ${patch:location}/bin/patch
patches = patches =
${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename} ${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename}
${openssl-exlibs.patch:location}/${openssl-exlibs.patch:filename} ${openssl-exlibs.patch:location}/${openssl-exlibs.patch:filename}
......
...@@ -11,7 +11,7 @@ extends = ...@@ -11,7 +11,7 @@ extends =
[pkgconfig] [pkgconfig]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz
md5sum = 47525c26a9ba7ba14bf85e01509a7234 md5sum = 47525c26a9ba7ba14bf85e01509a7234
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
# build pkg-config twice so that second configure can use pkg-config # build pkg-config twice so that second configure can use pkg-config
......
[buildout]
extends =
../libyaml/buildout.cfg
parts = ruby
[ruby-1.9.3]
recipe = hexagonit.recipe.cmmi
url = http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
md5sum = bc0c715c69da4d1d8bd57069c19f6c0e
configure-options =
--enable-shared --enable-rpath
environment =
CFLAGS=-I${libyaml:location}/include
LDFLAGS=-L${libyaml:location}/lib -Wl,-rpath=${libyaml:location}/lib
[ruby-1.9]
<= ruby-1.9.3
[ruby]
<= ruby-1.9
...@@ -19,6 +19,7 @@ extends = ...@@ -19,6 +19,7 @@ extends =
../sqlite3/buildout.cfg ../sqlite3/buildout.cfg
../swig/buildout.cfg ../swig/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../patch/buildout.cfg
parts = parts =
slapos slapos
...@@ -47,7 +48,7 @@ allowed-eggs-from-site-packages = ...@@ -47,7 +48,7 @@ allowed-eggs-from-site-packages =
[environment] [environment]
# Note: For now original PATH is appeneded to the end, as not all tools are # Note: For now original PATH is appeneded to the end, as not all tools are
# provided by SlapOS # provided by SlapOS
PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:$PATH PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:${patch:location}/bin:$PATH
CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include
CPPFLAGS=${:CFLAGS} CPPFLAGS=${:CFLAGS}
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -110,12 +111,11 @@ scripts = ...@@ -110,12 +111,11 @@ scripts =
slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl
slapgrid-supervisord = slapos.grid.svcbackend:supervisord slapgrid-supervisord = slapos.grid.svcbackend:supervisord
slapproxy = slapos.proxy:main slapproxy = slapos.proxy:main
slapos = slapos.entry:main
[versions] [versions]
zc.buildout = 1.6.0-dev-SlapOS-006 zc.buildout = 1.6.0-dev-SlapOS-006
hexagonit.recipe.download = 1.5.1-dev-slapos-002
# Generated by buildout-versions
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5 Pygments = 1.5
Werkzeug = 0.8.3 Werkzeug = 0.8.3
...@@ -124,17 +124,17 @@ collective.recipe.template = 1.9 ...@@ -124,17 +124,17 @@ collective.recipe.template = 1.9
docutils = 0.9.1 docutils = 0.9.1
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
ipython = 0.13 ipython = 0.13
lxml = 2.3.4 lxml = 2.3.5
meld3 = 0.6.8 meld3 = 0.6.8
netaddr = 0.7.7 netaddr = 0.7.7
slapos.core = 0.26.1 slapos.core = 0.28.5
slapos.libnetworkcache = 0.12 slapos.libnetworkcache = 0.12
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.5
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
...@@ -142,11 +142,15 @@ Flask = 0.9 ...@@ -142,11 +142,15 @@ Flask = 0.9
Sphinx = 1.1.3 Sphinx = 1.1.3
# Required by: # Required by:
# slapos.core==0.26.1 # hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.core==0.28.5
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.5
# slapos.libnetworkcache==0.12 # slapos.libnetworkcache==0.12
# supervisor==3.0a12 # supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-006 # zc.buildout==1.6.0-dev-SlapOS-006
...@@ -154,9 +158,9 @@ netifaces = 0.8 ...@@ -154,9 +158,9 @@ netifaces = 0.8
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.5
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.5
zope.interface = 4.0.1 zope.interface = 4.0.1
[buildout]
parts = tar
[tar-drop.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 9352820566aa3534a04bd269c9f89f48
download-only = true
filename = drop.gets.patch
[tar]
virtual-depends = ${tar-drop.gets.patch:md5sum}
patch-options = -p1
patches =
${tar-drop.gets.patch:location}/${tar-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz
md5sum = 00d1e769c6af702c542cca54b728920d
environment =
FORCE_UNSAFE_CONFIGURE=1
diff -ur tar-1.26.orig/gnu/stdio.in.h tar-1.26/gnu/stdio.in.h
--- tar-1.26.orig/gnu/stdio.in.h 2011-03-12 10:14:33.000000000 +0100
+++ tar-1.26/gnu/stdio.in.h 2012-08-24 15:35:22.299190847 +0200
@@ -164,7 +164,10 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
+
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
[buidout]
parts =
xz-utils
[xz-utils]
recipe = hexagonit.recipe.cmmi
url = http://tukaani.org/xz/xz-5.0.4.tar.gz
md5sum = df3df690aef18384e1e031be7ec3a964
...@@ -4,8 +4,8 @@ parts = ...@@ -4,8 +4,8 @@ parts =
[zabbix-agent] [zabbix-agent]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.10.tar.gz?download url = http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.1.tar.gz?download
md5sum = 7e89f80c1822787c0831f7c0dbefcd7b md5sum = 3b301aa4f2b7cb5ede46884b9c7873e1
configure-options = configure-options =
--enable-agent --enable-agent
--enable-ipv6 --enable-ipv6
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.59-dev' version = '0.65-dev'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
...@@ -45,98 +45,103 @@ setup(name=name, ...@@ -45,98 +45,103 @@ setup(name=name,
'apachephp = slapos.recipe.apachephp:Recipe', 'apachephp = slapos.recipe.apachephp:Recipe',
'apacheproxy = slapos.recipe.apacheproxy:Recipe', 'apacheproxy = slapos.recipe.apacheproxy:Recipe',
'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe', 'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe',
'certificate_authority = slapos.recipe.certificate_authority:Recipe',
'certificate_authority.request = slapos.recipe.certificate_authority:Request', 'certificate_authority.request = slapos.recipe.certificate_authority:Request',
'certificate_authority = slapos.recipe.certificate_authority:Recipe',
'check_port_listening = slapos.recipe.check_port_listening:Recipe', 'check_port_listening = slapos.recipe.check_port_listening:Recipe',
'check_url_available = slapos.recipe.check_url_available:Recipe', 'check_url_available = slapos.recipe.check_url_available:Recipe',
'cloud9 = slapos.recipe.cloud9:Recipe', 'cloud9 = slapos.recipe.cloud9:Recipe',
'cron = slapos.recipe.dcron:Recipe', 'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe',
'cron.d = slapos.recipe.dcron:Part', 'cron.d = slapos.recipe.dcron:Part',
'cron = slapos.recipe.dcron:Recipe',
'davstorage = slapos.recipe.davstorage:Recipe', 'davstorage = slapos.recipe.davstorage:Recipe',
'dropbear = slapos.recipe.dropbear:Recipe', 'downloader = slapos.recipe.downloader:Recipe',
'dropbear.add_authorized_key = slapos.recipe.dropbear:AddAuthorizedKey', 'dropbear.add_authorized_key = slapos.recipe.dropbear:AddAuthorizedKey',
'dropbear.client = slapos.recipe.dropbear:Client', 'dropbear.client = slapos.recipe.dropbear:Client',
'dropbear = slapos.recipe.dropbear:Recipe',
'duplicity = slapos.recipe.duplicity:Recipe', 'duplicity = slapos.recipe.duplicity:Recipe',
'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe',
'equeue = slapos.recipe.equeue:Recipe', 'equeue = slapos.recipe.equeue:Recipe',
'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe',
'erp5.promise = slapos.recipe.erp5_promise:Recipe',
'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'erp5.test = slapos.recipe.erp5_test:Recipe',
'erp5.update = slapos.recipe.erp5_update:Recipe',
'firefox = slapos.recipe.firefox:Recipe',
'fontconfig = slapos.recipe.fontconfig:Recipe',
'generate.mac = slapos.recipe.generatemac:Recipe', 'generate.mac = slapos.recipe.generatemac:Recipe',
'generate.password = slapos.recipe.generatepassword:Recipe', 'generate.password = slapos.recipe.generatepassword:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'onetimeupload = slapos.recipe.onetimeupload:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe',
'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe',
'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe', 'generic.kumofs = slapos.recipe.generic_kumofs:Recipe',
'egg_test = slapos.recipe.erp5_test:EggTestRecipe', 'generic.memcached = slapos.recipe.generic_memcached:Recipe',
'firefox = slapos.recipe.firefox:Recipe', 'generic.mysql = slapos.recipe.generic_mysql:Recipe',
'fontconfig = slapos.recipe.fontconfig:Recipe', 'generic.varnish = slapos.recipe.generic_varnish:Recipe',
'generic.zope = slapos.recipe.generic_zope:Recipe',
'generic.zope.zeo.client = slapos.recipe.generic_zope_zeo_client:Recipe',
'gitinit = slapos.recipe.gitinit:Recipe',
'haproxy = slapos.recipe.haproxy:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe',
'java = slapos.recipe.java:Recipe', 'java = slapos.recipe.java:Recipe',
'kumofs = slapos.recipe.kumofs:Recipe', 'kumofs = slapos.recipe.kumofs:Recipe',
'kvm = slapos.recipe.kvm:Recipe',
'kvm.frontend = slapos.recipe.kvm_frontend:Recipe', 'kvm.frontend = slapos.recipe.kvm_frontend:Recipe',
'generic.kumofs = slapos.recipe.generic_kumofs:Recipe', 'kvm = slapos.recipe.kvm:Recipe',
'haproxy = slapos.recipe.haproxy:Recipe', 'lamp.request = slapos.recipe.lamp:Request',
'libcloud = slapos.recipe.libcloud:Recipe', 'lamp.simple = slapos.recipe.lamp:Simple',
'lamp = slapos.recipe.lamp:Request',
'lamp.static = slapos.recipe.lamp:Static',
'libcloudrequest = slapos.recipe.libcloudrequest:Recipe', 'libcloudrequest = slapos.recipe.libcloudrequest:Recipe',
'libcloud = slapos.recipe.libcloud:Recipe',
'lockfile = slapos.recipe.lockfile:Recipe', 'lockfile = slapos.recipe.lockfile:Recipe',
'logrotate.d = slapos.recipe.logrotate:Part',
'logrotate = slapos.recipe.logrotate:Recipe',
'memcached = slapos.recipe.memcached:Recipe', 'memcached = slapos.recipe.memcached:Recipe',
'generic.memcached = slapos.recipe.generic_memcached:Recipe',
'mysql = slapos.recipe.mysql:Recipe',
'mydumper = slapos.recipe.mydumper:Recipe',
'generic.mysql = slapos.recipe.generic_mysql:Recipe',
'mkdirectory = slapos.recipe.mkdirectory:Recipe', 'mkdirectory = slapos.recipe.mkdirectory:Recipe',
'mydumper = slapos.recipe.mydumper:Recipe',
'mysql = slapos.recipe.mysql:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed', 'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
'notifier = slapos.recipe.notifier:Recipe',
'notifier.callback = slapos.recipe.notifier:Callback', 'notifier.callback = slapos.recipe.notifier:Callback',
'notifier.notify = slapos.recipe.notifier:Notify', 'notifier.notify = slapos.recipe.notifier:Notify',
'notifier = slapos.recipe.notifier:Recipe',
'novnc = slapos.recipe.novnc:Recipe', 'novnc = slapos.recipe.novnc:Recipe',
'lamp = slapos.recipe.lamp:Request', 'onetimeupload = slapos.recipe.onetimeupload:Recipe',
'lamp.request = slapos.recipe.lamp:Request',
'lamp.static = slapos.recipe.lamp:Static',
'lamp.simple = slapos.recipe.lamp:Simple',
'logrotate = slapos.recipe.logrotate:Recipe',
'logrotate.d = slapos.recipe.logrotate:Part',
'pbs = slapos.recipe.pbs:Recipe', 'pbs = slapos.recipe.pbs:Recipe',
'proactive = slapos.recipe.proactive:Recipe',
'publish = slapos.recipe.publish:Recipe', 'publish = slapos.recipe.publish:Recipe',
'publishurl = slapos.recipe.publishurl:Recipe', 'publishurl = slapos.recipe.publishurl:Recipe',
'pwgen = slapos.recipe.pwgen:Recipe', 'pwgen = slapos.recipe.pwgen:Recipe',
'pwgen.stable = slapos.recipe.pwgen:StablePasswordGeneratorRecipe', 'pwgen.stable = slapos.recipe.pwgen:StablePasswordGeneratorRecipe',
'proactive = slapos.recipe.proactive:Recipe', 'requestoptional = slapos.recipe.requestoptional:Recipe',
'request = slapos.recipe.request:Recipe', 'request = slapos.recipe.request:Recipe',
'seleniumrunner = slapos.recipe.seleniumrunner:Recipe', 'seleniumrunner = slapos.recipe.seleniumrunner:Recipe',
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed', 'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
'shell = slapos.recipe.shell:Recipe',
'shellinabox = slapos.recipe.shellinabox:Recipe', 'shellinabox = slapos.recipe.shellinabox:Recipe',
'slapconfiguration = slapos.recipe.slapconfiguration:Recipe', 'shell = slapos.recipe.shell:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe', 'signalwrapper= slapos.recipe.signal_wrapper:Recipe',
'softwaretype = slapos.recipe.softwaretype:Recipe',
'siptester = slapos.recipe.siptester:SipTesterRecipe',
'simplelogger = slapos.recipe.simplelogger:Recipe', 'simplelogger = slapos.recipe.simplelogger:Recipe',
'slaprunner = slapos.recipe.slaprunner:Recipe', 'siptester = slapos.recipe.siptester:SipTesterRecipe',
'slapconfiguration = slapos.recipe.slapconfiguration:Recipe',
'slapcontainer = slapos.recipe.container:Recipe',
'slapmonitor = slapos.recipe.slapmonitor:Recipe', 'slapmonitor = slapos.recipe.slapmonitor:Recipe',
'slapreport = slapos.recipe.slapreport:Recipe', 'slapreport = slapos.recipe.slapreport:Recipe',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'slaprunner = slapos.recipe.slaprunner:Recipe',
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request', 'softwaretype = slapos.recipe.softwaretype:Recipe',
'sphinx= slapos.recipe.sphinx:Recipe', 'sphinx= slapos.recipe.sphinx:Recipe',
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
'stunnel = slapos.recipe.stunnel:Recipe', 'stunnel = slapos.recipe.stunnel:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'testnode = slapos.recipe.testnode:Recipe', 'testnode = slapos.recipe.testnode:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe',
'urlparse = slapos.recipe._urlparse:Recipe', 'urlparse = slapos.recipe._urlparse:Recipe',
'uuid = slapos.recipe._uuid:Recipe',
'vifib = slapos.recipe.vifib:Recipe', 'vifib = slapos.recipe.vifib:Recipe',
'waitfor = slapos.recipe.waitfor:Recipe', 'waitfor = slapos.recipe.waitfor:Recipe',
'webchecker = slapos.recipe.web_checker:Recipe',
'wrapper = slapos.recipe.wrapper:Recipe',
'xvfb = slapos.recipe.xvfb:Recipe', 'xvfb = slapos.recipe.xvfb:Recipe',
'xwiki = slapos.recipe.xwiki:Recipe', 'xwiki = slapos.recipe.xwiki:Recipe',
'zabbixagent = slapos.recipe.zabbixagent:Recipe', 'zabbixagent = slapos.recipe.zabbixagent:Recipe',
'generic.zope = slapos.recipe.generic_zope:Recipe',
'generic.zope.zeo.client = slapos.recipe.generic_zope_zeo_client:Recipe',
'zeo = slapos.recipe.zeo:Recipe', 'zeo = slapos.recipe.zeo:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe',
'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe',
'erp5.promise = slapos.recipe.erp5_promise:Recipe',
'erp5.update = slapos.recipe.erp5_update:Recipe',
'erp5.test = slapos.recipe.erp5_test:Recipe',
'generic.varnish = slapos.recipe.generic_varnish:Recipe',
'webchecker = slapos.recipe.web_checker:Recipe',
'signalwrapper= slapos.recipe.signal_wrapper:Recipe',
], ],
'slapos.recipe.nosqltestbed.plugin': [ 'slapos.recipe.nosqltestbed.plugin': [
'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed', 'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed',
......
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import uuid
import os
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def _options(self, options):
write = True
if os.path.exists(options['cache-file']):
with open(options['cache-file'], 'r') as cache_file:
try:
generated_uuid = uuid.UUID(hex=cache_file.read())
write = False
except ValueError:
generated_uuid = uuid.uuid4()
else:
generated_uuid = uuid.uuid4()
if write:
with open(options['cache-file'], 'w') as cache_file:
cache_file.write(generated_uuid.hex)
options['uuid'] = generated_uuid.hex
def install(self):
return []
...@@ -3,14 +3,20 @@ ...@@ -3,14 +3,20 @@
# BEWARE: It will be overwritten automatically # BEWARE: It will be overwritten automatically
URL="%(url)s" URL="%(url)s"
if [ -z $URL ]; then
echo "No URL specified." >&2
exit 3
fi
CODE=$(%(curl_path)s -k -sL $URL -w %%{http_code} -o /dev/null) CODE=$(%(curl_path)s -k -sL $URL -w %%{http_code} -o /dev/null)
if [ $CODE -eq 000 ]; then if [ $CODE -eq 000 ]; then
echo "$URL is not available (server not reachable)" >&2 echo "$URL is not available (server not reachable)." >&2
exit 1 exit 1
fi fi
if ! [ $CODE -eq 200 ]; then if ! [ $CODE -eq 200 ]; then
echo "$URL is not available (returned $CODE)" >&2 echo "$URL is not available (returned $CODE)." >&2
exit 2 exit 2
fi fi
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import ConfigParser
import uuid
import os
import subprocess
# XXX : This is in order to get the computer_partition object
# which exposes the state of the current partition.
#
# XXX : We could have modify slapgrid in order to put the
# state of the current partition offline. But this is
# written to have the most minimal impact.
from slapos.recipe.librecipe import GenericSlapRecipe
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericSlapRecipe):
def _options(self, options):
config_filename = self.options['config']
container_uuid = None
if os.path.exists(config_filename):
config = ConfigParser.ConfigParser()
config.read(config_filename)
if config.has_option('requested', 'name'):
container_uuid = uuid.UUID(hex=config.get('requested', 'name'))
if container_uuid is None:
# uuid wasn't generated at first in order to avoid
# wasting entropy
container_uuid = uuid.uuid4()
options['slapcontainer-name'] = container_uuid.hex
return options
def _install(self):
path_list = []
self.logger.info("Putting slapcontainer configuration file...")
config = ConfigParser.ConfigParser()
config.add_section('requested')
config.set('requested', 'status',
self.computer_partition.getState())
config.set('requested', 'name', self.options['slapcontainer-name'])
config.add_section('rootfs')
config.set('rootfs', 'image', self.options['image'])
config.set('rootfs', 'complete', self.options['image-complete'])
config.add_section('network')
config.set('network', 'interface', self.options['interface'])
config.add_section('config')
config.set('config', 'file', self.options['lxc-config'])
# Just a touch
open(self.options['lxc-config'], 'a').close()
config_filename = self.options['config']
with open(config_filename, 'w') as config_file:
config.write(config_file)
path_list.append(config_filename)
return path_list
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import urllib
import hashlib
import tempfile
import shutil
import subprocess
from slapos.recipe.librecipe import GenericBaseRecipe
BUFFER_SIZE = 1024
def service(args):
environ = os.environ.copy()
environ.update(PATH=args['path'])
if not os.path.exists(args['confirm']):
tmpdir = tempfile.mkdtemp()
try:
# XXX: Hardcoded path
tmpoutput = os.path.join(tmpdir, 'downloaded')
urllib.urlretrieve(args['url'], tmpoutput)
if args['md5'] is not None:
# XXX: we need to find a better way to do a md5sum
md5sum = hashlib.md5()
with open(args['output'], 'r') as output:
file_buffer = output.read(BUFFER_SIZE)
while len(file_buffer) > 0:
md5sum.update(file_buffer)
file_buffer = output.read(BUFFER_SIZE)
if args['md5'] != md5sum.hexdigest():
return 127 # Not-null return code
if not args['archive']:
shutil.move(tmpoutput, args['output'])
else:
# XXX: hardcoding path
extract_dir = os.path.join(tmpdir, 'extract')
os.mkdir(extract_dir)
subprocess.check_call(
['tar', '-x', '-f', tmpoutput,
'-C', extract_dir,
],
env=environ,
)
archive_content = os.listdir(extract_dir)
if len(archive_content) == 1 and \
os.path.isfile(os.path.join(extract_dir,
archive_content[0])):
shutil.move(os.path.join(extract_dir,
archive_content[0]),
args['output'])
else:
return 127 # Not-null return code
finally:
shutil.rmtree(tmpdir)
# Just a touch on args['confirm'] file
open(args['confirm'], 'w').close()
return 0
class Recipe(GenericBaseRecipe):
def install(self):
path_list = []
md5sum = self.options.get('md5sum', '')
if len(md5sum) == 0:
md5sum = None
keywords = {
'url': self.options['url'],
'md5': md5sum,
'output': self.options['downloaded-file'],
'confirm': self.options['downloaded-file-complete'],
'archive': self.optionIsTrue('archive', False),
}
if keywords['archive']:
keywords['path'] = self.options['path']
path_list.append(
self.createPythonScript(
self.options['binary'],
'slapos.recipe.downloader.service',
keywords,
)
)
return path_list
...@@ -77,7 +77,7 @@ class Recipe(GenericBaseRecipe): ...@@ -77,7 +77,7 @@ class Recipe(GenericBaseRecipe):
onetimedownload_config['url'] = url onetimedownload_config['url'] = url
onetimedownload_config['file_path'] = file_path onetimedownload_config['file_path'] = file_path
onetimedownload_runner_path = self.createExecutable(bin_path, onetimedownload_runner_path = self.createExecutable(bin_path,
self.substituteTemplate(wrapper_template_location, self.substituteTemplate(wrapper_template_location,
onetimedownload_config)) onetimedownload_config))
created_file_list.append(onetimedownload_runner_path) created_file_list.append(onetimedownload_runner_path)
......
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import json
import os
from subprocess import check_call
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
repolist = json.loads(self.options['repos'])
for repo, desc in repolist.iteritems():
absolute_path = os.path.join(self.options['base-directory'], '%s.git' % repo)
if not os.path.exists(absolute_path):
check_call([self.options['git-binary'], 'init',
'--bare', absolute_path])
# XXX: Hardcoded path
description_filename = os.path.join(absolute_path, 'description')
with open(description_filename, 'w') as description_file:
description_file.write(desc)
return []
...@@ -77,13 +77,13 @@ class Recipe(GenericBaseRecipe): ...@@ -77,13 +77,13 @@ class Recipe(GenericBaseRecipe):
i += 1 i += 1
server_snippet += self.substituteTemplate( server_snippet += self.substituteTemplate(
snippet_filename, dict( snippet_filename, dict(
name='%s_%s' % (name, i), name='%s_%s' % (name, i),
address=address, address=address,
cluster_zope_thread_amount=self.options['maxconn'])) cluster_zope_thread_amount=self.options['maxconn']))
config = dict( config = dict(
name=name, name=name,
ip=self.options['ip'], ip=self.options['ip'],
port=self.options['port'], port=self.options['port'],
server_text=server_snippet, server_text=server_snippet,
server_check_path=self.options['server-check-path'],) server_check_path=self.options['server-check-path'],)
......
...@@ -43,15 +43,15 @@ class Recipe(BaseSlapRecipe): ...@@ -43,15 +43,15 @@ class Recipe(BaseSlapRecipe):
# XXX-Cedric : add logrotate? # XXX-Cedric : add logrotate?
self.cron_d = self.installCrond() self.cron_d = self.installCrond()
kumo_conf = self.installKumo(self.getLocalIPv4Address()) kumo_conf = self.installKumo(self.getLocalIPv4Address())
ca_conf = self.installCertificateAuthority() ca_conf = self.installCertificateAuthority()
key, certificate = self.requestCertificate('Login Based Access') key, certificate = self.requestCertificate('Login Based Access')
stunnel_conf = self.installStunnel(self.getGlobalIPv6Address(), stunnel_conf = self.installStunnel(self.getGlobalIPv6Address(),
self.getLocalIPv4Address(), 12345, kumo_conf['kumo_gateway_port'], self.getLocalIPv4Address(), 12345, kumo_conf['kumo_gateway_port'],
certificate, key, ca_conf['ca_crl'], certificate, key, ca_conf['ca_crl'],
ca_conf['certificate_authority_path']) ca_conf['certificate_authority_path'])
self.linkBinary() self.linkBinary()
self.setConnectionDict(dict( self.setConnectionDict(dict(
stunnel_ip = stunnel_conf['public_ip'], stunnel_ip = stunnel_conf['public_ip'],
...@@ -80,7 +80,7 @@ class Recipe(BaseSlapRecipe): ...@@ -80,7 +80,7 @@ class Recipe(BaseSlapRecipe):
os.symlink(target, link) os.symlink(target, link)
self.logger.debug('Created link %r -> %r' % (link, target)) self.logger.debug('Created link %r -> %r' % (link, target))
self.path_list.append(link) self.path_list.append(link)
def installCrond(self): def installCrond(self):
timestamps = self.createDataDirectory('cronstamps') timestamps = self.createDataDirectory('cronstamps')
...@@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe): ...@@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe):
)[0] )[0]
self.path_list.append(wrapper) self.path_list.append(wrapper)
return cron_d return cron_d
def installLogrotate(self): def installLogrotate(self):
"""Installs logortate main configuration file and registers its to cron""" """Installs logortate main configuration file and registers its to cron"""
logrotate_d = os.path.abspath(os.path.join(self.etc_directory, logrotate_d = os.path.abspath(os.path.join(self.etc_directory,
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
############################################################################## ##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe, GenericSlapRecipe from slapos.recipe.librecipe import GenericBaseRecipe, GenericSlapRecipe
import json import json
import traceback
import zc.buildout import zc.buildout
class Recipe(GenericSlapRecipe): class Recipe(GenericSlapRecipe):
...@@ -127,11 +128,15 @@ class Recipe(GenericSlapRecipe): ...@@ -127,11 +128,15 @@ class Recipe(GenericSlapRecipe):
# Send connection parameters of slave instances # Send connection parameters of slave instances
site_url = "https://%s:%s/" % (self.options['domain'], self.options['port']) site_url = "https://%s:%s/" % (self.options['domain'], self.options['port'])
for slave in rewrite_rule_list: for slave in rewrite_rule_list:
self.setConnectionDict( try:
dict(url="%s%s" % (site_url, slave['resource']), self.setConnectionDict(
domainname=self.options['domain'], dict(url="%s%s" % (site_url, slave['resource']),
port=self.options['port'], domainname=self.options['domain'],
resource=slave['resource']), port=str(self.options['port']),
slave['reference']) resource=slave['resource']),
slave['reference'])
except:
self.logger.fatal("Error while sending slave %s informations: %s",
slave['reference'], traceback.format_exc())
return [map_file, conf_file, runner_path] return [map_file, conf_file, runner_path]
...@@ -158,7 +158,7 @@ class BaseRecipe(BaseSlapRecipe): ...@@ -158,7 +158,7 @@ class BaseRecipe(BaseSlapRecipe):
open(destination, 'w').write(open(template, 'r').read() % d) open(destination, 'w').write(open(template, 'r').read() % d)
def configureInstallation(self, document_root, url, mysql_conf): def configureInstallation(self, document_root, url, mysql_conf):
"""Start process which can launch python scripts, move or remove files or """Start process which can launch python scripts, move or remove files or
directories when installing software. directories when installing software.
""" """
if not self.options.has_key('delete') and not self.options.has_key('rename') and not\ if not self.options.has_key('delete') and not self.options.has_key('rename') and not\
...@@ -179,7 +179,7 @@ class BaseRecipe(BaseSlapRecipe): ...@@ -179,7 +179,7 @@ class BaseRecipe(BaseSlapRecipe):
else: else:
argument = argument + ["-f", self.options['file_token'].strip()] argument = argument + ["-f", self.options['file_token'].strip()]
argument += ["-t", document_root] argument += ["-t", document_root]
if self.options.has_key('delete'): if self.options.has_key('delete'):
delete = ["delete"] delete = ["delete"]
for fname in self.options['delete'].split(','): for fname in self.options['delete'].split(','):
...@@ -231,7 +231,7 @@ class Simple(BaseRecipe): ...@@ -231,7 +231,7 @@ class Simple(BaseRecipe):
url = self.installApache(document_root) url = self.installApache(document_root)
renamed = self.configureInstallation(document_root, url, mysql_conf) renamed = self.configureInstallation(document_root, url, mysql_conf)
connectionDict = dict( connectionDict = dict(
url=url, url=url,
**mysql_conf **mysql_conf
) )
if not renamed == "": if not renamed == "":
......
import sys import sys
import subprocess import subprocess
def executeRunner(args): def executeRunner(args):
"""Start the instance configure. this may run a python script, move or/and rename """Start the instance configure. this may run a python script, move or/and rename
file or directory when dondition is filled. the condition may be when file exist or when an entry file or directory when dondition is filled. the condition may be when file exist or when an entry
exist into database. exist into database.
""" """
......
...@@ -47,15 +47,13 @@ def _wait_files_creation(file_list): ...@@ -47,15 +47,13 @@ def _wait_files_creation(file_list):
def execute(args): def execute(args):
"""Portable execution with process replacement""" """Portable execution with process replacement"""
# Note: Candidate for slapos.lib.recipe # XXX: Kept for backward compatibility
os.execv(args[0], args + sys.argv[1:]) generic_exec([args, None, None])
def execute_wait(args): def execute_wait(args):
"""Execution but after all files in args[1] exists""" """Execution but after all files in args[1] exists"""
exec_list = list(args[0]) # XXX: Kept for backward compatibility
file_list = list(args[1]) generic_exec([args[0], args[1], None])
_wait_files_creation(file_list)
os.execv(exec_list[0], exec_list + sys.argv[1:])
child_pg = None child_pg = None
...@@ -63,23 +61,27 @@ child_pg = None ...@@ -63,23 +61,27 @@ child_pg = None
def executee(args): def executee(args):
"""Portable execution with process replacement and environment manipulation""" """Portable execution with process replacement and environment manipulation"""
exec_list = list(args[0]) # XXX: Kept for backward compatibility
environment = args[1] generic_exec([args[0], None, args[1]])
env = os.environ.copy()
for k,v in environment.iteritems():
env[k] = v
os.execve(exec_list[0], exec_list + sys.argv[1:], env)
def executee_wait(args): def executee_wait(args):
"""Portable execution with process replacement and environment manipulation""" """Portable execution with process replacement and environment manipulation"""
# XXX: Kept for backward compatibility
generic_exec(args)
def generic_exec(args):
exec_list = list(args[0]) exec_list = list(args[0])
file_list = list(args[1]) file_list = args[1]
environment = args[2] environment_overriding = args[2]
env = os.environ.copy()
for k,v in environment.iteritems(): exec_env = os.environ.copy()
env[k] = v if environment_overriding is not None:
_wait_files_creation(file_list) exec_env.update(environment_overriding)
os.execve(exec_list[0], exec_list + sys.argv[1:], env)
if file_list is not None:
_wait_files_creation(file_list)
os.execve(exec_list[0], exec_list + sys.argv[1:], exec_env)
def sig_handler(signal, frame): def sig_handler(signal, frame):
print 'Received signal %r, killing children and exiting' % signal print 'Received signal %r, killing children and exiting' % signal
......
...@@ -41,7 +41,7 @@ class Recipe(GenericBaseRecipe): ...@@ -41,7 +41,7 @@ class Recipe(GenericBaseRecipe):
'include %s' % logrotate_d, 'include %s' % logrotate_d,
] ]
logrotate_conf_file = self.createFile(logrotate_conf_file, logrotate_conf_file = self.createFile(logrotate_conf_file,
'\n'.join(logrotate_conf)) '\n'.join(logrotate_conf))
state_file = self.options['state-file'] state_file = self.options['state-file']
......
...@@ -44,7 +44,7 @@ class Recipe(BaseSlapRecipe): ...@@ -44,7 +44,7 @@ class Recipe(BaseSlapRecipe):
self.cron_d = self.installCrond() self.cron_d = self.installCrond()
memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(), memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(),
port=11000) port=11000)
ca_conf = self.installCertificateAuthority() ca_conf = self.installCertificateAuthority()
key, certificate = self.requestCertificate('Memcached') key, certificate = self.requestCertificate('Memcached')
...@@ -52,7 +52,7 @@ class Recipe(BaseSlapRecipe): ...@@ -52,7 +52,7 @@ class Recipe(BaseSlapRecipe):
self.getLocalIPv4Address(), 12345, memcached_conf['memcached_port'], self.getLocalIPv4Address(), 12345, memcached_conf['memcached_port'],
certificate, key, ca_conf['ca_crl'], certificate, key, ca_conf['ca_crl'],
ca_conf['certificate_authority_path']) ca_conf['certificate_authority_path'])
self.linkBinary() self.linkBinary()
self.setConnectionDict(dict( self.setConnectionDict(dict(
stunnel_ip = stunnel_conf['public_ip'], stunnel_ip = stunnel_conf['public_ip'],
...@@ -81,7 +81,7 @@ class Recipe(BaseSlapRecipe): ...@@ -81,7 +81,7 @@ class Recipe(BaseSlapRecipe):
os.symlink(target, link) os.symlink(target, link)
self.logger.debug('Created link %r -> %r' % (link, target)) self.logger.debug('Created link %r -> %r' % (link, target))
self.path_list.append(link) self.path_list.append(link)
def installCrond(self): def installCrond(self):
timestamps = self.createDataDirectory('cronstamps') timestamps = self.createDataDirectory('cronstamps')
cron_output = os.path.join(self.log_directory, 'cron-output') cron_output = os.path.join(self.log_directory, 'cron-output')
...@@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe): ...@@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe):
)[0] )[0]
self.path_list.append(wrapper) self.path_list.append(wrapper)
return cron_d return cron_d
def installLogrotate(self): def installLogrotate(self):
"""Installs logortate main configuration file and registers its to cron""" """Installs logortate main configuration file and registers its to cron"""
logrotate_d = os.path.abspath(os.path.join(self.etc_directory, logrotate_d = os.path.abspath(os.path.join(self.etc_directory,
......
...@@ -107,6 +107,7 @@ class Recipe(GenericBaseRecipe): ...@@ -107,6 +107,7 @@ class Recipe(GenericBaseRecipe):
mysql_binary=mysql_binary, mysql_binary=mysql_binary,
socket=socket, socket=socket,
configuration_file=mysql_conf_file, configuration_file=mysql_conf_file,
cwd=self.options['mysql-base-directory'],
) )
) )
path_list.append(mysqld) path_list.append(mysqld)
......
...@@ -17,7 +17,7 @@ def runMysql(conf): ...@@ -17,7 +17,7 @@ def runMysql(conf):
popen = subprocess.Popen([conf['mysql_install_binary'], popen = subprocess.Popen([conf['mysql_install_binary'],
'--skip-name-resolve', '--skip-host-cache', '--no-defaults', '--skip-name-resolve', '--skip-host-cache', '--no-defaults',
'--datadir=%s' % conf['data_directory']], '--datadir=%s' % conf['data_directory']],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=conf['cwd'])
result = popen.communicate()[0] result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0: if popen.returncode is None or popen.returncode != 0:
print "Failed to initialise server.\nThe error was: %s" % result print "Failed to initialise server.\nThe error was: %s" % result
......
...@@ -43,14 +43,14 @@ class KumoTestBed(object): ...@@ -43,14 +43,14 @@ class KumoTestBed(object):
kumo_cloud_config['address'] = recipe.getGlobalIPv6Address() kumo_cloud_config['address'] = recipe.getGlobalIPv6Address()
kumo_cloud_config['report_path'] = recipe.log_directory kumo_cloud_config['report_path'] = recipe.log_directory
kumo_cloud_config.setdefault('max_server', 4) kumo_cloud_config.setdefault('max_server', 4)
kumo_cloud_config.setdefault('max_tester', 5) kumo_cloud_config.setdefault('max_tester', 5)
kumo_cloud_config.setdefault('nb_thread', 32) kumo_cloud_config.setdefault('nb_thread', 32)
kumo_cloud_config.setdefault('nb_request', 1024000) kumo_cloud_config.setdefault('nb_request', 1024000)
kumo_cloud_config.setdefault('erp5_publish_url', '') kumo_cloud_config.setdefault('erp5_publish_url', '')
kumo_cloud_config.setdefault('erp5_publish_project', '') kumo_cloud_config.setdefault('erp5_publish_project', '')
computer_guid_list = [] computer_guid_list = []
computer_guid_list.append("COMP-23") # manager computer_guid_list.append("COMP-23") # manager
computer_guid_list.append("COMP-13") # server 1 computer_guid_list.append("COMP-13") # server 1
...@@ -62,9 +62,9 @@ class KumoTestBed(object): ...@@ -62,9 +62,9 @@ class KumoTestBed(object):
computer_guid_list.append("COMP-14") # tester 3 computer_guid_list.append("COMP-14") # tester 3
computer_guid_list.append("COMP-20") # tester 4 computer_guid_list.append("COMP-20") # tester 4
computer_guid_list.append("COMP-19") # tester 5 computer_guid_list.append("COMP-19") # tester 5
kumo_cloud_config.setdefault('computer_guid_list', ":".join(computer_guid_list)) kumo_cloud_config.setdefault('computer_guid_list', ":".join(computer_guid_list))
kumo_cloud_config['software_release_url'] = recipe.software_release_url kumo_cloud_config['software_release_url'] = recipe.software_release_url
kumo_cloud_config['server_url'] = recipe.server_url kumo_cloud_config['server_url'] = recipe.server_url
kumo_cloud_config['key_file'] = recipe.key_file kumo_cloud_config['key_file'] = recipe.key_file
......
...@@ -36,7 +36,7 @@ class Recipe(BaseSlapRecipe): ...@@ -36,7 +36,7 @@ class Recipe(BaseSlapRecipe):
#ipv6 = self.getGlobalIPv6Address(parameter_dict) #ipv6 = self.getGlobalIPv6Address(parameter_dict)
proactive_home = self.options['proactive_location'] proactive_home = self.options['proactive_location']
# ProActive parameters # ProActive parameters
proactive_rmUrl = parameter_dict.get('rmURL') proactive_rmUrl = parameter_dict.get('rmURL')
proactive_credential = parameter_dict.get('credentials') proactive_credential = parameter_dict.get('credentials')
...@@ -55,7 +55,7 @@ class Recipe(BaseSlapRecipe): ...@@ -55,7 +55,7 @@ class Recipe(BaseSlapRecipe):
) )
self._writeFile(proactive_configuration_file, pkg_resources.resource_string( self._writeFile(proactive_configuration_file, pkg_resources.resource_string(
__name__, 'template/ProActiveConfiguration.xml.in') % proactive_dict) __name__, 'template/ProActiveConfiguration.xml.in') % proactive_dict)
# ProActive wrapper # ProActive wrapper
#proactive = os.path.join(proactive_home, 'bin', 'unix', 'rm-start-node') #proactive = os.path.join(proactive_home, 'bin', 'unix', 'rm-start-node')
proactive_pa_bundle = os.path.join(proactive_home, 'PABundle') proactive_pa_bundle = os.path.join(proactive_home, 'PABundle')
...@@ -74,4 +74,4 @@ sh %(proactive)s %(rmUrl)s %(nsname)s %(credential)s ...@@ -74,4 +74,4 @@ sh %(proactive)s %(rmUrl)s %(nsname)s %(credential)s
self.computer_partition.setConnectionDict(dict( self.computer_partition.setConnectionDict(dict(
#proactive_ip="[%s]" % (ipv6), #proactive_ip="[%s]" % (ipv6),
)) ))
return [proactive_configuration_file, proactive_wrapper] return [proactive_configuration_file, proactive_wrapper]
\ No newline at end of file
...@@ -43,17 +43,17 @@ class Recipe(BaseSlapRecipe): ...@@ -43,17 +43,17 @@ class Recipe(BaseSlapRecipe):
document_root = self.createDataDirectory('htdocs') document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root) self.createHtdocs(self.options['source'].strip(), document_root)
url = self.installApache(document_root) url = self.installApache(document_root)
# MySQL # MySQL
mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678) mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678)
# LDAP # LDAP
ldap_port = dict() ldap_port = dict()
# Pulse # Pulse
mmc_core_conf = self.installPulse2(ip=self.getLocalIPv4Address(), mmc_core_conf = self.installPulse2(ip=self.getLocalIPv4Address(),
port=11000, ldap_host=ldap_conf['host'], ldap_port=ldap_conf['port']) port=11000, ldap_host=ldap_conf['host'], ldap_port=ldap_conf['port'])
ca_conf = self.installCertificateAuthority() ca_conf = self.installCertificateAuthority()
key, certificate = self.requestCertificate('Pulse') key, certificate = self.requestCertificate('Pulse')
...@@ -61,7 +61,7 @@ class Recipe(BaseSlapRecipe): ...@@ -61,7 +61,7 @@ class Recipe(BaseSlapRecipe):
self.getLocalIPv4Address(), 12345, pulse_conf['inventory_port'], self.getLocalIPv4Address(), 12345, pulse_conf['inventory_port'],
certificate, key, ca_conf['ca_crl'], certificate, key, ca_conf['ca_crl'],
ca_conf['certificate_authority_path']) ca_conf['certificate_authority_path'])
self.linkBinary() self.linkBinary()
self.setConnectionDict(dict( self.setConnectionDict(dict(
stunnel_inventory_ip = stunnel_conf['public_ip'], stunnel_inventory_ip = stunnel_conf['public_ip'],
...@@ -92,7 +92,7 @@ class Recipe(BaseSlapRecipe): ...@@ -92,7 +92,7 @@ class Recipe(BaseSlapRecipe):
os.symlink(target, link) os.symlink(target, link)
self.logger.debug('Created link %r -> %r' % (link, target)) self.logger.debug('Created link %r -> %r' % (link, target))
self.path_list.append(link) self.path_list.append(link)
def installCrond(self): def installCrond(self):
timestamps = self.createDataDirectory('cronstamps') timestamps = self.createDataDirectory('cronstamps')
cron_output = os.path.join(self.log_directory, 'cron-output') cron_output = os.path.join(self.log_directory, 'cron-output')
...@@ -114,7 +114,7 @@ class Recipe(BaseSlapRecipe): ...@@ -114,7 +114,7 @@ class Recipe(BaseSlapRecipe):
)[0] )[0]
self.path_list.append(wrapper) self.path_list.append(wrapper)
return cron_d return cron_d
def installLogrotate(self): def installLogrotate(self):
"""Installs logortate main configuration file and registers its to cron""" """Installs logortate main configuration file and registers its to cron"""
logrotate_d = os.path.abspath(os.path.join(self.etc_directory, logrotate_d = os.path.abspath(os.path.join(self.etc_directory,
...@@ -247,26 +247,26 @@ class Recipe(BaseSlapRecipe): ...@@ -247,26 +247,26 @@ class Recipe(BaseSlapRecipe):
ldap_logfile_path= os.path.join(self.log_directory, 'ldap.log'), ldap_logfile_path= os.path.join(self.log_directory, 'ldap.log'),
mmc_core_binary=self.options['mmc_core_binary'] mmc_core_binary=self.options['mmc_core_binary']
) )
#TODO write function that takes all templates in subdir and creates conf #TODO write function that takes all templates in subdir and creates conf
# files, keeping same dir structure. # files, keeping same dir structure.
mmc_conf_path = self.createConfigurationFile(os.path.join("mmc", mmc_conf_path = self.createConfigurationFile(os.path.join("mmc",
"agent", "config.ini"), self.substituteTemplate( "agent", "config.ini"), self.substituteTemplate(
self.getTemplateFilename(os.path.join("mmc_conf", self.getTemplateFilename(os.path.join("mmc_conf",
"agent", "config.ini.in")), config)) "agent", "config.ini.in")), config))
config['mmc_core_config_file'] = mysql_conf_path config['mmc_core_config_file'] = mysql_conf_path
self.path_list.append(self.createRunningWrapper('mmc-core', self.path_list.append(self.createRunningWrapper('mmc-core',
self.substituteTemplate(self.getTemplateFilename('mmc-core.in'), self.substituteTemplate(self.getTemplateFilename('mmc-core.in'),
config))) config)))
return dict(memcached_url='%s:%s' % return dict(memcached_url='%s:%s' %
(config['memcached_ip'], config['memcached_port']), (config['memcached_ip'], config['memcached_port']),
memcached_ip=config['memcached_ip'], memcached_ip=config['memcached_ip'],
memcached_port=config['memcached_port']) memcached_port=config['memcached_port'])
def createHtdocs(self, source, document_root): def createHtdocs(self, source, document_root):
source = self.options['source'].strip() source = self.options['source'].strip()
document_root = self.createDataDirectory('htdocs') document_root = self.createDataDirectory('htdocs')
...@@ -282,7 +282,7 @@ class Recipe(BaseSlapRecipe): ...@@ -282,7 +282,7 @@ class Recipe(BaseSlapRecipe):
shutil.copytree(path, os.path.join(document_root, p)) shutil.copytree(path, os.path.join(document_root, p))
else: else:
shutil.copy2(path, os.path.join(document_root, p)) shutil.copy2(path, os.path.join(document_root, p))
def installApache(self, document_root, ip=None, port=None): def installApache(self, document_root, ip=None, port=None):
if ip is None: if ip is None:
ip=self.getGlobalIPv6Address() ip=self.getGlobalIPv6Address()
......
...@@ -41,7 +41,9 @@ class Recipe(GenericBaseRecipe): ...@@ -41,7 +41,9 @@ class Recipe(GenericBaseRecipe):
password = password_file.read() password = password_file.read()
options['password'] = password options['password'] = password
update = install = lambda self: [] def install(self):
os.chmod(self.options['file'], 0600)
return []
class StablePasswordGeneratorRecipe(GenericBaseRecipe): class StablePasswordGeneratorRecipe(GenericBaseRecipe):
""" """
......
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import logging
from slapos import slap as slapmodule
class Recipe(object):
""" Request a SlapOS instance. Won't fail if instance is not ready.
"""
def __init__(self, buildout, name, options):
self.logger = logging.getLogger(name)
slap = slapmodule.slap()
self.software_release_url = options['software-url']
self.name = options['name']
slap.initializeConnection(options['server-url'],
options.get('key-file'),
options.get('cert-file'),
)
computer_partition = slap.registerComputerPartition(
options['computer-id'], options['partition-id'])
self.request = computer_partition.request
self.isSlave = False
if 'slave' in options:
self.isSlave = options['slave'].lower() in ['y', 'yes', 'true', '1']
self.return_parameters = []
if 'return' in options:
self.return_parameters = [str(parameter).strip()
for parameter in options['return'].split()]
else:
self.logger.debug("No parameter to return to main instance."
"Be careful about that...")
software_type = 'RootSoftwareInstance'
if 'software-type' in options:
software_type = options['software-type']
filter_kw = {}
if 'sla' in options:
for sla_parameter in options['sla'].split():
filter_kw[sla_parameter] = options['sla-%s' % sla_parameter]
partition_parameter_kw = {}
if 'config' in options:
for config_parameter in options['config'].split():
partition_parameter_kw[config_parameter] = \
options['config-%s' % config_parameter]
self.instance = self.request(options['software-url'], software_type,
self.name, partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, shared=self.isSlave)
self.failed = None
for param in self.return_parameters:
try:
options['connection-%s' % param] = str(
self.instance.getConnectionParameter(param))
except slapmodule.NotFoundError:
options['connection-%s' % param] = ''
if self.failed is None:
self.failed = param
def install(self):
if self.failed is not None:
# Check instance status to know if instance has been deployed
try:
status = self.instance.getState()
except slapmodule.NotFoundError:
status = 'not ready yet'
except AttributeError:
status = 'unknown'
error_message = 'Connection parameter %s not found. '\
'Requested instance is currently %s. If this error persists, '\
'check status of this instance.' % (self.failed, status)
self.logger.error(error_message)
return []
update = install
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# #
############################################################################## ##############################################################################
# XXX-Cedric : This is an import of # XXX-Cedric : This is an import of
# http://git.erp5.org/gitweb/erp5.git/blob/HEAD:/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py # http://git.erp5.org/gitweb/erp5.git/blob/HEAD:/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
# Modification of the present file should be ported back to this original file. # Modification of the present file should be ported back to this original file.
import os import os
......
...@@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe): ...@@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe):
runner = self.createPythonScript( runner = self.createPythonScript(
self.options['runner-path'], self.options['runner-path'],
__name__+'.testrunner.run', __name__+'.testrunner.run',
arguments=[self.options['suite-url'], arguments=[self.options['suite-url'],
self.options['report-url'], self.options['report-url'],
self.options['report-project'], self.options['report-project'],
self.options['browser'], self.options['browser'],
......
...@@ -57,7 +57,7 @@ def run(args): ...@@ -57,7 +57,7 @@ def run(args):
# There is no test that can take more them 24 hours # There is no test that can take more them 24 hours
timeout = 2.0 * 60 * 60 timeout = 2.0 * 60 * 60
while True: while True:
erp5_report = ERP5TestReportHandler(report_url, erp5_report = ERP5TestReportHandler(report_url,
project + '@' + config['suite_name']) project + '@' + config['suite_name'])
...@@ -82,11 +82,11 @@ def run(args): ...@@ -82,11 +82,11 @@ def run(args):
if process.pid: if process.pid:
os.kill(process.pid, signal.SIGTERM) os.kill(process.pid, signal.SIGTERM)
print("Test has finished and Firefox has been killed.") print("Test has finished and Firefox has been killed.")
erp5_report.reportFinished(getStatus(config['base_url']).encode("utf-8", erp5_report.reportFinished(getStatus(config['base_url']).encode("utf-8",
"replace")) "replace"))
print("Test finished and report sent, sleeping.") print("Test finished and report sent, sleeping.")
except urllib2.URLError, urlError: except urllib2.URLError, urlError:
print "Error: %s" % urlError.msg print "Error: %s" % urlError.msg
......
...@@ -49,23 +49,23 @@ class SheepDogTestBed(BaseSlapRecipe): ...@@ -49,23 +49,23 @@ class SheepDogTestBed(BaseSlapRecipe):
def run_sheepdog_test(self): def run_sheepdog_test(self):
""" Launch sheepdog test process. """ """ Launch sheepdog test process. """
sheepdog_test_config = {} sheepdog_test_config = {}
sheepdog_test_config.update(self.options) sheepdog_test_config.update(self.options)
sheepdog_test_config.update(self.parameter_dict) sheepdog_test_config.update(self.parameter_dict)
sheepdog_test_config['address'] = self.getGlobalIPv6Address() sheepdog_test_config['address'] = self.getGlobalIPv6Address()
sheepdog_test_config['report_path'] = self.log_directory sheepdog_test_config['report_path'] = self.log_directory
if 'nb_server_max' not in sheepdog_test_config: if 'nb_server_max' not in sheepdog_test_config:
sheepdog_test_config['nb_server_max'] = 0 sheepdog_test_config['nb_server_max'] = 0
if 'nb_tester_max' not in sheepdog_test_config: if 'nb_tester_max' not in sheepdog_test_config:
sheepdog_test_config['nb_tester_max'] = 3 sheepdog_test_config['nb_tester_max'] = 3
if 'nb_thread' not in sheepdog_test_config: if 'nb_thread' not in sheepdog_test_config:
sheepdog_test_config['nb_thread'] = 1 sheepdog_test_config['nb_thread'] = 1
if 'nb_request' not in sheepdog_test_config: if 'nb_request' not in sheepdog_test_config:
sheepdog_test_config['nb_request'] = 1000 sheepdog_test_config['nb_request'] = 1000
...@@ -81,7 +81,7 @@ class SheepDogTestBed(BaseSlapRecipe): ...@@ -81,7 +81,7 @@ class SheepDogTestBed(BaseSlapRecipe):
sheepdog_test_connection = {} sheepdog_test_connection = {}
sheepdog_test_connection['url'] = "http://["+sheepdog_test_config['address']+"]:5000/" sheepdog_test_connection['url'] = "http://["+sheepdog_test_config['address']+"]:5000/"
self.computer_partition.setConnectionDict(sheepdog_test_connection) self.computer_partition.setConnectionDict(sheepdog_test_connection)
nosqltester_manager_wrapper_template_location = pkg_resources.resource_filename( nosqltester_manager_wrapper_template_location = pkg_resources.resource_filename(
__name__, os.path.join( __name__, os.path.join(
'template', 'nosqltester_manager_run.in')) 'template', 'nosqltester_manager_run.in'))
......
...@@ -28,6 +28,7 @@ from getpass import getpass ...@@ -28,6 +28,7 @@ from getpass import getpass
import pwd import pwd
import grp import grp
import os import os
import shlex
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
...@@ -38,7 +39,9 @@ def login_shell(args): ...@@ -38,7 +39,9 @@ def login_shell(args):
if entered_password != password: if entered_password != password:
return 1 return 1
else: else:
os.execl(args['shell'], args['shell']) commandline = shlex.split(args['shell'])
path = commandline[0]
os.execv(path, commandline)
def shellinabox(args): def shellinabox(args):
certificate_dir = args['certificate_dir'] certificate_dir = args['certificate_dir']
...@@ -69,6 +72,14 @@ def shellinabox(args): ...@@ -69,6 +72,14 @@ def shellinabox(args):
'-p', args['port'], '-p', args['port'],
] ]
# XXX: By default shellinbox drop privileges
# switching to nobody:nogroup user.
# This force root.
if group == 'root':
command_line.extend(['-g', group])
if user == 'root':
command_line.extend(['-u', group])
os.execv(command_line[0], command_line) os.execv(command_line[0], command_line)
......
...@@ -11,7 +11,7 @@ class SipTesterRecipe(BaseSlapRecipe): ...@@ -11,7 +11,7 @@ class SipTesterRecipe(BaseSlapRecipe):
def _createPJSUAConfiguration(self, template_name): def _createPJSUAConfiguration(self, template_name):
pjsua_input = pkg_resources.resource_string(__name__, os.path.join( pjsua_input = pkg_resources.resource_string(__name__, os.path.join(
'template', template_name)) 'template', template_name))
if self._writeFile(self.pjsua_configuration_file, if self._writeFile(self.pjsua_configuration_file,
pjsua_input % self.options): pjsua_input % self.options):
# XXX: How to inform slap/slapgrid that something changed and it might # XXX: How to inform slap/slapgrid that something changed and it might
# be not bad idea to restart CP? # be not bad idea to restart CP?
...@@ -30,7 +30,7 @@ class SipTesterRecipe(BaseSlapRecipe): ...@@ -30,7 +30,7 @@ class SipTesterRecipe(BaseSlapRecipe):
d['siptester_binary'] = os.path.join(self.buildout['software_definition' d['siptester_binary'] = os.path.join(self.buildout['software_definition'
]['software_home'].strip(), 'bin', 'siptester') ]['software_home'].strip(), 'bin', 'siptester')
self.running_wrapper_location = pkg_resources.resource_filename(__name__, os.path.join( self.running_wrapper_location = pkg_resources.resource_filename(__name__, os.path.join(
'template', 'template',
self.wrapper_template)) self.wrapper_template))
self._createRunningWrapper(d) self._createRunningWrapper(d)
return [path, wrapper_path] return [path, wrapper_path]
......
...@@ -58,6 +58,7 @@ class Recipe(GenericBaseRecipe): ...@@ -58,6 +58,7 @@ class Recipe(GenericBaseRecipe):
supervisord_config=os.path.join(self.instance_directory, 'etc', supervisord_config=os.path.join(self.instance_directory, 'etc',
'supervisord.conf'), 'supervisord.conf'),
runner_workdir=self.workdir, runner_workdir=self.workdir,
etc_dir=self.options['etc_dir'],
runner_host=self.ipv6, runner_host=self.ipv6,
runner_port=self.runner_port, runner_port=self.runner_port,
ipv4_address=self.ipv4, ipv4_address=self.ipv4,
...@@ -71,7 +72,7 @@ class Recipe(GenericBaseRecipe): ...@@ -71,7 +72,7 @@ class Recipe(GenericBaseRecipe):
private_key=self.options['private_key'], private_key=self.options['private_key'],
cloud9_url=self.cloud9_url cloud9_url=self.cloud9_url
) )
config_file = self.createFile(self.options['slapos.cfg'], config_file = self.createFile(self.options['slapos.cfg'],
self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'), self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'),
configuration)) configuration))
...@@ -81,8 +82,9 @@ class Recipe(GenericBaseRecipe): ...@@ -81,8 +82,9 @@ class Recipe(GenericBaseRecipe):
PATH=os.path.dirname(self.options['git-binary']) + ':' + os.environ['PATH'], PATH=os.path.dirname(self.options['git-binary']) + ':' + os.environ['PATH'],
GIT_SSH=self.options['ssh_client'] GIT_SSH=self.options['ssh_client']
) )
launch_args = [self.options['slaprunner'].strip(), config_file]
launch_args = [self.options['slaprunner'].strip(), config_file, '--debug'] if self.optionIsTrue('debug', default=False):
launch_args.append('--debug')
wrapper = self.createPythonScript(self.options['wrapper'], wrapper = self.createPythonScript(self.options['wrapper'],
'slapos.recipe.librecipe.execute.executee', 'slapos.recipe.librecipe.execute.executee',
......
...@@ -19,6 +19,7 @@ runner_host = %(runner_host)s ...@@ -19,6 +19,7 @@ runner_host = %(runner_host)s
runner_port = %(runner_port)s runner_port = %(runner_port)s
ipv4_address = %(ipv4_address)s ipv4_address = %(ipv4_address)s
ipv6_address = %(ipv6_address)s ipv6_address = %(ipv6_address)s
etc_dir = %(etc_dir)s
[slapproxy] [slapproxy]
host = %(proxy_host)s host = %(proxy_host)s
......
...@@ -120,7 +120,7 @@ class Recipe: ...@@ -120,7 +120,7 @@ class Recipe:
self.getLocalIPv4Address()) self.getLocalIPv4Address())
buildout.set('slap-network-information', 'global-ipv6', buildout.set('slap-network-information', 'global-ipv6',
self.getGlobalIPv6Address()) self.getGlobalIPv6Address())
buildout.set('slap-network-information', 'network-interface', buildout.set('slap-network-information', 'network-interface',
self.getNetworkInterface()) self.getNetworkInterface())
# Copy/paste slap_connection # Copy/paste slap_connection
...@@ -128,6 +128,8 @@ class Recipe: ...@@ -128,6 +128,8 @@ class Recipe:
for key, value in self.buildout['slap_connection'].iteritems(): for key, value in self.buildout['slap_connection'].iteritems():
# XXX: Waiting for SlapBaseRecipe to use dash instead of underscores # XXX: Waiting for SlapBaseRecipe to use dash instead of underscores
buildout.set('slap-connection', key.replace('_', '-'), value) buildout.set('slap-connection', key.replace('_', '-'), value)
# XXX: Needed for lxc. Use non standard API
buildout.set('slap-connection', 'requested', self.computer_partition._requested_state)
work_directory = os.path.abspath(self.buildout['buildout'][ work_directory = os.path.abspath(self.buildout['buildout'][
'directory']) 'directory'])
......
...@@ -42,15 +42,15 @@ class Recipe(GenericBaseRecipe): ...@@ -42,15 +42,15 @@ class Recipe(GenericBaseRecipe):
pid=self.options['pid'], pid=self.options['pid'],
) )
sphinx_conf_path = self.createFile( sphinx_conf_path = self.createFile(
self.options['configuration-file'], self.options['configuration-file'],
self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'), self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'),
config) config)
) )
# Create init script # Create init script
wrapper = self.createPythonScript( wrapper = self.createPythonScript(
self.options['wrapper'], self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute', 'slapos.recipe.librecipe.execute.execute',
[self.options['sphinx-searchd-binary'].strip(), '-c', [self.options['sphinx-searchd-binary'].strip(), '-c',
sphinx_conf_path, '--nodetach'], sphinx_conf_path, '--nodetach'],
) )
......
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
mapping = self.options.copy()
for key in ('output', 'template', 'recipe', 'mode'):
if key in mapping:
del mapping[key]
with open(self.options['output'], 'w') as output, \
open(self.options['template'], 'r') as template:
output.write(template.read() % mapping)
if 'mode' in self.options:
os.chmod(self.options['output'], int(self.options['mode'], 8))
return [self.options['output'], ]
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import shlex
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
command_line = shlex.split(self.options['command-line'])
wait_files = self.options.get('wait-for-files')
if wait_files is not None:
wait_files = [filename.strip() for filename in wait_files.split()
if filename.strip()]
environment = self.options.get('environment')
if environment is not None:
environment = {k.strip(): v.strip() for k, v in [
line.split('=')
for line in environment.split('\n')
]}
return [self.createPythonScript(
self.options['output'],
'slapos.recipe.librecipe.execute.generic_exec',
(command_line, wait_files, environment,),
)]
...@@ -124,5 +124,6 @@ class Recipe(BaseSlapRecipe): ...@@ -124,5 +124,6 @@ class Recipe(BaseSlapRecipe):
self.parameter_dict['hostname'], self.parameter_dict['hostname'],
self.parameter_dict['server']) self.parameter_dict['server'])
self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'], self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'],
name=zabbix_agentd_conf['hostname'], port=zabbix_agentd_conf['port'])) name=zabbix_agentd_conf['hostname'],
port=str(zabbix_agentd_conf['port'])))
return self.path_list return self.path_list
...@@ -229,5 +229,13 @@ ListenIP=%(ip)s ...@@ -229,5 +229,13 @@ ListenIP=%(ip)s
# Mandatory: no # Mandatory: no
# Default: # Default:
# UserParameter= # UserParameter=
UserParameter=custom_sensor.temp1,sensors | grep "temp1" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.temp2,sensors | grep "temp2" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core0,sensors | grep "Core 0" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core1,sensors | grep "Core 1" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core2,sensors | grep "Core 2" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core3,sensors | grep "Core 3" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.fan1,sensors | grep "fan1" | sed -e "s/.* //" | sed -e "s/ .*//"
UserParameter=custom_sensor.fan2,sensors | grep "fan2" | sed -e "s/.* //" | sed -e "s/ .*//"
%(user_parameter_string)s %(user_parameter_string)s
...@@ -79,7 +79,7 @@ PyXML = 0.8.4 ...@@ -79,7 +79,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
testing agent
=============
Testing agent simulates a normal user interacting with vifib master. It requests software release installation or software instance instiaction randomly from time to time. SlapOS clients then run these commands remotely. It is the testing agent determining whether an error occurs.
Usage
=====
Request a testing agent instance from vifib with following parameters:
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="configuration">[DEFAULT]
# ConfigParser's magic section.
computer_list = ["COMP-607"]
master_url = https://slap.vifib.com/
# Note that certificates are now literally in the configuration, meaning
# you may decide to specify different ones for each test. Likewise for
# master_url.
key = -----BEGIN PRIVATE KEY-----
MII[...]
[...]
-----END PRIVATE KEY-----
cert = -----BEGIN CERTIFICATE-----
MII[...]
[...]
-----END CERTIFICATE-----
[agent]
# This section is special: it contains configuration.
# Does not make use of values coming from [DEFAULT] (well, it
# necessarily contains them, but they are not used).
node_title = ...
test_title = ...
project_title = ...
task_count = 2 # Number of tests to run concurrently
report_url = # report_url, find details in erp5 for details
# All other sections are individual tests, whatever they are named.
[test-apache]
# Software release URL
url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
# Optional request_kw parameters: if not provided, will only test SR
# build. Depending on your slap version, it may be required to provide
# a "software_type" parameter, even if you want the default type.
request_kw = {
"filter_kw": {"computer_guid": "..."},
"partition_parameter_kw": {
"domain": "example.com"
}
}
# All are in seconds.
max_install_duration = 3000
max_uninstall_duration = 360
max_request_duration = 700
max_destroy_duration = 360
[impossible-apache]
url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
max_install_duration = 1
max_uninstall_duration = 1
[impossible-apache-2]
url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
max_install_duration = 660
max_uninstall_duration = 1
</parameter>
</instance>
...@@ -64,7 +64,7 @@ PyXML = 0.8.4 ...@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -6,9 +6,10 @@ extends = ...@@ -6,9 +6,10 @@ extends =
versions = versions versions = versions
# Local development # Local development
develop += develop =
${:parts-directory}/slapos.cookbook-repository ${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/cloudooo-repository ${:parts-directory}/cloudooo-repository
parts += parts +=
# Local development # Local development
slapos.cookbook-repository slapos.cookbook-repository
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -74,7 +74,7 @@ PyXML = 0.8.4 ...@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -77,7 +77,7 @@ Jinja2 = 2.6 ...@@ -77,7 +77,7 @@ Jinja2 = 2.6
Werkzeug = 0.7.1 Werkzeug = 0.7.1
buildout-versions = 1.6 buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
meld3 = 0.6.7 meld3 = 0.6.7
slapos.cookbook = 0.26 slapos.cookbook = 0.26
......
...@@ -74,7 +74,7 @@ PyXML = 0.8.4 ...@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -74,7 +74,7 @@ PyXML = 0.8.4 ...@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -5,8 +5,8 @@ extends = ...@@ -5,8 +5,8 @@ extends =
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://ftp.drupal.org/files/projects/drupal-7.14.tar.gz url = http://ftp.drupal.org/files/projects/drupal-7.15.tar.gz
md5sum = af7abd95c03ecad4e1567ed94a438334 md5sum = f42c9baccd74e1d035d61ff537ae21b4
[application-template] [application-template]
recipe = slapos.recipe.download recipe = slapos.recipe.download
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -232,7 +232,7 @@ PyXML = 0.8.5 ...@@ -232,7 +232,7 @@ PyXML = 0.8.5
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.38 # slapos.cookbook==0.38
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
gitrepo
=======
This software release allow you to get a private mono-user git
repository with web interface.
This software release only need one parameter “repos”, which is
a json object of the repos and their description.
It can receive a “title” parameter as well in order to specify
a title for gitweb interface interface.
Example
--------
::
repo = request(
software_release=gitrepo,
partiion_reference="My SlapGit",
partition_parameter_kw={
'repos': """
{
"repo": "description",
"foo": "bar"
}
""",
'title': 'optional title',
}
)
#!/usr/bin/env sh
## This is a very dirty hack
export PATH_INFO="$${REDIRECT_URL:-$PATH_INFO}"
GIT_PROJECT_ROOT='${git-repos:base-directory}' GIT_HTTP_EXPORT_ALL= exec '${:githttpbackend}' $@
#!/usr/bin/env sh
GITWEB_CONFIG='${gitweb-conf:output}' exec '${:perl}' '${:gitweb}' $@
$projectroot = '${git-repos:base-directory}';
$site_name = '${slap-parameter:title}';
our @git_base_url_list = qw(${:url-list});
# Beautiful URLs
$feature{'pathinfo'}{'default'} = [1];
$feature{'blame'}{'default'} = [1];
PidFile "${:pid-file}"
Listen ${slap-network-information:global-ipv6}:${:port}
ServerAdmin someone@email
ErrorLog "${:error-log}"
LogLevel warn
ScriptSock "${:cgid-sock}"
<Directory />
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Alias "/static/" "${:gitweb-static-dir}"
<Directory "${:gitweb-static-dir}">
Options FollowSymLinks
Order deny,allow
Allow from all
</Directory>
# This is Static Accelerated git pull
AliasMatch "^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$" "${:project-dir}/$1"
AliasMatch "^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$" "${:project-dir}/$1"
# When it can't be statically delivered, we rely on git-http-backend
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/info/[^/]+ | \
git-(upload|receive)-pack))(/push)?$" \
"${:git-http-backend}/$1"
# Everything else is gitweb interface
ScriptAlias "/" "${:gitweb-script}/"
<Location />
Order deny,allow
Allow from all
RewriteEngine On
RewriteCond %{QUERY_STRING} service=git-receive-pack
RewriteRule ^(.*)$ $1/push [END]
</Location>
<LocationMatch "(^/.*/git-receive-pack|/push)$">
AuthType Basic
AuthName "Git Push Access"
AuthBasicProvider file
AuthUserFile "${:passwd-file}"
Require valid-user
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
</LocationMatch>
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule alias_module modules/mod_alias.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule env_module modules/mod_env.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule unixd_module modules/mod_unixd.so
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
publish
httpd
httpd-conf
gitweb-conf
gitweb-cgi
gitdaemon
git-http-backend-cgi
htpasswd
pwgen
git-repos
[publish]
recipe = slapos.cookbook:publish
url = http://[$${slap-network-information:global-ipv6}]:$${httpd-conf:port}/
user = $${pwgen:user}
password = $${pwgen:password}
[httpd]
recipe = slapos.cookbook:wrapper
command-line = ${apache:location}/bin/httpd -DFOREGROUND -f "$${httpd-conf:output}"
output = $${basedirectory:services}/httpd
[httpd-conf]
recipe = slapos.recipe.template
url = ${template-httpd-conf:location}/${template-httpd-conf:filename}
output = $${rootdirectory:etc}/httpd.conf
pid-file = $${basedirectory:run}/httpd.pid
error-log = $${basedirectory:log}/httpd-errorlog.log
gitweb-static-dir = ${gitweb:location}/share/gitweb/static/
gitweb-script = $${gitweb-cgi:output}
git-http-backend = $${git-http-backend-cgi:output}
cgid-sock = $${basedirectory:run}/cgid.sock
project-dir = $${git-repos:base-directory}
passwd-file = $${htpasswd:output}
port = 8080
[gitweb-conf]
recipe = slapos.recipe.template
url = ${template-gitweb-conf:location}/${template-gitweb-conf:filename}
output = $${rootdirectory:etc}/gitweb.conf
url-list = http://[$${slap-network-information:global-ipv6}]:$${httpd-conf:port} git://[$${slap-network-information:global-ipv6}]
[gitweb-cgi]
recipe = slapos.recipe.template
url = ${template-gitweb-cgi:location}/${template-gitweb-cgi:filename}
output = $${rootdirectory:bin}/gitweb.cgi
mode = 700
perl = ${perl:location}/bin/perl
gitweb = ${gitweb:location}/share/gitweb/gitweb.cgi
[git-http-backend-cgi]
recipe = slapos.recipe.template
url = ${template-git-http-backend-cgi:location}/${template-git-http-backend-cgi:filename}
output = $${rootdirectory:bin}/git-http-backend.cgi
mode = 700
githttpbackend = ${git:location}/libexec/git-core/git-http-backend
[gitdaemon]
recipe = slapos.cookbook:wrapper
ip = $${slap-network-information:global-ipv6}
port = 9418
command-line = ${git:location}/bin/git daemon --export-all --listen=$${:ip} --port=$${:port} --interpolated-path=$${git-repos:base-directory}/%D
output = $${basedirectory:services}/git-daemon
[htpasswd]
recipe = collective.recipe.cmd
output = $${rootdirectory:etc}/httpd.htpasswd
on_install = true
on_udptae = true
cmds =
${apache:location}/bin/htpasswd -cb $${:output} $${pwgen:user} $${pwgen:password}
[pwgen]
recipe = slapos.cookbook:pwgen
file = $${buildout:directory}/.password
pwgen-binary = ${pwgen:location}/bin/pwgen
user = slapos
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/
bin = $${buildout:directory}/bin/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
git-repos = $${rootdirectory:srv}/git/
log = $${rootdirectory:var}/log/
[git-repos]
recipe = slapos.cookbook:gitinit
base-directory = $${basedirectory:git-repos}
repos = $${slap-parameter:repos}
git-binary = ${git:location}/bin/git
[slap-parameter]
title = GitSlap
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
switch-softwaretype
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-gitrepo:output}
[buildout]
extends =
../../component/apache/buildout.cfg
../../component/perl/buildout.cfg
../../component/git/buildout.cfg
../../component/pwgen/buildout.cfg
../../stack/slapos.cfg
parts =
apache
perl
git
gitweb
slapos-cookbook
template
template-gitrepo
collective-recipe-cmd
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 5917cf0a9d6cc5d6d184e89ca2d72a91
output = ${buildout:directory}/template.cfg
mode = 0644
[template-gitrepo]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-gitrepo.cfg
md5sum = 15dd1b7ea3259197b847e94342adf872
output = ${buildout:directory}/template-gitrepo.cfg
mode = 0644
[template-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
[template-gitweb-cgi]]
<= template-download
filename = gitweb.cgi.in
md5sum = 5c720202053bfba06eec6e97d8d47cd0
[template-gitweb-conf]
<= template-download
filename = gitweb.conf.in
md5sum = 580d4bd2723f7e0a44ec8fc5b360b429
[template-git-http-backend-cgi]
<= template-download
filename = git-http-backend.cgi.in
md5sum = 7e0562b0ce8d48bc8f6b422850dc53af
[template-httpd-conf]
<= template-download
filename = httpd.conf.in
md5sum = e5e6a6de32323248d11918934f6aad99
[collective-recipe-cmd]
recipe = zc.recipe.egg
eggs =
collective.recipe.cmd
[version]
slapos.cookbook = 0.64.2
# Html5 Application Server #
## Presentation ##
* Fast hosting software for static website (html5)
* Use Nginx server
## Parameter ##
download_url (string) :required
Details :
* Only tarball (tar) is supported
* Compressed format is gunzip (optional)
* Tarball must contain an index.html at its root
## How it works ##
Each time you (re)start your instance or update parameters, html5as will remove previous website then download tarball and extract it in docroot directory.
[buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${instance_html5as:output}
[buildout]
parts =
nginx_conf
downloader
launcher
mime_types
publish-connection-information
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# partition tree
# /
# |- etc/
# | |- nginx.conf
# | |- run/
# | |- html5as (binary)
# |- var/
# | |- run/
# | | |- nginx.pid
# | |- log/
# | | |- nginx.log
# | | |- nginx.access.log
# |- srv/
# | |- html5as/ (doc root)
# | | |- index.html
# | |- backup/
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
tmp = $${buildout:directory}/tmp
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
log = $${rootdirectory:var}/log
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
data = $${rootdirectory:srv}/html5as
[tempdirectory]
recipe = slapos.cookbook:mkdirectory
client_body_temp_path = $${rootdirectory:tmp}/client_body_temp_path
proxy_temp_path = $${rootdirectory:tmp}/proxy_temp_path
fastcgi_temp_path = $${rootdirectory:tmp}/fastcgi_temp_path
uwsgi_temp_path = $${rootdirectory:tmp}/uwsgi_temp_path
scgi_temp_path = $${rootdirectory:tmp}/scgi_temp_path
[html5as]
# Options
nb_workers = 2
# Network
ip = $${slap-network-information:global-ipv6}
port = 8080
# Paths
# Log
path_pid = $${basedirectory:run}/nginx.pid
path_log = $${basedirectory:log}/nginx.log
path_access_log = $${basedirectory:log}/nginx.access.log
path_error_log = $${basedirectory:log}/nginx.error.log
path_tmp = $${buildout:directory}/tmp
# Docroot
docroot = $${basedirectory:data}
default_index = $${basedirectory:data}/index.html
# Config files
path_nginx_conf = $${rootdirectory:etc}/nginx.conf
path_mime_types = $${rootdirectory:etc}/mime_types
# Executables
bin_nginx = ${nginx:location}/sbin/nginx
bin_launcher = $${basedirectory:services}/launcher
bin_downloader = $${basedirectory:services}/downloader
# Utils
path_shell = ${dash:location}/bin/dash
path_curl = ${curl:location}/bin/curl
path_tar = ${tar:location}/bin/tar
[nginx_conf]
recipe = slapos.recipe.template:jinja2
template = ${template_nginx_conf:location}/${template_nginx_conf:filename}
rendered = $${html5as:path_nginx_conf}
context =
section param_html5as html5as
section param_tempdir tempdirectory
[mime_types]
recipe = slapos.recipe.template:jinja2
template = ${template_mime_types:location}/${template_mime_types:filename}
rendered = $${html5as:path_mime_types}
[downloader]
recipe = slapos.recipe.template:jinja2
template = ${template_downloader:location}/${template_downloader:filename}
rendered = $${html5as:bin_downloader}
mode = 700
context =
section param_html5as html5as
key download_url slap-parameter:download_url
[launcher]
recipe = slapos.recipe.template:jinja2
template = ${template_launcher:location}/${template_launcher:filename}
rendered = $${html5as:bin_launcher}
mode = 700
context =
section param_html5as html5as
[publish-connection-information]
recipe = slapos.cookbook:publish
server_url = http://[$${html5as:ip}]:$${html5as:port}
[buildout]
versions = versions
extensions = buildout-versions
extends =
../../stack/slapos.cfg
../../component/nginx/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/tar/buildout.cfg
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
www.slapos.org
launchpad.net
github.com
alastairs-place.net
www.alittletooquiet.net
parts =
dash
tar
curl
nginx
eggs
template
template_nginx_conf
template_downloader
template_launcher
template_mime_types
instance_html5as
[eggs]
recipe = z3c.recipe.scripts
eggs = slapos.cookbook
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = 918e0d6513e4d1c92051431d83261dab
mode = 0644
[instance_html5as]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance_html5as.cfg
output = ${buildout:directory}/template_html5as.cfg
md5sum = 579eceb768e8d25fb53338fc4fac6944
mode = 0644
[template_nginx_conf]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/nginx_conf.in
md5sum = 0ae1fb1c777c332d76f680c681a4f48a
filename = nginx_conf.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template_launcher]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/launcher.in
md5sum = acf5bb55ceac2e826259d28ed5c1de3a
filename = launcher.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template_downloader]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/downloader.in
md5sum = 7b374a03f4086fcae47491d449da1f09
filename = downloader.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template_mime_types]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/mime_types.in
md5sum = 4ef94a7b458d885cd79ba0b930a5727e
filename = mime_types.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[versions]
zc.buildout = 1.6.0-dev-SlapOS-006
Jinja2 = 2.6
Pygments = 1.5
Werkzeug = 0.8.3
buildout-versions = 1.7
docutils = 0.9.1
hexagonit.recipe.cmmi = 1.6
ipython = 0.13
meld3 = 0.6.8
slapos.cookbook = 0.61
slapos.recipe.template = 2.4.2
slapos.recipe.download = 1.0.dev-r4053
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.28.2
Flask = 0.9
# Required by:
# slapos.cookbook==0.61
PyXML = 0.8.4
# Required by:
# netaddr==0.7.7
Sphinx = 1.1.3
# Required by:
# slapos.cookbook==0.61
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.61
# slapos.core==0.28.2
# xml-marshaller==0.9.7
lxml = 2.3.5
# Required by:
# slapos.cookbook==0.61
netaddr = 0.7.7
# Required by:
# slapos.core==0.28.2
netifaces = 0.8
# Required by:
# slapos.cookbook==0.61
# slapos.core==0.28.2
# zc.buildout==1.6.0-dev-SlapOS-006
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.61
slapos.core = 0.28.2
# Required by:
# slapos.core==0.28.2
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.61
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.61
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.28.2
zope.interface = 4.0.1
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
[networkcache]
# signature certificates of the following uploaders.
# Łukasz Nowak
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJANLesB1hoQIEMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMTMyMCAXDTEyMDgyODE0MjEyOFoYDzIxMTIwODA0MTQyMTI4WjAT
MREwDwYDVQQDDAhDT01QLTEzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
9ED8i6211znu1Z0milwuNZCLlmQlFP590neGjvSRla7wzIBwWreNAX2Hl05sd1og
PFZBSeWsStFHQRqjNYOx1WoS4olRGIAwiwLh3Hgmkc8oOe7/q3W22xOZTUXOIiq1
FV96jUHe9RmZ910VqLPCMK44aCTmabSCWwk4OfRzI3kCAwEAAaNQME4wHQYDVR0O
BBYEFBgvpmTAS/O9vfvSLnwKy/eJC/NAMB8GA1UdIwQYMBaAFBgvpmTAS/O9vfvS
LnwKy/eJC/NAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAM3qIP3sY
DtqzUJJ7WEbD0dcniHGEycOk/3EKB663jULar+KOuTIFmMGOy5MVWcDsCqjODWXK
9LnVeCSkC4Ct8kvkT/WdRFF/nqprbZ6bUrhx2yAKTH6CMhIjDJ8F7fAkH48fLD7M
HPuwnRO7OewFpzT/gfQgFKpmVBNUYq7YddE=
-----END CERTIFICATE-----
#! {{ param_html5as['path_shell'] }}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
# Remove exsistant website
rm -r {{ param_html5as['docroot'] }}/*
# Download and extract website tarball into docroot directory
exec {{ param_html5as['path_curl'] }} -s {{ download_url }} | {{ param_html5as['path_tar'] }} -z -x -C {{ param_html5as['docroot'] }}
#! {{ param_html5as['path_shell'] }}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
# Run nginx
exec {{ param_html5as['bin_nginx'] }} -c {{ param_html5as['path_nginx_conf'] }}
types {
text/html html htm shtml;
text/css css;
text/xml xml rss;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.ms-excel xls;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;
application/ogg ogx;
audio/midi mid midi kar;
audio/mpeg mpga mpega mp2 mp3 m4a;
audio/ogg oga ogg spx;
audio/x-realaudio ra;
audio/webm weba;
video/3gpp 3gpp 3gp;
video/mp4 mp4;
video/mpeg mpeg mpg mpe;
video/ogg ogv;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
worker_processes {{ param_html5as['nb_workers'] }};
pid {{ param_html5as['path_pid'] }};
error_log {{ param_html5as['path_error_log'] }};
daemon off;
events {
worker_connections 1024;
accept_mutex off;
}
http {
include {{ param_html5as['path_mime_types'] }};
default_type application/octet-stream;
access_log {{ param_html5as['path_access_log'] }} combined;
index index.html;
server {
listen [{{ param_html5as['ip'] }}]:{{ param_html5as['port'] }};
server_name _;
keepalive_timeout 5;
client_body_temp_path {{ param_tempdir['client_body_temp_path'] }};
proxy_temp_path {{ param_tempdir['proxy_temp_path'] }};
fastcgi_temp_path {{ param_tempdir['fastcgi_temp_path'] }};
uwsgi_temp_path {{ param_tempdir['uwsgi_temp_path'] }};
scgi_temp_path {{ param_tempdir['scgi_temp_path'] }};
# path for static files
root {{ param_html5as['docroot'] }};
}
}
...@@ -64,7 +64,7 @@ PyXML = 0.8.4 ...@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -89,7 +89,7 @@ PyXML = 0.8.5 ...@@ -89,7 +89,7 @@ PyXML = 0.8.5
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.38 # slapos.cookbook==0.38
......
...@@ -126,7 +126,7 @@ db-path = $${rootdirectory:srv}/slapmonitor_database ...@@ -126,7 +126,7 @@ db-path = $${rootdirectory:srv}/slapmonitor_database
[request-slave-frontend] [request-slave-frontend]
recipe = slapos.cookbook:request recipe = slapos.cookbook:requestoptional
software-url = $${slap-parameter:frontend-software-url} software-url = $${slap-parameter:frontend-software-url}
server-url = $${slap-connection:server-url} server-url = $${slap-connection:server-url}
key-file = $${slap-connection:key-file} key-file = $${slap-connection:key-file}
...@@ -158,3 +158,11 @@ path = $${basedirectory:promises}/frontend_promise ...@@ -158,3 +158,11 @@ path = $${basedirectory:promises}/frontend_promise
url = $${publish-kvm-frontend-connection-information:url} url = $${publish-kvm-frontend-connection-information:url}
dash_path = ${dash:location}/bin/dash dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl curl_path = ${curl:location}/bin/curl
[slap-parameter]
# Default values if not specified
frontend-instance-guid = SOFTINST-11031
frontend-software-type = frontend
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg
nbd_port = 1024
nbd_ip = debian.nbd.vifib.net
...@@ -4,24 +4,9 @@ ...@@ -4,24 +4,9 @@
# #
############################# #############################
[buildout] [buildout]
extends = instance-kvm.cfg extends = ${template-kvm:output}
[kvm-instance] [kvm-instance]
recipe = slapos.cookbook:kvm
vnc-ip = $${slap-network-information:local-ipv4}
vnc-port = 5901
nbd-ip = $${slap-parameter:nbd_ip}
nbd-port = $${slap-parameter:nbd_port}
tap = $${slap-network-information:network-interface}
disk-path = $${rootdirectory:srv}/virtual.qcow2
disk-size = 20 disk-size = 20
socket-path = $${rootdirectory:var}/qmp_socket
pid-path = $${basedirectory:run}/pid_file
smp-count = 2 smp-count = 2
ram-size = 2048 ram-size = 2048
mac-address = $${create-mac:mac-address}
runner-path = $${basedirectory:services}/kvm
controller-path = $${basedirectory:services}/kvm_controller
shell-path = ${dash:location}/bin/dash
qemu-path = ${kvm:location}/bin/qemu-system-x86_64
qemu-img-path = ${kvm:location}/bin/qemu-img
...@@ -48,7 +48,7 @@ bytes = 24 ...@@ -48,7 +48,7 @@ bytes = 24
[onetimeupload-instance] [onetimeupload-instance]
recipe = slapos.cookbook:onetimeupload recipe = slapos.cookbook:onetimeupload
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
port = 9999 port = 8080
image-path = $${rootdirectory:srv}/cdrom.iso image-path = $${rootdirectory:srv}/cdrom.iso
log-path = $${rootdirectory:log}/onetimeupload.log log-path = $${rootdirectory:log}/onetimeupload.log
shell-path = ${dash:location}/bin/dash shell-path = ${dash:location}/bin/dash
......
...@@ -50,11 +50,8 @@ versions = versions ...@@ -50,11 +50,8 @@ versions = versions
[kvm] [kvm]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.15.1/qemu-kvm-0.15.1.tar.gz url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/1.1.1/qemu-kvm-1.1.1.tar.gz
# XXX-Cedric : Upgrade to 1.0 md5sum = f8f5629b00f48192cc0467e1d31c4dd2
# url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/1.0/qemu-kvm-1.0.tar.gz
# md5sum = 00a825db46a70ba8ef9fc95da9cc7c1e
md5sum = 8800a7d6b3aa4a168ea7f78dc66c0320
configure-options = configure-options =
--disable-sdl --disable-sdl
--disable-xen --disable-xen
...@@ -133,21 +130,21 @@ command = ...@@ -133,21 +130,21 @@ command =
[template-kvm] [template-kvm]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg url = ${:_profile_base_location_}/instance-kvm.cfg
md5sum = c0f24f40e3c55a30fb584c40e81956da md5sum = 6aaa9b6ef059a2ed2f022834151086ab
output = ${buildout:directory}/template-kvm.cfg output = ${buildout:directory}/template-kvm.cfg
mode = 0644 mode = 0644
[template-kvmplus] [template-kvmplus]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvmplus.cfg url = ${:_profile_base_location_}/instance-kvmplus.cfg
md5sum = 2e35c5b2ac9ee51d8f98fb1199f011c4 md5sum = 301fbe4eaaab5648e1a933a4c853f5b9
output = ${buildout:directory}/template-kvmplus.cfg output = ${buildout:directory}/template-kvmplus.cfg
mode = 0644 mode = 0644
[template-nbd] [template-nbd]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-nbd.cfg url = ${:_profile_base_location_}/instance-nbd.cfg
md5sum = 692b3da84473fbc962bea9b371b5355b md5sum = c030e7be231aba25ee0f51703e60ce67
output = ${buildout:directory}/template-nbd.cfg output = ${buildout:directory}/template-nbd.cfg
mode = 0644 mode = 0644
...@@ -169,6 +166,7 @@ mode = 0644 ...@@ -169,6 +166,7 @@ mode = 0644
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
# Romain Courteaud # Romain Courteaud
# Cedric de Saint Martin # Cedric de Saint Martin
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
...@@ -196,97 +194,120 @@ signature-certificate-list = ...@@ -196,97 +194,120 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.9.1 apache-libcloud = 0.11.1
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
docutils = 0.9.1
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.6
lxml = 2.3.4 ipython = 0.13
lxml = 2.3.5
meld3 = 0.6.8 meld3 = 0.6.8
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.5 pycrypto = 2.6
slapos.cookbook = 0.57 slapos.cookbook = 0.60
slapos.recipe.build = 0.7 slapos.recipe.build = 0.10.2
slapos.recipe.template = 2.3 slapos.recipe.template = 2.4.1
slapos.toolbox = 0.24 slapos.toolbox = 0.28
smmap = 0.8.2 smmap = 0.8.2
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.27
# slapos.toolbox==0.24 # slapos.toolbox==0.28
Flask = 0.8 Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# slapos.toolbox==0.24 # netaddr==0.7.7
Sphinx = 1.1.3
# Required by:
# slapos.toolbox==0.28
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28
feedparser = 5.1.1 feedparser = 5.1.2
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
netaddr = 0.7.6 netaddr = 0.7.7
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.27
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# websockify==0.1-dev # websockify==0.1-dev
numpy = 1.6.1 numpy = 1.6.2
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28
paramiko = 1.7.7.1 paramiko = 1.7.7.2
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28
psutil = 0.4.1 psutil = 0.6.0
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
# slapos.core==0.24 # slapos.core==0.27
# slapos.toolbox==0.24 # slapos.toolbox==0.28
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
# slapos.toolbox==0.24 # slapos.toolbox==0.28
slapos.core = 0.24 slapos.core = 0.27
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.27
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
# slapos.toolbox==0.24 # slapos.toolbox==0.28
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.57 # slapos.cookbook==0.60
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.27
zope.interface = 3.8.0 zope.interface = 4.0.1
websockify = 0.1-dev
...@@ -46,7 +46,7 @@ Jinja2 = 2.6 ...@@ -46,7 +46,7 @@ Jinja2 = 2.6
Werkzeug = 0.8.2 Werkzeug = 0.8.2
buildout-versions = 1.7 buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
meld3 = 0.6.8 meld3 = 0.6.8
plone.recipe.command = 1.1 plone.recipe.command = 1.1
slapos.recipe.template = 2.2 slapos.recipe.template = 2.2
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/bin/mysqld
[buildout] [buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends = extends =
../../stack/lamp.cfg ../../stack/lamp/buildout.cfg
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
...@@ -28,20 +20,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -28,20 +20,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration] [application-configuration]
location = Student shall put here relative path to application top level directory where configuration shall be created location = Student shall put here relative path to application top level directory where configuration shall be created
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
#!${:bash} -e
${:test-binary} -f ${:file}
#!${:bash} -e
if [ -f ${:file} ]
then
${:test-binary} $(${:cat} ${:file}) = ${:value}
else
exit 1
fi
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
publish
rootfs
uuid
lxc-conf
shellinabox
certificate-authority
ca-shellinabox
container-promise
shellinabox-promise
rootfs-promise
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
tmp = $${buildout:directory}/tmp
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
promises = $${rootdirectory:etc}/promise
[directory]
recipe = slapos.cookbook:mkdirectory
shellinabox = $${rootdirectory:srv}/shellinabox/
ca-dir = $${rootdirectory:srv}/ca/
[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/
[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/
[rootfs]
recipe = slapos.cookbook:downloader
url = $${slap-parameter:rootfs}
md5sum = $${slap-parameter:rootfs-md5sum}
downloaded-file = $${rootdirectory:srv}/rootfs.img
downloaded-file-complete = $${:downloaded-file}.complete
binary = $${basedirectory:services}/rootfsdownload
path = ${tar:location}/bin/:${gzip:location}/bin/:${bzip2:location}/bin/:${xz-utils:location}/bin/
archive = true
[lxc-conf]
recipe = slapos.recipe.template
url = ${lxc-conf-in:location}/${lxc-conf-in:filename}
output = $${rootdirectory:etc}/lxc.conf
bridge = !!BRIDGE_NAME!!
interface = lxc$${slap-network-information:network-interface}
[passwd]
recipe = slapos.cookbook:pwgen
file = $${buildout:directory}/.password
pwgen-binary = ${pwgen:location}/bin/pwgen
[shellinabox]
recipe = slapos.cookbook:shellinabox
ipv6 = $${slap-network-information:global-ipv6}
port = 8080
shell = ${lxc:location}/bin/lxc-console -n $${uuid:uuid}
wrapper = $${rootdirectory:bin}/shellinaboxd_raw
shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
password = $${passwd:password}
directory = $${buildout:directory}/
login-shell = $${rootdirectory:bin}/login
certificate-directory = $${directory:shellinabox}
cert-file = $${directory:shellinabox}/public.crt
key-file = $${directory:shellinabox}/private.key
[ca-shellinabox]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${shellinabox:wrapper}
wrapper = $${rootdirectory:bin}/shellinaboxd
key-file = $${shellinabox:key-file}
cert-file = $${shellinabox:cert-file}
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${basedirectory:services}/ca
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}
[ca-shellinabox]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${shellinabox:wrapper}
wrapper = $${rootdirectory:bin}/shellinaboxd
key-file = $${shellinabox:key-file}
cert-file = $${shellinabox:cert-file}
[uuid]
recipe = slapos.cookbook:uuid
cache-file = $${buildout:directory}/.slapcontainername
[publish]
recipe = slapos.cookbook:publish
url = https://[$${shellinabox:ipv6}]:$${shellinabox:port}/
password = $${shellinabox:password}
[template-promise-state]
recipe = slapos.recipe.template
url = ${promise-state:location}/${promise-state:filename}
bash = ${bash:location}/bin/bash
test-binary = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
value = started
mode = 700
[container-promise]
<= template-promise-state
output = $${basedirectory:promises}/slapcontainer
file = $${buildout:directory}/.slapcontainer.state
[shellinabox-promise]
<= template-promise-state
output = $${basedirectory:promises}/shellinabox
file = $${buildout:directory}/.shellinabox.state
[rootfs-promise]
recipe = slapos.recipe.template
url = ${promise-exists:location}/${promise-exists:filename}
output = $${basedirectory:promises}/rootfs
bash = ${bash:location}/bin/bash
test-binary = ${coreutils:location}/bin/test
file = $${rootfs:downloaded-file-complete}
mode = 700
[slap-parameter]
rootfs-md5sum =
[buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-lxc:output}
[slap-connection]
# part to migrate to new - separated words
computer-id = $${slap_connection:computer_id}
partition-id = $${slap_connection:partition_id}
server-url = $${slap_connection:server_url}
software-release-url = $${slap_connection:software_release_url}
key-file = $${slap_connection:key_file}
cert-file = $${slap_connection:cert_file}
# ${slap-connection:requested}
lxc.utsname = ${uuid:uuid}
lxc.network.type = veth
lxc.network.link = ${:bridge}
lxc.network.veth.pair = ${:interface}
lxc.network.name = eth0
lxc.network.flags = up
lxc.tty = 4
lxc.pts = 1024
lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 254:0 rwm
lxc.rootfs = ${rootfs:downloaded-file}
lxc.cap.drop = sys_module sys_time sys_chroot mknod
This file explain how to easily generate a rootfs for slapcontainer,
explaining how to generate a debian rootfs.
This can be used in order to generate any rootfs.
NB: A ready to use rootfs is available at :
http://[2001:380:e0c:155:5054:ff:fe5d:a604]/debian-wheezy.tar.xz
Requirements:
=============
Any Linux distro with the following programs installed :
* LXC userland tools (for generating the rootfs)
* debootstrap (in order to use lxc-debian script)
* dpkg (a dependency of debootstrap)
* Qemu tools (providing qemu-img)
Step by step instructions explained:
====================================
First we need to generate a raw image.
1. Run ::
$ qemu-img create -f raw image-name.raw SIZE
2. Now format it (in this example we will format in in ext4) ::
$ mkfs.ext4 image-name.raw
We will used lxc-debian script provided in lxc tools in order to
generate the rootfs.
lxc-debian is run this way ::
lxc-debian -p /path/
lxc-debian will create a subdirectory in /path/ named “rootfs”,
and a configuration file in /path/.
So in order to generate the rootfs on the raw image, create rootfs
directory and mount the raw img in it.
3. ::
$ mkdir -p /path/rootfs/
$ mount image-name.raw /path/rootfs
4. Next, run the lxc-debian script ::
$ lxc-debian -p /path/
Dont forget to change the default password, before unmount it.
5. ::
$ sudo chroot /path/rootfs/ /bin/passwd
6. ::
$ umount /path/rootfs
Next, you can archive it using sparse tar, and compress it.
7. ::
$ tar -Sc image-name.raw | pxz -T8 > image-name.tar.gz
[buildout]
extends =
../../stack/slapos.cfg
../../component/lxc/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/curl/buildout.cfg
../../component/gzip/buildout.cfg
../../component/bzip2/buildout.cfg
../../component/xz-utils/buildout.cfg
../../component/tar/buildout.cfg
../../component/shellinabox/buildout.cfg
../../component/pwgen/buildout.cfg
../../component/bash/buildout.cfg
../../component/coreutils/buildout.cfg
parts =
lxml-python
template
template-lxc
lxc-conf-in
slapos-cookbook
slapos-toolbox
lxc
shellinabox
pwgen
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = c722ba58b06d3105f64fdeccbbd689bb
output = ${buildout:directory}/template.cfg
mode = 0644
[template-lxc]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-lxc.cfg
md5sum = af5e31fb41e2d31b25f172df45f29fc6
output = ${buildout:directory}/template-lxc.cfg
mode = 0644
[download]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
download-only = true
mode = 0644
[lxc-conf-in]
<= download
filename = lxc.conf.in
md5sum = b25334fc369e4e0f608bc64f14b0315d
[promise-state]
<= download
filename = check_state.sh.in
md5sum = 725fb0477f8b8778566ed4b22b25bf27
[promise-exists]
<= download
filename = check_exists.sh.in
md5sum = 60d4f5f73a3d10a3d7d7201aab977d19
[slapos-toolbox]
recipe = zc.recipe.egg
scripts = slapcontainer
eggs =
slapos.toolbox
[versions]
slapos.cookbook = 0.64.1
slapos.toolbox = 0.30
...@@ -62,7 +62,7 @@ PyXML = 0.8.4 ...@@ -62,7 +62,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -115,7 +115,7 @@ xml-marshaller = 0.9.7 ...@@ -115,7 +115,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795 setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
plone.recipe.command = 1.1 plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
......
...@@ -45,7 +45,7 @@ xml-marshaller = 0.9.7 ...@@ -45,7 +45,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795 setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
plone.recipe.command = 1.1 plone.recipe.command = 1.1
Jinja2 = 2.6 Jinja2 = 2.6
......
...@@ -77,7 +77,7 @@ Jinja2 = 2.6 ...@@ -77,7 +77,7 @@ Jinja2 = 2.6
Werkzeug = 0.8.2 Werkzeug = 0.8.2
buildout-versions = 1.7 buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
meld3 = 0.6.8 meld3 = 0.6.8
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.recipe.template = 2.2 slapos.recipe.template = 2.2
......
...@@ -4,7 +4,7 @@ import MySQLdb ...@@ -4,7 +4,7 @@ import MySQLdb
def setup(args): def setup(args):
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
sql_file = os.path.join(htdocs, "create_tables.sql") sql_file = os.path.join(htdocs, "create_tables.sql")
try: try:
conn = MySQLdb.connect (host = mysql_host, conn = MySQLdb.connect (host = mysql_host,
...@@ -19,7 +19,7 @@ def setup(args): ...@@ -19,7 +19,7 @@ def setup(args):
sql_script = f.readline() sql_script = f.readline()
conn.close() conn.close()
except: except:
return return
if __name__ == '__main__': if __name__ == '__main__':
setup(sys.argv[1:]) setup(sys.argv[1:])
\ No newline at end of file
...@@ -87,7 +87,7 @@ PyXML = 0.8.4 ...@@ -87,7 +87,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -64,7 +64,7 @@ PyXML = 0.8.4 ...@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -66,7 +66,7 @@ PyXML = 0.8.4 ...@@ -66,7 +66,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -74,7 +74,7 @@ PyXML = 0.8.4 ...@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -75,7 +75,7 @@ PyXML = 0.8.4 ...@@ -75,7 +75,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -75,7 +75,7 @@ PyXML = 0.8.4 ...@@ -75,7 +75,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -65,7 +65,7 @@ PyXML = 0.8.4 ...@@ -65,7 +65,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -66,7 +66,7 @@ PyXML = 0.8.4 ...@@ -66,7 +66,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -138,7 +138,7 @@ xml-marshaller = 0.9.7 ...@@ -138,7 +138,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795 setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
plone.recipe.command = 1.1 plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
......
...@@ -74,7 +74,7 @@ PyXML = 0.8.4 ...@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -81,7 +81,7 @@ PyXML = 0.8.4 ...@@ -81,7 +81,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.42 # slapos.cookbook==0.42
......
...@@ -64,7 +64,7 @@ PyXML = 0.8.4 ...@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -6,7 +6,9 @@ parts = ...@@ -6,7 +6,9 @@ parts =
dropbear-server-add-authorized-key dropbear-server-add-authorized-key
sshkeys-authority sshkeys-authority
publish-connection-informations publish-connection-informations
frontend-promise
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
...@@ -41,6 +43,12 @@ project = $${:home}/project ...@@ -41,6 +43,12 @@ project = $${:home}/project
software-root = $${:home}/software software-root = $${:home}/software
instance-root = $${:home}/instance instance-root = $${:home}/instance
#Create password recovery code for slaprunner
[recovery-code]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.rcode
bytes = 4
# Deploy cloud9 and slaprunner # Deploy cloud9 and slaprunner
[cloud9] [cloud9]
recipe = slapos.cookbook:cloud9 recipe = slapos.cookbook:cloud9
...@@ -49,8 +57,8 @@ port = 30000 ...@@ -49,8 +57,8 @@ port = 30000
wrapper = $${basedirectory:services}/cloud9 wrapper = $${basedirectory:services}/cloud9
working-directory = $${runnerdirectory:home} working-directory = $${runnerdirectory:home}
git-binary = ${git:location}/bin/git git-binary = ${git:location}/bin/git
node-binary = ${nodejs:location}/bin/node node-binary = ${nodejs-0.4:location}/bin/node
cloud9 = ${cloud9:location}/server.js cloud9 = ${cloud9-stable:location}/bin/cloud9.js
[slaprunner] [slaprunner]
recipe = slapos.cookbook:slaprunner recipe = slapos.cookbook:slaprunner
...@@ -65,6 +73,8 @@ working-directory = $${runnerdirectory:home} ...@@ -65,6 +73,8 @@ working-directory = $${runnerdirectory:home}
project-directory = $${runnerdirectory:project} project-directory = $${runnerdirectory:project}
software-directory = $${runnerdirectory:software-root} software-directory = $${runnerdirectory:software-root}
instance-directory = $${runnerdirectory:instance-root} instance-directory = $${runnerdirectory:instance-root}
etc_dir = $${rootdirectory:etc}
log_dir = $${basedirectory:log}
ssh_client = $${sshkeys-dropbear:wrapper} ssh_client = $${sshkeys-dropbear:wrapper}
public_key = $${sshkeys-dropbear:public-key} public_key = $${sshkeys-dropbear:public-key}
private_key = $${sshkeys-dropbear:private-key} private_key = $${sshkeys-dropbear:private-key}
...@@ -118,7 +128,7 @@ key = $${slap-parameter:authorized-key} ...@@ -118,7 +128,7 @@ key = $${slap-parameter:authorized-key}
# Request frontend # Request frontend
[request-frontend] [request-frontend]
<= slap-connection <= slap-connection
recipe = slapos.cookbook:request recipe = slapos.cookbook:requestoptional
name = Frontend name = Frontend
# XXX We have hardcoded SR URL here. # XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
...@@ -135,8 +145,25 @@ backend_url = $${slaprunner:access-url} ...@@ -135,8 +145,25 @@ backend_url = $${slaprunner:access-url}
url = $${request-frontend:connection-site_url} url = $${request-frontend:connection-site_url}
cloud9_url = $${cloud9:access-url} cloud9_url = $${cloud9:access-url}
ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port} ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port}
password_recovery_code = $${recovery-code:passwd}
[slap-parameter] [slap-parameter]
# Default value if no ssh key is specified # Default value if no ssh key is specified
authorized-key = authorized-key =
# Deploy promises scripts
#[promise]
#recipe = slapos.cookbook:check_port_listening
#path = $${basedirectory:promises}/apache
#hostname = $${apache-php:ip}
#port = $${apache-php:port}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[buildout] [buildout]
extends = extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/flask.cfg ../../stack/flask.cfg
...@@ -6,11 +7,12 @@ extends = ...@@ -6,11 +7,12 @@ extends =
../../component/dropbear/buildout.cfg ../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
../../component/cloud9/buildout.cfg ../../component/cloud9/buildout.cfg
../../component/dash/buildout.cfg
parts = parts =
template template
eggs
slapos-cookbook slapos-cookbook
eggs
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
...@@ -23,13 +25,14 @@ md5sum = 5307e4200f044ae57b504ad68444491c ...@@ -23,13 +25,14 @@ md5sum = 5307e4200f044ae57b504ad68444491c
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg output = ${buildout:directory}/template-runner.cfg
md5sum = 0ddddd0be595df4fb15d55e566cc3bc3 md5sum = 82bf13fafa017245e853afad20ea3704
mode = 0644 mode = 0644
[slapos-cookbook] [eggs]
eggs += recipe = z3c.recipe.scripts
eggs =
slapos.libnetworkcache slapos.libnetworkcache
slapos.toolbox slapos.toolbox[flask_auth]
slapos.core slapos.core
[networkcache] [networkcache]
...@@ -51,102 +54,109 @@ signature-certificate-list = ...@@ -51,102 +54,109 @@ signature-certificate-list =
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions] [versions]
Flask-Auth = 0.8
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5 Pygments = 1.5
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.10.1 apache-libcloud = 0.11.1
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
docutils = 0.9 docutils = 0.9.1
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.1 hexagonit.recipe.cmmi = 1.6
ipython = 0.12.1 ipython = 0.13
meld3 = 0.6.8 meld3 = 0.6.8
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.6 pycrypto = 2.6
slapos.cookbook = 0.53 slapos.cookbook = 0.61
slapos.libnetworkcache = 0.12 slapos.libnetworkcache = 0.12
slapos.recipe.build = 0.9 slapos.recipe.template = 2.4.1
slapos.recipe.template = 2.4 slapos.toolbox = 0.28.2
slapos.toolbox = 0.26
smmap = 0.8.2 smmap = 0.8.2
z3c.recipe.scripts = 1.0.1
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.2
Flask = 0.8 # slapos.toolbox==0.28.2
Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28.2
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.cookbook==0.61
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# netaddr==0.7.7 # netaddr==0.7.7
Sphinx = 1.1.3 Sphinx = 1.1.3
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28.2
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28.2
feedparser = 5.1.2 feedparser = 5.1.2
# Required by: # Required by:
# slapos.cookbook==0.53 # hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.cookbook==0.61
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.core==0.28.2
# slapos.core==0.26.1 # slapos.toolbox==0.28.2
# xml-marshaller==0.9.7 # xml-marshaller==0.9.7
lxml = 2.3.4 lxml = 2.3.5
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.cookbook==0.61
netaddr = 0.7.7 netaddr = 0.7.7
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.2
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28.2
paramiko = 1.7.7.2 paramiko = 1.7.7.2
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.28.2
psutil = 0.4.1 psutil = 0.6.1
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.cookbook==0.61
# slapos.core==0.26.1 # slapos.core==0.28.2
# slapos.libnetworkcache==0.12 # slapos.libnetworkcache==0.12
# slapos.toolbox==0.24 # slapos.toolbox==0.28.2
# supervisor==3.0a12 # supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-004 # zc.buildout==1.6.0-dev-SlapOS-006
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
# zope.interface==4.0.1 # zope.interface==4.0.1
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.cookbook==0.61
slapos.core = 0.26.1 slapos.core = 0.28.2
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.2
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.cookbook==0.61
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.53 # slapos.cookbook==0.61
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.26.1 # slapos.core==0.28.2
zope.interface = 4.0.1 zope.interface = 4.0.1
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -63,7 +63,7 @@ PyXML = 0.8.4 ...@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -64,7 +64,7 @@ PyXML = 0.8.4 ...@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -40,7 +40,7 @@ xml-marshaller = 0.9.7 ...@@ -40,7 +40,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
plone.recipe.command = 1.1 plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
......
[buildout] [buildout]
extends = extends =
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
../../component/zabbix/buildout.cfg ../../component/zabbix/buildout.cfg
../../component/lxml-python/buildout.cfg ../../stack/slapos.cfg
find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
parts = parts =
eggs slapos-cookbook
template template
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
[template] [template]
# Default template for the instance. # Default template for the instance.
recipe = slapos.recipe.template recipe = slapos.recipe.template
...@@ -33,493 +18,93 @@ md5sum = 98a680fe8fddce5dcee455e65c228fde ...@@ -33,493 +18,93 @@ md5sum = 98a680fe8fddce5dcee455e65c228fde
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[versions] [networkcache]
zc.buildout = 1.5.3-dev-SlapOS-001 # signature certificates of the following uploaders.
Jinja2 = 2.5.5 # Cedric de Saint Martin
Werkzeug = 0.6.2 signature-certificate-list =
buildout-versions = 1.6 -----BEGIN CERTIFICATE-----
hexagonit.recipe.cmmi = 1.5.0 MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
lxml = 2.3 BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
meld3 = 0.6.7 MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
slapos.recipe.template = 1.1 wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
# Required by: P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
# slapos.core==0.2 BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
Flask = 0.6.1 cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
# Required by: Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
# slapos.cookbook==0.4 If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
PyXML = 0.8.4 -----END CERTIFICATE-----
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.5
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:01:36.219846
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.5
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by: [versions]
# slapos.cookbook==0.4 Jinja2 = 2.6
slapos.core = 0.2 Pygments = 1.5
Werkzeug = 0.8.3
# Required by: buildout-versions = 1.7
# slapos.core==0.2 docutils = 0.9.1
supervisor = 3.0a10 hexagonit.recipe.cmmi = 1.6
ipython = 0.13
# Required by: meld3 = 0.6.8
# slapos.cookbook==0.4 slapos.cookbook = 0.59
xml-marshaller = 0.9.7 slapos.recipe.template = 2.4
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:15:31.979623
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:16:55.921352
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:17:42.100375
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:19:50.709164
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.core==0.26.2
zope.interface = 3.6.3 Flask = 0.9
# Added by Buildout Versions at 2011-06-13 10:39:36.870559
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by: # Required by:
# slapos.core==0.2 # hexagonit.recipe.cmmi==1.6
Flask = 0.6.1 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.4 # slapos.cookbook==0.59
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# slapos.recipe.template==1.1 # netaddr==0.7.7
collective.recipe.template = 1.8 Sphinx = 1.1.3
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.cookbook==0.59
zope.interface = 3.6.3 inotifyx = 0.2.0
# Added by Buildout Versions at 2011-06-13 10:41:41.115948
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.cookbook = 0.5
slapos.recipe.template = 1.1
# Required by: # Required by:
# slapos.core==0.2 # slapos.cookbook==0.59
Flask = 0.6.1 # slapos.core==0.26.2
# xml-marshaller==0.9.7
# Required by: lxml = 2.3.4
# slapos.cookbook==0.5
PyXML = 0.8.4
# Required by: # Required by:
# slapos.recipe.template==1.1 # slapos.cookbook==0.59
collective.recipe.template = 1.8 netaddr = 0.7.7
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # slapos.core==0.26.2
hexagonit.recipe.download = 1.5.0 netifaces = 0.8
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
# slapos.core==0.2 # slapos.core==0.26.2
netaddr = 0.7.3 # zc.buildout==1.6.0-dev-SlapOS-006
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.5
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
setuptools = 0.6c11 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
slapos.core = 0.2 slapos.core = 0.26.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.core==0.26.2
supervisor = 3.0a10 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.core==0.26.2
zope.interface = 3.6.3 zope.interface = 4.0.1
...@@ -4,7 +4,7 @@ import fileinput ...@@ -4,7 +4,7 @@ import fileinput
def setup(args): def setup(args):
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
admin_dir = "admin-" + mysql_user admin_dir = "admin-" + mysql_user
admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php") admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php")
searchPattern = "/admin" searchPattern = "/admin"
...@@ -17,4 +17,4 @@ def setup(args): ...@@ -17,4 +17,4 @@ def setup(args):
os.chmod(admin_include_file, 0444) os.chmod(admin_include_file, 0444)
if __name__ == '__main__': if __name__ == '__main__':
setup(sys.argv[1:]) setup(sys.argv[1:])
\ No newline at end of file
...@@ -76,7 +76,7 @@ PyXML = 0.8.4 ...@@ -76,7 +76,7 @@ PyXML = 0.8.4
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.34 # slapos.cookbook==0.34
......
...@@ -145,7 +145,7 @@ parts = ...@@ -145,7 +145,7 @@ parts =
[slapos.cookbook-repository] [slapos.cookbook-repository]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
branch = erp5-component branch = erp5
revision = revision =
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = "${git:location}/bin/git" clone --branch "${:branch}" --quiet http://git.erp5.org/repos/slapos.git "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi command = "${git:location}/bin/git" clone --branch "${:branch}" --quiet http://git.erp5.org/repos/slapos.git "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi
......
# Stack for Flask microframework: http://flask.pocoo.org/ # Stack for Flask microframework: http://flask.pocoo.org/
[buildout] [buildout]
extends = extends =
../component/python-2.7/buildout.cfg slapos.cfg
../component/lxml-python/buildout.cfg
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
parts = parts =
eggs slapos-cookbook
flask-egg
# Unzip, as Flask can have a lot of troubles with zipped eggs
unzip = true
[eggs] [flask-egg]
python = python2.7
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
${lxml-python:egg}
Flask Flask
slapos.cookbook
[lxml-python]
python = python2.7
...@@ -66,7 +66,7 @@ mode = 0644 ...@@ -66,7 +66,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-php.cfg url = ${:_profile_base_location_}/instance-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg output = ${buildout:directory}/template-apache-php.cfg
md5sum = ae9c0f8c70a62f13eb948424c99d71e2 md5sum = 8bb0b03689d2be9566ed1ef3e96b4403
mode = 0644 mode = 0644
[template-apache-backup] [template-apache-backup]
...@@ -135,6 +135,16 @@ eggs = ...@@ -135,6 +135,16 @@ eggs =
[networkcache] [networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou # Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate # + Cedric de Saint Martin signature certificate
# List of signatures of uploaders we trust:
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent Signature
# Alain Takoudjou
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
...@@ -163,17 +173,17 @@ signature-certificate-list = ...@@ -163,17 +173,17 @@ signature-certificate-list =
hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg== hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg==
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB7jCCAVegAwIBAgIJAJWA0jQ4o9DGMA0GCSqGSIb3DQEBBQUAMA8xDTALBgNV
BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER BAMMBHg2MXMwIBcNMTExMTI0MTAyNDQzWhgPMjExMTEwMzExMDI0NDNaMA8xDTAL
MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR BgNVBAMMBHg2MXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANdJNiFsRlkH
T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5 vq2kHP2zdxEyzPAWZH3CQ3Myb3F8hERXTIFSUqntPXDKXDb7Y/laqjMXdj+vptKk
psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN 3Q36J+8VnJbSwjGwmEG6tym9qMSGIPPNw1JXY1R29eF3o4aj21o7DHAkhuNc5Tso
NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW 67fUSKgvyVnyH4G6ShQUAtghPaAwS0KvAgMBAAGjUDBOMB0GA1UdDgQWBBSjxFUE
BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk RfnTvABRLAa34Ytkhz5vPzAfBgNVHSMEGDAWgBSjxFUERfnTvABRLAa34Ytkhz5v
C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke PzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAFLDS7zNhlrQYSQO5KIj
LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss z2RJe3fj4rLPklo3TmP5KLvendG+LErE2cbKPqnhQ2oVoj6u9tWVwo/g03PMrrnL
dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2 KrDm39slYD/1KoE5kB4l/p6KVOdeJ4I6xcgu9rnkqqHzDwI4v7e8/D3WZbpiFUsY
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR vaZhjNYKWQf79l6zXfOvphzJ
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -188,39 +198,104 @@ signature-certificate-list = ...@@ -188,39 +198,104 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAIlBksrZVkK8MA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMzU3MCAXDTEyMDEyNjEwNTUyOFoYDzIxMTIwMTAyMTA1NTI4WjAT
MREwDwYDVQQDDAhDT01QLTM1NzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
ts+iGUwi44vtIfwXR8DCnLtHV4ydl0YTK2joJflj0/Ws7mz5BYkxIU4fea/6+VF3
i11nwBgYgxQyjNztgc9u9O71k1W5tU95yO7U7bFdYd5uxYA9/22fjObaTQoC4Nc9
mTu6r/VHyJ1yRsunBZXvnk/XaKp7gGE9vNEyJvPn2bkCAwEAAaNQME4wHQYDVR0O
BBYEFKuGIYu8+6aEkTVg62BRYaD11PILMB8GA1UdIwQYMBaAFKuGIYu8+6aEkTVg
62BRYaD11PILMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAMoTRpBxK
YLEZJbofF7gSrRIcrlUJYXfTfw1QUBOKkGFFDsiJpEg4y5pUk1s5Jq9K3SDzNq/W
it1oYjOhuGg3al8OOeKFrU6nvNTF1BAvJCl0tr3POai5yXyN5jlK/zPfypmQYxE+
TaqQSGBJPVXYt6lrq/PRD9ciZgKLOwEqK8w=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAPHoWu90gbsgMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
BAMMCXZpZmlibm9kZTAeFw0xMjAzMTkyMzIwNTVaFw0xMzAzMTkyMzIwNTVaMBQx
EjAQBgNVBAMMCXZpZmlibm9kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
ozBijpO8PS5RTeKTzA90vi9ezvv4vVjNaguqT4UwP9+O1+i6yq1Y2W5zZxw/Klbn
oudyNzie3/wqs9VfPmcyU9ajFzBv/Tobm3obmOqBN0GSYs5fyGw+O9G3//6ZEhf0
NinwdKmrRX+d0P5bHewadZWIvlmOupcnVJmkks852BECAwEAAaNQME4wHQYDVR0O
BBYEFF9EtgfZZs8L2ZxBJxSiY6eTsTEwMB8GA1UdIwQYMBaAFF9EtgfZZs8L2ZxB
JxSiY6eTsTEwMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAc43YTfc6
baSemaMAc/jz8LNLhRE5dLfLOcRSoHda8y0lOrfe4lHT6yP5l8uyWAzLW+g6s3DA
Yme/bhX0g51BmI6gjKJo5DoPtiXk/Y9lxwD3p7PWi+RhN+AZQ5rpo8UfwnnN059n
yDuimQfvJjBFMVrdn9iP6SfMjxKaGk6gVmI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAMNZBmoIOXPBMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMTMyMCAXDTEyMDUwMjEyMDQyNloYDzIxMTIwNDA4MTIwNDI2WjAT
MREwDwYDVQQDDAhDT01QLTEzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
6peZQt1sAmMAmSG9BVxxcXm8x15kE9iAplmANYNQ7z2YO57c10jDtlYlwVfi/rct
xNUOKQtc8UQtV/fJWP0QT0GITdRz5X/TkWiojiFgkopza9/b1hXs5rltYByUGLhg
7JZ9dZGBihzPfn6U8ESAKiJzQP8Hyz/o81FPfuHCftsCAwEAAaNQME4wHQYDVR0O
BBYEFNuxsc77Z6/JSKPoyloHNm9zF9yqMB8GA1UdIwQYMBaAFNuxsc77Z6/JSKPo
yloHNm9zF9yqMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAl4hBaJy1
cgiNV2+Z5oNTrHgmzWvSY4duECOTBxeuIOnhql3vLlaQmo0p8Z4c13kTZq2s3nhd
Loe5mIHsjRVKvzB6SvIaFUYq/EzmHnqNdpIGkT/Mj7r/iUs61btTcGUCLsUiUeci
Vd0Ozh79JSRpkrdI8R/NRQ2XPHAo+29TT70=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER
MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR
T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5
psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN
NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW
BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk
C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke
LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss
dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR
-----END CERTIFICATE-----
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5 Pygments = 1.5
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.10.1 apache-libcloud = 0.11.1
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
docutils = 0.9.1 docutils = 0.9.1
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.1 hexagonit.recipe.cmmi = 1.6
ipython = 0.12.1 ipython = 0.13
meld3 = 0.6.8 meld3 = 0.6.8
pycrypto = 2.6 pycrypto = 2.6
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.cookbook = 0.55 slapos.cookbook = 0.60
slapos.recipe.build = 0.9 slapos.recipe.build = 0.10.2
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4 slapos.recipe.template = 2.4.1
slapos.toolbox = 0.25 slapos.toolbox = 0.28
smmap = 0.8.2 smmap = 0.8.2
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
# slapos.toolbox==0.25 # slapos.toolbox==0.28
Flask = 0.8 Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.25 # slapos.toolbox==0.28
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
...@@ -228,65 +303,69 @@ PyXML = 0.8.4 ...@@ -228,65 +303,69 @@ PyXML = 0.8.4
Sphinx = 1.1.3 Sphinx = 1.1.3
# Required by: # Required by:
# slapos.toolbox==0.25 # slapos.toolbox==0.28
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.25 # slapos.toolbox==0.28
feedparser = 5.1.2 feedparser = 5.1.2
# Required by: # Required by:
# slapos.cookbook==0.55 # hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.cookbook==0.60
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
# slapos.core==0.25 # slapos.core==0.27
# xml-marshaller==0.9.7 # xml-marshaller==0.9.7
lxml = 2.3.4 lxml = 2.3.5
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
netaddr = 0.7.7 netaddr = 0.7.7
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.25 # slapos.toolbox==0.28
paramiko = 1.7.7.2 paramiko = 1.7.7.2
# Required by: # Required by:
# slapos.toolbox==0.25 # slapos.toolbox==0.28
psutil = 0.4.1 psutil = 0.6.0
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
# slapos.core==0.25 # slapos.core==0.27
# slapos.toolbox==0.25 # slapos.toolbox==0.28
# zc.buildout==1.6.0-dev-SlapOS-006 # zc.buildout==1.6.0-dev-SlapOS-006
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
# slapos.toolbox==0.25 # slapos.toolbox==0.28
slapos.core = 0.25 slapos.core = 0.27
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
# slapos.toolbox==0.25 # slapos.toolbox==0.28
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.55 # slapos.cookbook==0.60
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
zope.interface = 4.0.1 zope.interface = 4.0.1
...@@ -66,7 +66,7 @@ stunnel-binary = ${stunnel:location}/bin/stunnel ...@@ -66,7 +66,7 @@ stunnel-binary = ${stunnel:location}/bin/stunnel
remote-host = $${mariadb-urlparse:host} remote-host = $${mariadb-urlparse:host}
remote-port = $${mariadb-urlparse:port} remote-port = $${mariadb-urlparse:port}
local-host = $${slap-network-information:local-ipv4} local-host = $${slap-network-information:local-ipv4}
local-port = 3306 local-port = 33060
log-file = $${basedirectory:log}/stunnel.log log-file = $${basedirectory:log}/stunnel.log
config-file = $${directory:stunnel-conf}/stunnel.conf config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key key-file = $${directory:stunnel-conf}/stunnel.key
...@@ -201,7 +201,7 @@ command = $${logrotate:wrapper} ...@@ -201,7 +201,7 @@ command = $${logrotate:wrapper}
# Request frontend # Request frontend
[request-frontend] [request-frontend]
<= slap-connection <= slap-connection
recipe = slapos.cookbook:request recipe = slapos.cookbook:requestoptional
name = Frontend name = Frontend
# XXX We have hardcoded SR URL here. # XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
......
...@@ -9,6 +9,10 @@ parts = slapos-cookbook ...@@ -9,6 +9,10 @@ parts = slapos-cookbook
extensions += extensions +=
buildout-versions buildout-versions
# Use shacache and lxml
extends =
../component/lxml-python/buildout.cfg
# Separate from site eggs # Separate from site eggs
allowed-eggs-from-site-packages = allowed-eggs-from-site-packages =
include-site-packages = false include-site-packages = false
...@@ -17,7 +21,6 @@ exec-sitecustomize = false ...@@ -17,7 +21,6 @@ exec-sitecustomize = false
# Add location for modified non-official slapos.buildout # Add location for modified non-official slapos.buildout
find-links += find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/ http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/
# Use only quite well working sites. # Use only quite well working sites.
allow-hosts += allow-hosts +=
...@@ -51,12 +54,10 @@ networkcache-section = networkcache ...@@ -51,12 +54,10 @@ networkcache-section = networkcache
[slapos-cookbook] [slapos-cookbook]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
${lxml-python:egg}
slapos.cookbook slapos.cookbook
[versions] [versions]
# Use patched hexagonit.recipe.download from
# https://github.com/SlapOS/hexagonit.recipe.download
hexagonit.recipe.download = 1.5.1-dev-slapos-002
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-006 zc.buildout = 1.6.0-dev-SlapOS-006
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment