Commit 9f913f30 authored by Alain Takoudjou's avatar Alain Takoudjou

Merge branch 'master' into grid-computing

Conflicts:
	software/ajaxplorer/software.cfg
parents e4c1d202 95eb1ab3
......@@ -9,3 +9,5 @@ eggs/
parts/
slapos.cookbook.egg-info
.*.swp
*~
\#*\#
\ No newline at end of file
Changes
=======
0.78.4.dev (2013-07-18)
-----------------------
0.78.3 (2013-07-18)
-------------------
* slapos.cookbook:publish: Add support to publish information for slaves. [Cedric Le Ninivin]
0.78.2 (2013-07-18)
-------------------
* Fix slapos.cookbook:request: Add backward compatiblity about getInstanceGuid(). [Cedric de Saint Martin]
* slapos.cookbook:check_* promises: Add timeout to curl that is not otherwise killed by slapos promise subsystem. [Cedric de Saint Martin]
* Cloudooo: Allow any environment variables. [Yusei Tahara]
* ERP5: disable MariaDB query cache completely by 'query_cache_type = 0' for ERP5. [Kazuhiko Shiozaki]
* ERP5: enable haproxy admin socket and install haproxyctl script. [Kazuhiko Shiozaki]
* ERP5: increase the maximum number of open file descriptors before starting mysqld. [Kazuhiko Shiozaki]
* python 2.7: updated to 2.7.5 [Cedric de Saint Martin]
0.78.1 (2013-05-31)
-------------------
* Add boinc recipe: Allow to deploy an empty BOINC project. [Alain Takoudjou]
* Add boinc.app recipe: Allow to deploy and update a BOINC application into existing BOINC server instance . [Alain Takoudjou]
* Add boinc.client recipe: Allow to deploy a BOINC Client instance on SlapOS. [Alain Takoudjou]
* Add condor recipe: Allow to deploy Condor Manager or Condor worker instance on SlapOS. [Alain Takoudjou]
* Add condor.submit recipe: Allow to deploy or update application into existing Condor Manager instance. [Alain Takoudjou]
* Add redis.server recipe: Allow to deploy Redis server. [Alain Takoudjou]
* Add trac recipe: for deploying Trac and manage project with support of SVN and GIT. [Alain Takoudjou]
* Add bonjourgrid recipe: for deploying BonjourGrid Master and submit BOINC or Condor project. [Alain Takoudjou]
* Add bonjourgrid.client recipe: for deploying BonjourGrid Worker instance and execute BOINC or Condor Jobs. [Alain Takoudjou]
0.78.0 (2013-04-28)
-------------------
......
......@@ -23,6 +23,7 @@ extends =
recipe = slapos.recipe.cmmi
depends =
${mariadb:version}
${libpng:so_version}
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options =
......@@ -71,6 +72,7 @@ environment =
recipe = slapos.recipe.cmmi
depends =
${postgresql:url}
${libpng:so_version}
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options =
......
[buildout]
extends =
../apache/buildout.cfg
../python-2.7/buildout.cfg
../bzip2/buildout.cfg
../gdbm/buildout.cfg
../gettext/buildout.cfg
../libexpat/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../readline/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../file/buildout.cfg
parts =
apache-wsgi
[python2.7]
configure-options =
--enable-shared
--disable-static
--enable-ipv6
--enable-unicode=ucs4
--with-system-expat
--with-threads
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
LD_RUN_PATH=${buildout:parts-directory}/${:_buildout_section_name_}/lib
[apache-wsgi]
recipe = hexagonit.recipe.cmmi
url = http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
md5sum = f42d69190ea0c337ef259cbe8d94d985
configure-options =
--with-apxs=${apache:location}/bin/apxs
--with-python=${python2.7:location}/bin/python2.7
environment =
CPPFLAGS = -I${python2.7:location}/include/python2.7
LDFLAGS = -L${python2.7:location}/lib
......@@ -120,8 +120,9 @@ make-targets =
[apache-2.2]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = slapos.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.24.tar.gz
md5sum = 64a3392018ad60583209a16d728180d3
version = 2.2.25
url = http://mir2.ovh.net/ftp.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 9ebe3070c0bb4311f21a0cd0e34f0045
patch-options = -p1
configure-options = --disable-static
--enable-authn-alias
......@@ -182,6 +183,8 @@ environment =
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download
md5sum = 66862bf10e9be3a023e475604a28a0b4
depends =
${apache-2.2:version}
configure-command = ${apache-2.2:location}/bin/apxs
configure-options = -c mod_antiloris.c
make-binary = ${:configure-command}
......
......@@ -47,15 +47,17 @@ filename = boinc-abs-path.patch
[boinc-package]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project
command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
# Compile now boinc client
[boinc]
recipe = hexagonit.recipe.cmmi
url = ${boinc-package:location}
source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__
recipe = slapos.recipe.cmmi
url = ${boinc-package:tarball}
configure-command =
echo 'AC_PROG_OBJCXX' >> configure.ac
aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal
......
......@@ -26,29 +26,36 @@ keep-compile-dir = false
[boinc-package]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project
command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
sed -i "20i\#include <unistd.h>" ${:location}/tools/process_input_template.cpp && \
sed -i "25i\#include <unistd.h>" ${:location}/sched/single_job_assimilator.cpp && \
sed -i "27i\#include <unistd.h>" ${:location}/tools/create_work.cpp && \
sed -i 's#--prefix=$(prefix)#--prefix=/$(prefix)#' ${:location}/py/Makefile.am && \
sed -i 's#parent::base_escape_string#@parent::base_escape_string#' ${:location}/html/inc/boinc_db.inc
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
# Compile now boinc
# When installing boinc python module, path /srv/slapgrid/... is strip to srv/slapgrid... It is why
# we need to set --prefix="/${buildout:parts-directory}/${:_buildout_section_name_}"
[boinc]
recipe = hexagonit.recipe.cmmi
url = ${boinc-package:location}
recipe = slapos.recipe.cmmi
url = ${boinc-package:tarball}
keep-compile-dir = true
source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__
configure-command =
configure-command =
echo 'AC_PROG_OBJCXX' >> configure.ac
aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal
./_autosetup
./configure
configure-options =
--prefix="/${buildout:parts-directory}/${:_buildout_section_name_}"
--prefix="${buildout:parts-directory}/${:_buildout_section_name_}"
--disable-fcgi
--disable-shared
--enable-static
--with-pic
--disable-manager
--disable-client
--with-pkg-config
......@@ -59,13 +66,14 @@ configure-options =
--with-libcurl=${curl:location}/lib
--with-x=no
environment =
PATH=${pkgconfig:location}/bin:${automake:location}/bin:${autoconf:location}/bin:${libtool:location}/bin:${subversion:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
M4=${m4:location}/bin/m4
CFLAGS=-fPIC
CPPFLAGS=-I${openssl:location}/include -I${mariadb:location}/include
LDFLAGS = -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${mariadb:location}/lib -Wl,-rpath=${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
MYSQL_CONFIG=${mariadb:location}/bin/mysql_config
ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${libtool:location}/share/aclocal
\ No newline at end of file
......@@ -36,7 +36,7 @@ script =
wrapper_location = os.path.join("%(location)s", "chrome-slapos")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng:location}/lib:%(location)s
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng15:location}/lib:%(location)s
%(location)s/chrome""")
wrapper.flush()
wrapper.close()
......
......@@ -22,7 +22,7 @@ git-executable = ${git:location}/bin/git
[cloudooo]
recipe = zc.recipe.egg
python = python2.6
python = python2.7
extra-paths = ${cloudooo-repository:location}
eggs =
${lxml-python:egg}
......
......@@ -2,13 +2,6 @@
parts =
condor
libexpat
kerberos
perl
openldap
java
dash
zlib
extends =
../libexpat/buildout.cfg
......@@ -19,9 +12,35 @@ extends =
../dash/buildout.cfg
../zlib/buildout.cfg
../../stack/slapos.cfg
[condor]
recipe = hexagonit.recipe.download
url = https://doc-0c-60-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/5sp63u5v03ie9nu49dfodreb2dcomstb/1369231200000/01656987990562299665/*/0B9HYL8A0vSryTTIxX29rM0N6N28?e=download
md5sum = e7d96746fc9102ca4583f8cd5eb472e0
strip-top-level-dir = true
recipe = slapos.recipe.build
slapos_promise =
directory:bin
directory:etc
directory:examples
directory:include
directory:lib
directory:libexec
directory:man
directory:src
directory:sbin
depends =
${libexpat:location}
${kerberos:location}
${perl:location}
${openldap:location}
${java:location}
${dash:location}
${zlib:location}
x86 = http://parrot.cs.wisc.edu//symlink/20130530031504/7/7.9/7.9.5/28b36a94ad1a405bac689a76b6c353a7/condor-7.9.5-x86_Debian6-unstripped.tar.gz 227059bb9bebc9033665bb246d90a7bb
x86-64 = http://parrot.cs.wisc.edu//symlink/20130530031504/7/7.9/7.9.5/7000a12f9a22765b457e2958762871d5/condor-7.9.5-x86_64_Debian6-stripped.tar.gz 30fa4cebabb8ff4971c769f4ef74ba68
script =
if not self.options.get('path'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
\ No newline at end of file
......@@ -2,7 +2,7 @@
extends =
../xz-utils/buildout.cfg
parts =
coreutils
coreutils-output
[coreutils]
recipe = slapos.recipe.cmmi
......@@ -13,3 +13,13 @@ configure-options =
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
LDFLAGS =-Wl,--as-needed
[coreutils-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${:test} -x ${:test} -a -x ${:cat} -a -x ${:rm}
test = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
rm = ${coreutils:location}/bin/rm
......@@ -11,8 +11,8 @@ parts =
[curl]
recipe = slapos.recipe.cmmi
url = http://curl.haxx.se/download/curl-7.30.0.tar.bz2
md5sum = 0db5ec03a5001b42a2edc03bf63b5ceb
url = http://curl.haxx.se/download/curl-7.31.0.tar.bz2
md5sum = b7bea20579ac2f696338ae03f2c19ba5
configure-options =
--disable-static
--disable-ldap
......
[buildout]
extends =
../coreutils/buildout.cfg
parts = dash
parts = dash-output
[dash]
recipe = slapos.recipe.cmmi
......@@ -10,3 +12,11 @@ configure-options =
--disable-static
--disable-fnmatch
--disable-glob
[dash-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:dash}
dash = ${dash:location}/bin/dash
[buildout]
parts = dcron
extends =
../coreutils/buildout.cfg
parts = dcron-output
[dcron-hooks-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 860e914dff4108b47565965fe5ebc7b5
download-only = true
filename = dcron-hooks.py
[dcron-patch-nonroot]
recipe = hexagonit.recipe.download
md5sum = 2f5b22dc1cbe81060a9c28e6f5c06e8b
md5sum = d5408ab682b65cc1eda40d588fcd7db8
url = ${:_profile_base_location_}/${:filename}
filename = dcron-4.4.noroot.no.globals.patch
download-only = true
......@@ -18,3 +28,13 @@ patches =
patch-options = -p1
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
post-make-hook = ${dcron-hooks-download:location}/${dcron-hooks-download:filename}:post_make_hook
[dcron-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:crond} -a -x ${:crontab} -a ! -u ${:crontab}
crond = ${dcron:location}/sbin/crond
crontab = ${dcron:location}/bin/crontab
# Patch for making dcron usable without root user, as a local service
diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
--- dcron-4.4.org/chuser.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/chuser.c 2011-04-01 11:19:19.000000000 +0200
+++ dcron-4.4/chuser.c 2013-07-18 18:17:16.342147418 +0200
@@ -14,47 +14,6 @@
int
ChangeUser(const char *user, char *dochdir)
......@@ -53,7 +52,16 @@ diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
--- dcron-4.4.org/crontab.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/crontab.c 2011-04-01 11:19:19.000000000 +0200
+++ dcron-4.4/crontab.c 2013-07-18 18:18:07.768535485 +0200
@@ -88,7 +88,7 @@
break;
case 'c':
/* getopt guarantees optarg != 0 here */
- if (*optarg != 0 && getuid() == geteuid()) {
+ if (*optarg != 0) {
CDir = optarg;
} else {
printlogf(0, "-c option: superuser only");
@@ -316,9 +316,6 @@
close(filedes[0]);
......@@ -75,7 +83,7 @@ diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
ptr = PATH_VI;
diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
--- dcron-4.4.org/job.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/job.c 2011-04-01 11:19:19.000000000 +0200
+++ dcron-4.4/job.c 2013-07-18 18:17:16.342147418 +0200
@@ -62,14 +62,6 @@
* Change running state to the user in question
*/
......@@ -108,7 +116,7 @@ diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
/*
diff -ru dcron-4.4.org/Makefile dcron-4.4/Makefile
--- dcron-4.4.org/Makefile 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/Makefile 2011-04-01 11:19:35.000000000 +0200
+++ dcron-4.4/Makefile 2013-07-18 18:17:16.342147418 +0200
@@ -3,7 +3,6 @@
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
......
import os
import shutil
def post_make_hook(options, buildout):
crontab_path = os.path.join(options['location'], 'bin', 'crontab')
os.chmod(crontab_path, 0750)
......@@ -7,9 +7,10 @@
[buildout]
extends =
../zlib/buildout.cfg
../coreutils/buildout.cfg
parts =
dropbear
dropbear-output
[dropbear-userspace-patch]
recipe = hexagonit.recipe.download
......@@ -63,3 +64,12 @@ patches=
patch-options=
-p1
[dropbear-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:ssh} -a -x ${:keygen}
ssh = ${dropbear:location}/bin/dbclient
keygen = ${dropbear:location}/bin/dropbearkey
......@@ -2,6 +2,7 @@
extends =
../bzip2/buildout.cfg
../libpng/buildout.cfg
../patch/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
......@@ -28,14 +29,25 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig
[libtheora-png_sizeof.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = libtheora-png_sizeof.patch
md5sum = eaa1454081b50f05b59495a12f52b0d5
download-only = true
[libtheora]
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
md5sum = 292ab65cedd5021d6b7ddd117e07cd8e
depends =
${libpng:so_version}
patches = ${libtheora-png_sizeof.patch:location}/${libtheora-png_sizeof.patch:filename}
patch-options = -p1
configure-options =
--disable-static
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PATH=${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libvorbis:location}/lib/pkgconfig
[yasm]
......
--- libtheora-1.1.1/examples/png2theora.c.orig 2009-08-23 03:14:04.000000000 +0900
+++ libtheora-1.1.1/examples/png2theora.c 2013-07-16 12:40:07.629087870 +0900
@@ -462,9 +462,9 @@
png_set_strip_alpha(png_ptr);
row_data = (png_bytep)png_malloc(png_ptr,
- 3*height*width*png_sizeof(*row_data));
+ 3*height*width*sizeof(*row_data));
row_pointers = (png_bytep *)png_malloc(png_ptr,
- height*png_sizeof(*row_pointers));
+ height*sizeof(*row_pointers));
for(y = 0; y < height; y++) {
row_pointers[y] = row_data + y*(3*width);
}
......@@ -34,7 +34,7 @@ script =
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash
cd %(location)s
export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:{dbus:location}/lib/:${dbus-glib:location}/lib/:${freetype:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${bzip2:location}/lib/:${libXext:location}/lib/:${libXt:location}/lib/:${zlib:location}/lib/:${libXcursor:location}/lib/:${gtk-2:location}/lib/:${cairo:location}/lib/:${pango:location}/lib/:${glib:location}/lib/:${atk:location}/lib/:${gdk-pixbuf:location}/lib/:${alsa:location}/lib/:${libpng:location}/lib/:${libSM:location}/lib/:${libICE:location}/lib:${libxml2:location}/lib:${openssl:location}/lib
export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:{dbus:location}/lib/:${dbus-glib:location}/lib/:${freetype:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${bzip2:location}/lib/:${libXext:location}/lib/:${libXt:location}/lib/:${zlib:location}/lib/:${libXcursor:location}/lib/:${gtk-2:location}/lib/:${cairo:location}/lib/:${pango:location}/lib/:${glib:location}/lib/:${atk:location}/lib/:${gdk-pixbuf:location}/lib/:${alsa:location}/lib/:${libpng15:location}/lib/:${libSM:location}/lib/:${libICE:location}/lib:${libxml2:location}/lib:${openssl:location}/lib
export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/firefox $*""")
wrapper.close()
......
......@@ -19,18 +19,18 @@ md5sum = 5c781723a0d9ed6188960defba8e91cf
destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex and IPA Font - Japanese fonts provided by IPA
# http://ossipedia.ipa.go.jp/ipafont/index.html
# http://ipafont.ipa.go.jp/
[ipaex-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://ossipedia.ipa.go.jp/ipafont/ipaexfont/IPAexfont00201.php
url = http://ipafont.ipa.go.jp/ipaexfont/IPAexfont00201.php
md5sum = 7bf84182a04a9632268dbcb03f100d05
destination = ${fonts:location}/${:_buildout_section_name_}
[ipa-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip
url = http://ipafont.ipa.go.jp/ipafont/IPAfont00303.php
md5sum = 39a828acf27790adbe4944dfb4d94bb1
destination = ${fonts:location}/${:_buildout_section_name_}
......
......@@ -4,6 +4,7 @@
[buildout]
extends =
../bzip2/buildout.cfg
../libpng/buildout.cfg
../zlib/buildout.cfg
parts =
......@@ -11,10 +12,13 @@ parts =
[freetype]
recipe = slapos.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.bz2
md5sum = b93435488942486c8d0ca22e8f768034
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.1.tar.bz2
md5sum = c72e9010b1d986d556fc0b2b5fcbf31a
depends =
${libpng:so_version}
configure-options =
--disable-static
environment =
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${libpng:location}/bin:%(PATH)s
......@@ -33,7 +33,7 @@ environment =
[ppl]
recipe = slapos.recipe.cmmi
# we should use version 0.10.x for gcc-4.5
url = http://www.cs.unipr.it/ppl/Download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
url = http://bugseng.com/products/ppl/download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
md5sum = 5667111f53150618b0fa522ffc53fc3e
configure-options =
--with-libgmp-prefix=${gmp:location}
......@@ -85,9 +85,6 @@ patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as slapos.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--enable-languages="c,c++"
......@@ -97,12 +94,30 @@ configure-options =
--with-mpc=${mpc:location}
--with-ppl=${ppl:location}
--with-cloog=${cloog-ppl:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${ppl:location}/lib -Wl,-rpath=${cloog-ppl:location}/lib
PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used
make-targets = install -j1
[gcc-minimal]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-core-4.5.4.tar.bz2
md5sum = ca62e442629a9a7710f5d797bf1b521c
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
configure-options =
--disable-bootstrap
--enable-languages=c
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--without-ppl
--without-cloog
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib
# make install does not work when several core are used
make-targets = install -j1
......
......@@ -4,6 +4,7 @@
[buildout]
extends =
../curl/buildout.cfg
../gettext/buildout.cfg
../libexpat/buildout.cfg
../openssl/buildout.cfg
../zlib/buildout.cfg
......@@ -12,8 +13,8 @@ parts =
[git]
recipe = slapos.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.12.tar.gz
md5sum = ceb1a6b17a3e33bbc70eadf8fce5876c
url = http://git-core.googlecode.com/files/git-1.8.2.3.tar.gz
md5sum = 03ebfd403a8cf355da0e3f15e53b8925
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
......
......@@ -17,3 +17,7 @@ environment =
CPPFLAGS=-I${zlib:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib
PATH=${gettext:location}/bin:%(PATH)s
[x86-cygwin-glib]
patches =
${:_profile_base_location_}/cygwin-glib-2.28.8-src.patch
--- glib/gstrfuncs.c~ 2012-12-30 14:51:30.000000000 +0800
+++ glib/gstrfuncs.c 2012-12-30 14:51:50.203125000 +0800
@@ -1423,7 +1423,7 @@
#ifdef HAVE_STRSIGNAL
const char *msg_locale;
-#if defined(G_OS_BEOS) || defined(G_WITH_CYGWIN)
+#if defined(G_OS_BEOS)
extern const char *strsignal(int);
#else
/* this is declared differently (const) in string.h on BeOS */
......@@ -16,6 +16,8 @@ extends =
recipe = slapos.recipe.cmmi
url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz
md5sum = 8d26c1171f30ca3b1dc1b429f7937e58
depends =
${libpng:so_version}
configure-options =
--with-included-ltdl
--with-pngincludedir=${libpng:location}/include
......
[buildout]
extends =
../pcre/buildout.cfg
../coreutils/buildout.cfg
../xz-utils/buildout.cfg
parts =
grep
grep-output
[grep]
recipe = slapos.recipe.cmmi
......@@ -13,3 +14,11 @@ environment =
PATH=${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${pcre:location}/include
LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib
[grep-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:grep}
grep = ${grep:location}/bin/grep
......@@ -11,9 +11,9 @@ extends =
[groonga]
recipe = slapos.recipe.cmmi
version = 3.0.3
version = 3.0.5
url = http://packages.groonga.org/source/groonga/groonga-${:version}.tar.gz
md5sum = 19dbee5393b2f9c793c4caae5ba81bec
md5sum = 2894bbdd2275cb3c62aea14446dc2561
configure-options =
--disable-static
--disable-glibtest
......@@ -27,9 +27,9 @@ environment =
[groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi
version = 1.0.3
version = 1.0.5
url = http://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-${:version}.tar.gz
md5sum = 3f266c608017eb1b2e24b6bac1801ab2
md5sum = 88c0ab0d07c761877a5271e4a7f18551
location = ${groonga:location}
depends =
${groonga:version}
......
......@@ -18,6 +18,8 @@ parts =
recipe = slapos.recipe.cmmi
url = http://cairographics.org/releases/cairo-1.10.2.tar.gz
md5sum = f101a9e88b783337b20b2e26dfd26d5f
depends =
${libpng:so_version}
configure-options =
--enable-tee=yes
--enable-xlib=no
......@@ -32,6 +34,8 @@ environment =
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/pango/1.29/pango-1.29.3.tar.bz2
md5sum = be4e3891353fae6b62a6f8d7689c4266
depends =
${libpng:so_version}
configure-options =
--disable-static
# XXX-Cedric : Why, god, why do I have to supply the -lXrender option to linker?
......@@ -70,6 +74,8 @@ environment =
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.6.tar.bz2
md5sum = 421100f6597e613234f8dead6091a9fe
depends =
${libpng:so_version}
configure-options =
--disable-static
--disable-cups
......
......@@ -6,7 +6,7 @@ parts =
[gzip]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.5.tar.xz
md5sum = 2a431e169b6f62f7332ef6d47cc53bae
url = ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.6.tar.xz
md5sum = da981f86677d58a106496e68de6f8995
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
......@@ -9,8 +9,8 @@ parts = haproxy
[haproxy]
recipe = slapos.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.23.tar.gz
md5sum = 6535d5e58037ada4b58b439cebe03c79
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.24.tar.gz
md5sum = 86422620faa9759907563d5e0524b98c
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
......
......@@ -35,6 +35,8 @@ url = http://ftp.vim.org/ImageMagick/ImageMagick-6.8.2-6.tar.xz
md5sum = ee01558201041a9978dd14b1db946ce8
depends =
${libtiff:version}
${libpng:so_version}
${webp:so_version}
configure-options =
--disable-static
--without-x
......
......@@ -13,6 +13,9 @@ extends =
recipe = slapos.recipe.cmmi
url = http://leptonica.googlecode.com/files/leptonica-1.68.tar.gz
md5sum = 5cd7092f9ff2ca7e3f3e73bfcd556403
depends =
${libpng:so_version}
${webp:so_version}
configure-command =
./autogen.sh
./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static
......
......@@ -6,6 +6,7 @@ extends =
../bzip2/buildout.cfg
../imagemagick/buildout.cfg
../jbigkit/buildout.cfg
../libpng/buildout.cfg
../zlib/buildout.cfg
parts =
libdmtx
......@@ -22,6 +23,8 @@ configure-options =
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libdmtx/dmtx-utils-0.7.4.tar.bz2
md5sum = b132ab9fb1d289869469b8bb4959a08a
depends =
${libpng:so_version}
configure-options =
--disable-static
environment =
......
......@@ -21,7 +21,13 @@ environment =
url = http://download.sourceforge.net/libpng/libpng-1.2.50.tar.bz2
md5sum = 717caa58e9c71a80820eb38c4f4d6ec3
[libpng15]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.5.16.tar.xz
md5sum = fd85af68f84cbdf549147811006488c1
[libpng]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.5.14.tar.xz
md5sum = 94284b01d62ca43c5eb3f6702db08ed8
url = http://download.sourceforge.net/libpng/libpng-1.6.2.tar.xz
md5sum = 9d838f6fca9948a9f360a0cc1b516d5f
so_version = 16
......@@ -12,11 +12,11 @@ find-links =
[libreoffice-bin]
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
version = 3.6.5
version = 3.6.6
url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums
md5sum_x86 = 9575c9a567d48a9feeaed2f915bfdf7f
md5sum_x86-64 = 302e326f2b2a524a78994705ea782770
md5sum_x86 = 922935201a350a7e0d3f83c08f739ee2
md5sum_x86-64 = fa41089ce29eb03cdfb34d06a1e786db
# where office code can be found?
officedir = libreoffice3.6
......
......@@ -3,6 +3,7 @@ parts = librsvg
extends =
../bzip2/buildout.cfg
../pkgconfig/buildout.cfg
../libpng/buildout.cfg
../libxml2/buildout.cfg
../zlib/buildout.cfg
../gtk-2/buildout.cfg
......@@ -23,6 +24,8 @@ recipe = slapos.recipe.cmmi
version = 2.36.1
url = http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.4.tar.xz
md5sum = 3c94524c8ccf668e30b236f409239f54
depends =
${libpng:so_version}
configure-options =
--disable-static
--disable-gtk-theme
......
......@@ -25,10 +25,10 @@ download-only = true
[mariadb]
recipe = slapos.recipe.cmmi
version = 5.5.30
version = 5.5.32
revision = 1
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb
md5sum = 39d4da4dabc8bda012517b3587dee6f8
md5sum = 565c2dce6a2fb027c9d0ffbae4934135
# compile directory is required to build mysql plugins.
keep-compile-dir = true
patch-options = -p0
......@@ -62,8 +62,8 @@ environment =
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = slapos.recipe.cmmi
url = http://packages.groonga.org/source/mroonga/mroonga-3.03.tar.gz
md5sum = daa1547259145b05b4cdee6b513bf8c8
url = http://packages.groonga.org/source/mroonga/mroonga-3.05.tar.gz
md5sum = ba4cbd79274d832b9343a0b2fe7d0787
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
......
......@@ -14,8 +14,8 @@ parts =
[nodejs-0.8]
# Server-side Javascript.
recipe = slapos.recipe.cmmi
url = http://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz
md5sum = 284fd2c7578064c339d9cf6a3a475ac7
url = http://nodejs.org/dist/v0.8.23/node-v0.8.23.tar.gz
md5sum = 22fe54ac365f52d3d80ecf748e7323d5
configure-options =
--openssl-includes=${openssl:location}/include
--openssl-libpath=${openssl:location}/lib
......
......@@ -51,4 +51,4 @@ configure-options =
make-options =
-j1
make-targets =
install && rm -f ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/* && for i in ${ca-certificates:location}/certs/*/*.crt; do ln -sv $i ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/`${buildout:parts-directory}/${:_buildout_section_name_}/bin/openssl x509 -hash -noout -in $i`.0; done; true
all install_sw && rm -f ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/* && for i in ${ca-certificates:location}/certs/*/*.crt; do ln -sv $i ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/`${buildout:parts-directory}/${:_buildout_section_name_}/bin/openssl x509 -hash -noout -in $i`.0; done; true
......@@ -31,7 +31,7 @@ script =
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh
cd %(location)s
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng:location}/lib:${libSM:location}/lib:${libICE:location}/lib:%(location)s
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng15:location}/lib:${libSM:location}/lib:${libICE:location}/lib:%(location)s
export PATH=${fontconfig:location}/bin:$PATH
%(location)s/opera $*""")
wrapper.close()
......
......@@ -13,10 +13,11 @@ extends =
[poppler]
recipe = slapos.recipe.cmmi
md5sum = be915388eaad6865cee5a156c8119ec1
url = http://poppler.freedesktop.org/poppler-0.22.3.tar.gz
url = http://poppler.freedesktop.org/poppler-0.22.5.tar.gz
md5sum = 1cd27460f7e3379d1eb109cfd7bcdb39
depends =
${libtiff:version}
${libpng:so_version}
configure-options =
--disable-cairo-output
--disable-cms
......
......@@ -8,3 +8,6 @@ url = ftp://anduin.linuxfromscratch.org/BLFS/svn/p/popt-1.16.tar.gz
md5sum = 3743beefa3dd6247a73f8f7a32c14c33
configure-options =
--disable-static
[x86-cygwin-popt]
patches = ${:_profile_base_location_}/cygwin-popt-1.16-src.patch
\ No newline at end of file
--- poptconfig.c~ 2011-09-10 22:49:30.802250000 +0800
+++ poptconfig.c 2011-09-10 23:46:30.572048000 +0800
@@ -45,8 +45,9 @@ extern int glob_pattern_p (const char *_
#if !defined(__GLIBC__)
/* Return nonzero if PATTERN contains any metacharacters.
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
+#define glob_pattern_p glob_pattern_p_s
static int
-glob_pattern_p (const char * pattern, int quote)
+glob_pattern_p_s(const char * pattern, int quote)
/*@*/
{
const char * p;
......@@ -25,9 +25,9 @@ python = python2.7
[python2.7]
recipe = slapos.recipe.cmmi
package_version = 2.7.4
package_version = 2.7.5
package_version_suffix =
md5sum = 62704ea0f125923208d84ff0568f7d50
md5sum = 6334b666b7ff2038c761d7b27ba699c1
depends =
${gdbm:version}
......@@ -44,6 +44,9 @@ configure-options =
--enable-unicode=ucs4
--with-system-expat
--with-threads
# Profiled build:
make-binary =
make-targets = make profile-opt && make install
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
# which would otherwise load the system libmagic.so with ctypes
......
[buildout]
extends =
../openssl/buildout.cfg
parts =
python-openssl
[python-openssl]
recipe = zc.recipe.egg:custom
egg = pyOpenSSL
library-dirs =
${openssl:location}/lib/
rpath =
${openssl:location}/lib/
......@@ -15,6 +15,8 @@ recipe = slapos.recipe.cmmi
# qemu-kvm and qemu are now the same since 1.3.
url = http://wiki.qemu-project.org/download/qemu-1.4.1.tar.bz2
md5sum = eb2d696956324722b5ecfa46e41f9a75
depends =
${libpng:so_version}
configure-options =
--target-list=""
--disable-sdl
......
[buildout]
extends =
../librsync/buildout.cfg
../coreutils/buildout.cfg
parts =
rdiff-backup
rdiff-backup-output
[rdiff-backup-build]
recipe = zc.recipe.egg:custom
......@@ -24,3 +25,11 @@ eggs =
entry-points =
rdiff-backup=rdiff_backup.Main:Main
arguments = sys.argv[1:]
[rdiff-backup-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:rdiff-backup}
rdiff-backup = ${buildout:directory}/bin/rdiff-backup
......@@ -6,4 +6,4 @@ parts =
# https://github.com/ruda/rpm2cpio
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum = c5bb6227d99e1ff5df880f997cbed2e3
md5sum = aa3a5920a1d8963592be0c2666ee05e2
......@@ -3,7 +3,33 @@
#
# Standalone RPM to CPIO converter
# Copyright (c) 2012 Rudá Moura
# https://github.com/ruda/rpm2cpio
#
# Impove gzip header detection thanks to
# http://afb.users.sourceforge.net/centos/rpm2cpio.py
#
# Copyright (C) 1997,1998,1999, Roger Espel Llima
# Copyright (C) 2000, Sergey Babkin
# Copyright (C) 2009, Alex Kozlov
# Copyright (C) 2010, Anders F Bjorklund
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and any associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# SOFTWARE'S COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE
'''Extract cpio archive from RPM package.
......@@ -21,6 +47,7 @@ rpm2cpio < adjtimex-1.20-2.1.i386.rpm | cpio -it
'''
import sys
import struct
import StringIO
import gzip
......@@ -31,15 +58,35 @@ def rpm2cpio(stream_in=sys.stdin, stream_out=sys.stdout):
lead = stream_in.read(96)
if lead[0:4] != RPM_MAGIC:
raise IOError, 'the input is not a RPM package'
data = stream_in.read()
idx = data.find(GZIP_MAGIC)
if idx == -1:
raise IOError, 'could not find compressed cpio archive'
gzstream = StringIO.StringIO(data[idx:])
gzipper = gzip.GzipFile(fileobj=gzstream)
lead = stream_in.read(16)
if not lead:
raise IOError, 'No header'
while True:
(magic, ignore, sections, bytes) = struct.unpack("!LLLL", lead)
(smagic, smagic2) = struct.unpack("!HL", lead[0:6])
if smagic == 0x1f8b:
break
# skip the headers
stream_in.seek(16 * sections + bytes, 1)
while True:
lead = stream_in.read(1)
if lead == "":
raise IOError, 'No header'
if (0,) == struct.unpack("B", lead):
continue
break
lead += stream_in.read(15)
if lead == "":
raise IOError, 'No header'
stream_in.seek(-len(lead), 1)
gzipper = gzip.GzipFile(fileobj=stream_in)
data = gzipper.read()
stream_out.write(data)
if __name__ == '__main__':
if sys.argv[1:]:
try:
......
......@@ -44,6 +44,8 @@ allow-hosts =
github.com
peak.telecommunity.com
unzip = true
# separate from system python
include-site-packages = false
exec-sitecustomize = false
......@@ -137,14 +139,15 @@ zc.recipe.egg = 1.3.2
# Use own version of h.r.download to be able to open archives not supported by python2.x: .xz
hexagonit.recipe.download = 1.6nxd002
Jinja2 = 2.6
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.8.3
buildout-versions = 1.7
collective.recipe.template = 1.10
lxml = 3.1.2
meld3 = 0.6.10
netaddr = 0.7.10
slapos.libnetworkcache = 0.13.3
slapos.libnetworkcache = 0.13.4
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
......@@ -166,9 +169,8 @@ setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.35.2-dev
supervisor = 3.0b1
supervisor = 3.0b2
# Required by:
# slapos.core==0.35.2-dev
zope.interface = 4.0.5
......@@ -5,8 +5,8 @@ parts =
[sqlite3]
recipe = slapos.recipe.cmmi
url = http://www.sqlite.org/2013/sqlite-autoconf-3071601.tar.gz
md5sum = 8860d1a1ed26d40f07e3c7ae035b644a
url = http://www.sqlite.org/2013/sqlite-autoconf-3071700.tar.gz
md5sum = 18c285053e9562b848209cb0ee16d4ab
configure-options =
--disable-static
--enable-readline
......
......@@ -17,12 +17,13 @@ filename = stunnel-4-hooks.py
[stunnel-4]
recipe = slapos.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/archive/4.x/stunnel-4.55.tar.gz
md5sum = ebe6670368d30c6a01ca33b9c50cb239
url = https://www.stunnel.org/downloads/stunnel-4.56.tar.gz
md5sum = ac4c4a30bd7a55b6687cbd62d864054c
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
--enable-ipv6
--disable-libwrap
--disable-fips
--with-ssl=${openssl:location}
environment =
CPPFLAGS=-I${zlib:location}/include
......
......@@ -10,6 +10,7 @@ extends =
../pkgconfig/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../swig/buildout.cfg
parts =
subversion
......@@ -59,3 +60,45 @@ environment =
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
[subversion-1.9]
recipe = hexagonit.recipe.cmmi
url = http://www.apache.org/dist/subversion/subversion-1.7.9.tar.gz
md5sum = dfb083e8bfac88aa28d606168b08e4ff
configure-options =
--disable-static
--with-apr=${apache:location}/bin/apr-1-config
--with-apr-util=${apache:location}/bin/apu-1-config
--with-apxs=${apache:location}/bin/apxs
--with-zlib=${zlib:location}
--with-sqlite=${sqlite3:location}
--with-neon=${neon:location}
--with-swig=${swig:location}/bin/swig
--without-berkeley-db
--without-sasl
--without-apr_memcache
--without-gnome-keyring
--without-kwallet
--without-jdk
--without-jikes
--without-junit
--without-ctypesgen
--without-ruby-sitedir
--without-ruby-test-verbose
--disable-nls
# it seems that parallel build sometimes fails.
make-options =
-j1
make-targets =
install
swig-py
install-swig-py
environment =
PATH=${pkgconfig:location}/bin:${neon:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
[buildout]
extends =
../automake/buildout.cfg
../libpng/buildout.cfg
../libtool/buildout.cfg
../leptonica/buildout.cfg
../jbigkit/buildout.cfg
../webp/buildout.cfg
parts =
tesseract
......@@ -26,6 +28,9 @@ md5sum = 2e691858cb492b7c17d23bf0912b3d24
recipe = slapos.recipe.cmmi
url = http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
md5sum = 1ba496e51a42358fb9d3ffe781b2d20a
depends =
${libpng:so_version}
${webp:so_version}
patch-options =
-p1
patches =
......
......@@ -10,6 +10,7 @@ extends =
../ncurses/buildout.cfg
../pcre/buildout.cfg
../pkgconfig/buildout.cfg
../readline/buildout.cfg
[varnish]
<= varnish-2.0
......@@ -35,10 +36,10 @@ configure-options =
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
CPPFLAGS=-I${ncurses:location}/include -I${readline:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib
[varnish-3.0]
<= varnish-2.1
url = http://repo.varnish-cache.org/source/varnish-3.0.3.tar.gz
md5sum = 714310c83fdbd2061d897dacd3f63d8b
url = http://repo.varnish-cache.org/source/varnish-3.0.4.tar.gz
md5sum = a130ce9c3504b9603a46542635e18701
......@@ -10,8 +10,11 @@ extends =
[webp]
recipe = slapos.recipe.cmmi
url = https://webp.googlecode.com/files/libwebp-0.1.3.tar.gz
md5sum = 254d4670e14e9ed881f0536b006ab336
url = https://webp.googlecode.com/files/libwebp-0.3.0.tar.gz
md5sum = 4183f4f51ada98976f14e7bd51f30938
depends =
${libpng:so_version}
so_version = 4
configure-options =
--disable-static
--with-jpegincludedir=${libjpeg:location}/include
......
--- a/Makefile.am 2012-05-13 16:44:48.000000000 +0200
+++ b/Makefile.am 2013-06-21 15:05:07.519274542 +0200
@@ -41,7 +41,7 @@
ACLOCAL_AMFLAGS = -I m4
# subdirectories in the distribution
-SUBDIRS = lib src doc po tests util
+SUBDIRS = lib src po tests util
EXTRA_DIST = ChangeLog.README MAILING-LIST \
msdos/ChangeLog msdos/config.h msdos/Makefile.DJ \
--- a/Makefile.in 2012-08-05 22:17:17.000000000 +0200
+++ b/Makefile.in 2013-06-21 15:05:04.351269286 +0200
@@ -1195,7 +1195,7 @@
ACLOCAL_AMFLAGS = -I m4
# subdirectories in the distribution
-SUBDIRS = lib src doc po tests util
+SUBDIRS = lib src po tests util
EXTRA_DIST = ChangeLog.README MAILING-LIST \
msdos/ChangeLog msdos/config.h msdos/Makefile.DJ \
msdos/Makefile.WC ABOUT-NLS \
......@@ -8,6 +8,14 @@ extends =
parts =
wget
[wget-doc.makefile.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
filename = Makefile.patch
download-only = true
md5sum = 2b89644c63a0dfe96290471d28a554f2
[wget]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz
......@@ -20,6 +28,13 @@ configure-options =
--with-libssl-prefix=${openssl:location}
--with-zlib-lib=${zlib:location}
patch-options =
-p1
patches =
${wget-doc.makefile.patch:location}/${wget-doc.makefile.patch:filename}
environment =
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
......
......@@ -346,7 +346,7 @@ recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2
md5sum = ecd4839ad01f6f637c6fb5327207f89b
environment =
PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
PKG_CONFIG_PATH=${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
configure-options =
--disable-static
......
......@@ -4,5 +4,5 @@ parts =
[zlib]
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libpng/zlib-1.2.6.tar.bz2?download
md5sum = dc2cfa0d2313ca77224b4d932b2911e9
url = http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
md5sum = 44d667c142d7cda120332623eab69f40
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.78.1.dev'
version = '0.78.4.dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -188,6 +188,8 @@ setup(name=name,
'slapreport = slapos.recipe.slapreport:Recipe',
'slaprunner = slapos.recipe.slaprunner:Recipe',
'slaprunner.test = slapos.recipe.slaprunner:Test',
'slaprunner.export = slapos.recipe.slaprunner.backup:ExportRecipe',
'slaprunner.import = slapos.recipe.slaprunner.backup:ImportRecipe',
'softwaretype = slapos.recipe.softwaretype:Recipe',
'sphinx= slapos.recipe.sphinx:Recipe',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
......@@ -195,6 +197,7 @@ setup(name=name,
'stunnel = slapos.recipe.stunnel:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe',
'trac = slapos.recipe.trac:Recipe',
'urlparse = slapos.recipe._urlparse:Recipe',
'uuid = slapos.recipe._uuid:Recipe',
'vifib = slapos.recipe.vifib:Recipe',
......
......@@ -12,15 +12,14 @@ On slap console, you can instanciate varnish like this:
instance = request(
software_type='varnish',
partition_parameter_kw={
'tidstorage-url':'http://[your tidstrage address]:your tid strage port',
'backend-url':'https://[your_backend_address]:your_backend_port',
'web-checker-frontend-url':'http://www.example.com',
'web-checker-mail-address':'web-checker-result@example.com',
'web-checker-smtp-host':'mail.example.com',
}
)
tidstrage-url is the backend url that varnish will cache. It is expected that
the backend is created by tidstorage recipe.
backend-url is the backend url that varnish will cache.
web-checker-frontend-url is the entry-point-url that web checker will check
the HTTP headers of all the pages in the web site.
......
......@@ -31,10 +31,10 @@ KVM with Remote and gzipped Image
gzip = true
# Use -hda instead -drive arg
# Default is drive (see Options bellow)
# Default is drive (see Options below)
image_type = hda
### Common Configuration bellow. ###
### Common Configuration below. ###
# VNC is optional
kvm_vnc = <SOME-IP>:<VNC-DISPLAY>
......
......@@ -76,8 +76,7 @@ class Recipe(GenericBaseRecipe):
'vhosts': ''.join(self.substituteTemplate(vhost_template_name, {
'ip': ip,
'port': port,
'backend': backend,
'backend-path': backend_path,
'backend': ('%s/%s' % (backend.rstrip('/'), backend_path.strip('/'))).rstrip('/'),
'ssl_enable': ssl_enable,
}) for (port, backend) in backend_list),
},
......
Listen %(ip)s:%(port)s
<VirtualHost *:%(port)s>
%(ssl_enable)s
RewriteRule (.*) %(backend)s%(backend-path)s$1 [L,P]
RewriteRule ^/(.*) %(backend)s/$1 [L,P]
</VirtualHost>
......@@ -44,6 +44,7 @@ class Recipe(GenericBaseRecipe):
root = options['installroot'].strip()
options['home_page'] = url_base + "/" + project
options['admin_page'] = url_base + "/" + project + "_ops/"
options['result_page'] = url_base + "/" + project + "_result/"
options['cronjob'] = os.path.join(root, project+'.cronjob')
return GenericBaseRecipe.__init__(self, buildout, name, options)
......
......@@ -172,6 +172,7 @@ def services(args):
languages, compiled, user_profile)
os.system("chmod g+w -R " + args['installroot'])
os.system(cmd)
os.system("chmod 700 %s" % os.path.join(args['installroot'], 'keys'))
os.system("chmod o+x " + inc)
os.system("chmod -R o+r " + inc)
os.system("chmod o+x " + languages)
......
......@@ -10,7 +10,7 @@ if [ -z $URL ]; then
exit 3
fi
%(curl_path)s -k -sL $URL | grep "$MATCH" > /dev/null
%(curl_path)s -k -sL $URL --max-time 10 | grep "$MATCH" > /dev/null
if [ $? != 0 ]; then
echo "Content at $URL seems to be corrupted" >&2
......
......@@ -9,7 +9,7 @@ if [ -z $URL ]; then
exit 3
fi
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} -o /dev/null)
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} --max-time 10 -o /dev/null)
if [ $? -eq 3 ]; then
echo "URL malformed: $URL." >&2
......
......@@ -27,6 +27,8 @@
import subprocess
import httplib
import base64
import os
import shutil
from slapos.recipe.librecipe import GenericBaseRecipe
......@@ -50,13 +52,29 @@ class Recipe(GenericBaseRecipe):
user, password
])
htdocs_location = self.options['htdocs']
if not (os.path.exists(htdocs_location) and os.listdir(htdocs_location)):
try:
os.rmdir(htdocs_location)
except:
pass
shutil.copytree(self.options['source'], htdocs_location)
# Install php.ini
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
'php.ini'),
self.substituteTemplate(self.getTemplateFilename('php.ini.in'),
dict(tmp_directory=self.options['tmp-dir']))
)
path_list.append(php_ini)
apache_config = dict(
pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'],
davlock_db=self.options['davdb-lock'],
ip=self.options['ip'],
port=self.options['port'],
port_webdav=self.options['port_webdav'],
port_ajax=self.options['port_ajax'],
error_log=self.options['error-log'],
access_log=self.options['access-log'],
document_root=self.options['htdocs'],
......@@ -67,6 +85,7 @@ class Recipe(GenericBaseRecipe):
htpasswd_file=htpasswd_file,
ssl_certificate=self.options['cert-file'],
ssl_key=self.options['key-file'],
php_ini_dir=self.options['php-ini-dir']
)
# Create logfiles
......@@ -86,7 +105,7 @@ class Recipe(GenericBaseRecipe):
promise = self.createPythonScript(self.options['promise'],
__name__ + '.promise',
dict(host=self.options['ip'], port=int(self.options['port']),
dict(host=self.options['ip'], port=int(self.options['port_webdav']),
user=self.options['user'], password=self.options['password'])
)
path_list.append(promise)
......
ServerRoot "%(server_root)s"
Listen [%(ip)s]:%(port)s
Listen [%(ip)s]:%(port_webdav)s
Listen [%(ip)s]:%(port_ajax)s
NameVirtualHost [%(ip)s]:%(port_webdav)s
NameVirtualHost [%(ip)s]:%(port_ajax)s
# Needed modules
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule unixd_module "%(modules_dir)s/mod_unixd.so"
LoadModule access_compat_module "%(modules_dir)s/mod_access_compat.so"
LoadModule authn_core_module "%(modules_dir)s/mod_authn_core.so"
LoadModule authz_core_module "%(modules_dir)s/mod_authz_core.so"
LoadModule authn_file_module "%(modules_dir)s/mod_authn_file.so"
LoadModule authz_host_module "%(modules_dir)s/mod_authz_host.so"
LoadModule authz_user_module "%(modules_dir)s/mod_authz_user.so"
LoadModule auth_basic_module "%(modules_dir)s/mod_auth_basic.so"
LoadModule auth_digest_module "%(modules_dir)s/mod_auth_digest.so"
# Comment auth_digest since we don't use it
#LoadModule auth_digest_module "%(modules_dir)s/mod_auth_digest.so"
LoadModule log_config_module "%(modules_dir)s/mod_log_config.so"
LoadModule headers_module "%(modules_dir)s/mod_headers.so"
LoadModule setenvif_module "%(modules_dir)s/mod_setenvif.so"
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule socache_shmcb_module "%(modules_dir)s/mod_socache_shmcb.so"
LoadModule ssl_module "%(modules_dir)s/mod_ssl.so"
LoadModule mime_module "%(modules_dir)s/mod_mime.so"
LoadModule dav_module "%(modules_dir)s/mod_dav.so"
LoadModule dav_fs_module "%(modules_dir)s/mod_dav_fs.so"
LoadModule dir_module "%(modules_dir)s/mod_dir.so"
LoadModule php5_module "%(modules_dir)s/libphp5.so"
ServerAdmin %(email_address)s
# Quiet Server header (if not, Apache give its life history)
# It's safer
ServerTokens ProductOnly
PidFile "%(pid_file)s"
PHPINIDir "%(php_ini_dir)s"
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<VirtualHost [%(ip)s]:%(port_ajax)s>
#ServerName www.example.com
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory %(document_root)s>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot "%(document_root)s"
DirectoryIndex index.html index.php
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
</VirtualHost>
<VirtualHost [%(ip)s]:%(port_webdav)s>
DocumentRoot "%(document_root)s"
PidFile "%(pid_file)s"
DavLockDB "%(davlock_db)s"
<Directory />
......@@ -66,6 +103,12 @@ DavLockDB "%(davlock_db)s"
</Directory>
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
</VirtualHost>
ErrorLog "%(error_log)s"
LogLevel warn
......@@ -77,9 +120,5 @@ DefaultType text/plain
TypesConfig "%(mime_types)s"
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLEngine on
SSLCertificateFile "%(ssl_certificate)s"
SSLCertificateKeyFile "%(ssl_key)s"
AddType application/x-httpd-php .php .phtml .php5 .php4
AddType application/x-httpd-php-source .phps
\ No newline at end of file
[PHP]
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
session.save_path = "%(tmp_directory)s"
session.auto_start = 0
date.timezone = Europe/Paris
file_uploads = On
upload_max_filesize = 8M
post_max_size = 8M
magic_quotes_gpc=Off
output_buffering=Off
\ No newline at end of file
......@@ -34,19 +34,23 @@ class Recipe(GenericBaseRecipe):
"""
def install(self):
promise_parser = ConfigParser.RawConfigParser()
promise_parser.add_section('portal_templates')
promise_parser.set('portal_templates', 'repository', self.options['bt5-repository-url'])
promise_parser.set('portal_templates', 'expected_bt5', self.options['bt5'])
promise_parser.add_section('external_service')
promise_parser.set('external_service', 'cloudooo_url', self.options['cloudooo-url'])
promise_parser.set('external_service', 'memcached_url', self.options['memcached-url'])
promise_parser.set('external_service', 'kumofs_url', self.options['kumofs-url'])
promise_parser.set('external_service', 'smtp_url', self.options['smtp-url'])
for section_name, option_id_list in (
('portal_templates', (
('repository', 'bt5-repository-url'),
('expected_bt5', 'bt5'),
)),
('external_service', (
('cloudooo_url', 'cloudooo-url'),
('memcached_url', 'memcached-url'),
('kumofs_url', 'kumofs-url'),
('smtp_url', 'smtp-url'),
)),
):
promise_parser.add_section(section_name)
for internal_id, option_id in option_id_list:
option = self.options.get(option_id)
if option:
promise_parser.set(section_name, internal_id, option)
promise_parser.write(open(self.options['promise-path'], 'w'))
return [self.options['promise-path']]
......@@ -38,16 +38,20 @@ class Recipe(GenericBaseRecipe):
port=int(self.options['port']),
openoffice_port=int(self.options['openoffice-port']),
)
environment_variable_list = []
for env_line in self.options['environment'].splitlines():
env_line = env_line.strip()
if not env_line:
continue
if '=' in env_line:
env_key, env_value = env_line.split('=')
conversion_server_dict[env_key.strip()] = env_value.strip()
environment_variable_list.append((env_key.strip(), env_value.strip()))
else:
raise zc.buildout.UserError('Line %r in environment parameter is '
'incorrect' % env_line)
conversion_server_dict['ENVIRONMENT_VARIABLE_LIST'] = '\n'.join(
['env-%s = %s' % (key, value) for key, value in environment_variable_list]
)
config_file = self.createFile(self.options['configuration-file'],
self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'),
conversion_server_dict))
......
......@@ -33,9 +33,9 @@ application_hostname = %(ip)s
# OpenOffice Port
openoffice_port = %(openoffice_port)s
# LD_LIBRARY_PATH passed to OpenOffice
env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s
env-FONTCONFIG_FILE = %(FONTCONFIG_FILE)s
# LD_LIBRARY_PATH and other environment variables
# passed to OpenOffice
%(ENVIRONMENT_VARIABLE_LIST)s
#
# Mimetype Registry
......
......@@ -34,6 +34,22 @@ def runMysql(args):
print "Starting %r" % mysqld_wrapper_list[0]
sys.stdout.flush()
sys.stderr.flush()
# try to increase the maximum number of open file descriptors.
# it seems that mysqld requires (max_connections + 810) file descriptors.
# to make it possible, you need to set the hard limit of nofile in
# /etc/security/limits.conf like the following :
# @slapsoft hard nofile 2048
try:
import resource
required_nofile = 2048 # XXX hardcoded value more than 1000 + 810
nofile_limit_list = [max(x, required_nofile) for x in resource.getrlimit(resource.RLIMIT_NOFILE)]
resource.setrlimit(resource.RLIMIT_NOFILE, nofile_limit_list)
except ImportError:
# resource library is only available on Unix platform.
pass
except ValueError:
# 'ValueError: not allowed to raise maximum limit'
pass
os.execl(mysqld_wrapper_list[0], *mysqld_wrapper_list)
......
......@@ -23,6 +23,7 @@ slow_query_log_file = %(slow_query_log)s
long_query_time = 1
max_allowed_packet = 128M
query_cache_size = 0
query_cache_type = 0
plugin-load = ha_mroonga.so;handlersocket.so
......
......@@ -37,11 +37,35 @@ class Recipe(GenericSlapRecipe):
"""
def _install(self):
ip = self.options['ip']
backend_url = self.parameter_dict['tidstorage-url']
backend_url = self.options.get('backend-url',
# BBB: Peeking in partition parameters directly. Eew.
self.parameter_dict.get('backend-url',
self.parameter_dict.get('tidstorage-url') # BBB
)
)
backend_server, backend_port = self._getBackendServer(backend_url)
path_list = []
if backend_url.startswith('https://'):
config = dict(
stunnel_binary=self.options['stunnel-binary'],
stunnel_server=ip,
stunnel_port=int(self.options['stunnel-port']),
stunnel_pid_file=self.options['stunnel-pid-file'],
stunnel_conf_file=self.options['stunnel-conf-file'],
shell_path=self.options['shell-path'],
backend_server=backend_server.replace('[', '').replace(']', ''),
backend_port=backend_port,
)
path_list.append(self.createExecutable(self.options['stunnel-wrapper'],
self.substituteTemplate(self.getTemplateFilename('stunnel.in'),
config)))
path_list.append(self.createFile(self.options['stunnel-conf-file'],
self.substituteTemplate(self.getTemplateFilename('stunnel.conf.in'),
config)))
backend_server = ip
backend_port = int(self.options['stunnel-port'])
varnishd_manager_port = int(self.options['manager-port'])
varnishd_server_port = int(self.options['server-port'])
path_list = []
config = dict(
varnishd_binary=self.options['varnishd-binary'],
varnish_ip=ip,
......@@ -51,6 +75,7 @@ class Recipe(GenericSlapRecipe):
varnishd_pid_file=self.options['pid-file'],
varnish_instance_name=self.options['varnish-instance-name'],
varnish_data=self.options['varnish-data'],
gcc_location=self.options['gcc-location'],
shell_path=self.options['shell-path'],
vcl_file=self.options['vcl-file'],
backend_port=backend_port,
......
......@@ -33,149 +33,110 @@ sub vcl_recv {
req.request != "PURGE" &&
req.request != "DELETE") {
/* Non-RFC2616 or CONNECT which is weird. */
return(pipe);
return (pipe);
}
# Pass anything other than GET and HEAD and PURGE directly.
if (req.request != "GET" && req.request != "HEAD" && req.request != "PURGE") {
/* We only deal with GET and HEAD by default */
return(pass);
# Pass anything other than GET and HEAD directly.
if (req.request != "GET" && req.request != "HEAD") {
return (pass);
}
if (req.http.Authorization) {
/* Not cacheable by default */
return (pass);
}
# no need to have cookies for the resources
if (req.url ~ "\.(css|js|ico)$") {
unset req.http.cookie;
# No need to have cookies for static resources
if (req.url ~ "\.(css|gif|ico|jpg|js|png)$") {
unset req.http.Cookie;
}
# remove bogus cookies
# Remove bogus cookies
if (req.http.Cookie) {
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1");
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac_name=\x22\x22;? *", "\1");
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac=\x22Og.3D.3D\x22;? *", "\1");
}
if (req.http.Cookie == "") {
remove req.http.Cookie;
unset req.http.Cookie;
}
if (req.http.Cookie && req.http.Cookie ~ "(^|; ) *__ac=") {
/* Not cacheable for authorised users,
but KM images are cacheable */
if (!(req.url ~ "/km_img/.*\.(png|gif)$")) {
return (pass);
}
}
# XXX Is it OK to remove this of all the case?
remove req.http.Set-Cookie;
if (req.http.Accept-Encoding) {
if (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
} else {
# unkown algorithm
remove req.http.Accept-Encoding;
}
}
# We do not care about Accept-Language, this is url controlled
remove req.http.Accept-Language;
## XXX login form can defer based on __ac_name cookie value
if (req.url ~ "/(login_form|WebSite_viewLoginDialog)($|\?)") {
return (pass);
}
# We do not care about Accept-Encoding, because we don't use varnish as the front most HTTP server.
unset req.http.Accept-Encoding;
if (req.backend.healthy) {
set req.grace = 1h;
} else {
set req.grace = 1w;
}
return(lookup);
return (lookup);
}
# Run after a pass in vcl_recv OR after a lookup that returned a hitpass
sub vcl_pass {
# unset If-Modified-Since to avoid reusing anonymous's browser cache
# after login.
unset req.http.If-Modified-Since;
return (pass);
}
# Creates the varnish cache key by the url
sub vcl_hash {
# We use url only for hash.
hash_data(req.url);
return(hash);
return (hash);
}
# Called after a cache lookup if the requested document was found in the cache
sub vcl_hit {
# According Vary Header do not return those headers
remove req.http.Accept-Language;
remove req.http.Accept-Encoding;
remove req.http.Cookie;
return(deliver);
return (deliver);
}
# Called after a cache lookup if the requested document was not found in the cache
sub vcl_miss {
return(fetch);
return (fetch);
}
# Called after a document has been successfully retrieved from the backend
sub vcl_fetch {
# we only cache 200 (OK) and 304 (Not Modified) responses.
if (beresp.status != 200 && beresp.status != 304) {
set beresp.ttl = 0s;
}
# Unset Expires that is always overridden by Cache-Control.
unset beresp.http.Expires;
if (beresp.http.cache-control ~ "no-cache") {
# Unset Pragma that is obsolete.
unset beresp.http.Pragma;
# We only cache 200 (OK) and 304 (Not Modified) responses.
if (beresp.status != 200 && beresp.status != 304) {
set beresp.ttl = 0s;
}
if (beresp.ttl == 0s) {
unset beresp.http.expires;
set beresp.http.cache-control = "no-cache";
return(hit_for_pass);
# If max-age is 0 or not set, we want no browser cache.
if (beresp.ttl <= 0s) {
set beresp.http.Cache-Control = "no-store";
# Mark as hit_for_pass for the next 2 minutes.
set beresp.ttl = 120s;
return (hit_for_pass);
}
# we don't care haproxy's cookie.
# We don't care haproxy's cookie.
if (beresp.http.Set-Cookie && beresp.http.Set-Cookie !~ "^SERVERID=[^;]+; path=/$") {
return(hit_for_pass);
}
if (req.url ~ "\.(css|js|ico)$") {
unset beresp.http.set-cookie;
set beresp.http.cache-control = regsub(beresp.http.cache-control, "^", "public,");
set beresp.http.cache-control = regsub(beresp.http.cache-control, ",$", "");
}
# remove some headers added by caching policy manager to avoid
# '304 Not Modified' in case of login <-> logout switching.
if (beresp.http.content-type ~ "^text/html") {
unset beresp.http.last-modified;
return (hit_for_pass);
} else {
unset beresp.http.Set-Cookie;
}
# We set long enough grace for cachable objects.
set beresp.grace = 1w;
/* Never send request to backend even if client ask refreshed content */
if (beresp.ttl > 0s) {
/* Setup grace period for 30days for all cacheable contents */
set beresp.grace = 30d;
# /* Set the clients TTL on this object */
# set beresp.http.cache-control = "max-age = 300";
/* Set how long Varnish will keep it */
set beresp.ttl = 1w;
/* marker for vcl_deliver to reset Age: */
set beresp.http.magicmarker = "1";
}
return(deliver);
return (deliver);
}
# Called before a cached object is delivered to the client
sub vcl_deliver {
if (resp.http.magicmarker) {
/* Remove the magic marker */
unset resp.http.magicmarker;
/* By definition we have a fresh object */
set resp.http.age = "0";
}
if (obj.hits > 0) {
set resp.http.X-Cache = obj.hits;
} else {
set resp.http.X-Cache = "MISS";
}
return(deliver);
return (deliver);
}
foreground = yes
pid = %(stunnel_pid_file)s
debug = 4
[remote]
accept = %(stunnel_server)s:%(stunnel_port)s
client = yes
connect = %(backend_server)s:%(backend_port)s
sni = %(stunnel_server)s
#!%(shell_path)s
DAEMON_OPTS="%(stunnel_conf_file)s"
exec %(stunnel_binary)s ${DAEMON_OPTS} 2>&1
......@@ -3,13 +3,13 @@
DAEMON_OPTS="-F \
-a %(varnish_ip)s:%(varnishd_server_port)s \
-T %(varnish_ip)s:%(varnishd_manager_port)s \
-t 0 \
-p nuke_limit=500 \
-n %(varnish_instance_name)s \
-f %(vcl_file)s \
-s file,%(varnish_data)s/varnish_storage.bin,1G"
PIDFILE=%(varnishd_pid_file)s
# exporting PATH here so that we will pass the PATH variable to the subprocess
export PATH
output=$(/bin/tempfile -s.varnish)
exec %(varnishd_binary)s -P ${PIDFILE} ${DAEMON_OPTS} > ${output} 2>&1
export PATH="%(gcc_location)s:$PATH"
exec %(varnishd_binary)s -P ${PIDFILE} ${DAEMON_OPTS} 2>&1
......@@ -18,5 +18,4 @@ if [ -z "${VARNISHLOG_ENABLED}" ] || \
exit 0;
fi
output=$(/bin/tempfile -s.varnish)
exec %(varnishlog_binary)s ${DAEMON_OPTS} > ${output} 2>&1
exec %(varnishlog_binary)s ${DAEMON_OPTS} 2>&1
......@@ -35,11 +35,22 @@ _isurl = re.compile('([a-zA-Z0-9+.-]+)://').match
# based on Zope2.utilities.mkzopeinstance.write_inituser
def Zope2InitUser(path, username, password):
# Set password only once
# Currently, rely on existence of a simple file:
# Create it the first time, then next time, detect this file and do no-op.
inituser_done_path = '%s_done' % path
if os.path.exists(inituser_done_path):
return
if os.path.exists(path):
return
open(path, 'w').write('')
os.chmod(path, 0600)
open(path, "w").write('%s:{SHA}%s\n' % (
open(path, 'w').write('%s:{SHA}%s\n' % (
username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1]))
open(inituser_done_path, 'w').write('"inituser" file already created once.')
class Recipe(GenericBaseRecipe):
def _options(self, options):
options['password'] = self.generatePassword()
......
......@@ -25,6 +25,9 @@ rest-input-encoding utf-8
rest-output-encoding utf-8
default-zpublisher-encoding utf-8
# Disable ownership checking to execute codes generated by alarm
skip-ownership-checking on
# Temporary storage database (for sessions)
<zodb_db temporary>
<temporarystorage>
......
......@@ -35,11 +35,22 @@ _isurl = re.compile('([a-zA-Z0-9+.-]+)://').match
# based on Zope2.utilities.mkzopeinstance.write_inituser
def Zope2InitUser(path, username, password):
# Set password only once
# Currently, rely on existence of a simple file:
# Create it the first time, then next time, detect this file and do no-op.
inituser_done_path = '%s_done' % path
if os.path.exists(inituser_done_path):
return
if os.path.exists(path):
return
open(path, 'w').write('')
os.chmod(path, 0600)
open(path, "w").write('%s:{SHA}%s\n' % (
open(path, 'w').write('%s:{SHA}%s\n' % (
username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1]))
open(inituser_done_path, 'w').write('"inituser" file already created once.')
class Recipe(GenericBaseRecipe):
def _options(self, options):
options['password'] = self.generatePassword()
......
......@@ -25,6 +25,9 @@ rest-input-encoding utf-8
rest-output-encoding utf-8
default-zpublisher-encoding utf-8
# Disable ownership checking to execute codes generated by alarm
skip-ownership-checking on
# Temporary storage database (for sessions)
<zodb_db temporary>
<temporarystorage>
......
......@@ -36,8 +36,12 @@ class Recipe(GenericBaseRecipe):
binary-path -- location of the haproxy command
ctl-path -- location of the haproxy control script
conf-path -- location of the configuration file
socket-path -- location of the socket file for administration
ip -- ip of the haproxy server
port -- port of the haproxy server
......@@ -83,7 +87,11 @@ class Recipe(GenericBaseRecipe):
'haproxy-listen-snippet.cfg.in')
server_snippet = ""
ip = self.options['ip']
server_check_path = self.options['server-check-path']
server_check_path = self.options.get('server-check-path', None)
if server_check_path:
httpchk = 'option httpchk GET %s' % server_check_path
else:
httpchk = ''
# FIXME: maxconn must be provided per-backend, not globally
maxconn = self.options['maxconn']
i = 0
......@@ -93,7 +101,7 @@ class Recipe(GenericBaseRecipe):
'name': name,
'ip': ip,
'port': port,
'server_check_path': server_check_path,
'httpchk': httpchk,
})
for address in backend_list:
i += 1
......@@ -108,11 +116,16 @@ class Recipe(GenericBaseRecipe):
self.options['conf-path'],
self.substituteTemplate(
self.getTemplateFilename('haproxy.cfg.in'),
{'server_text': server_snippet},
{'socket_path': self.options['socket-path'],
'server_text': server_snippet},
)
)
wrapper_path = self.createPythonScript(
self.options['wrapper-path'],
'slapos.recipe.librecipe.execute.execute',
arguments=[self.options['binary-path'].strip(), '-f', configuration_path],)
return [configuration_path, wrapper_path]
ctl_path = self.createPythonScript(
self.options['ctl-path'],
'%s.haproxy.haproxyctl' % __name__,
{'socket_path':self.options['socket-path']})
return [configuration_path, wrapper_path, ctl_path]
import socket
try:
import readline
except ImportError:
pass
def haproxyctl(conf):
while True:
try:
l = raw_input('> ')
except EOFError:
print
break
if l == 'quit':
break
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(conf['socket_path'])
s.send('%s\n' % l)
while True:
r = s.recv(1024)
if not r:
break
print r
s.close()
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
balance roundrobin
option httpchk GET %(server_check_path)s
%(httpchk)s
stats uri /haproxy
stats realm Global\ statistics
global
maxconn 4096
stats socket %(socket_path)s level admin
defaults
log global
......
......@@ -156,7 +156,7 @@ class GenericBaseRecipe(object):
if parameters_extra:
# pass-through further parameters
lines[-1] += ' \\'
lines.append('\t$@')
lines.append('\t"$@"')
content = '\n'.join(lines) + '\n'
return self.createFile(name, content, 0700)
......
......@@ -79,7 +79,7 @@ class Part(GenericBaseRecipe):
log = self.options['log']
part_path = self.createFile(os.path.join(logrotate_d, self.options['name']),
"%(logfiles)s {\n%(conf)s\n}" % {
"%(logfiles)s {\n%(conf)s\n}\n" % {
'logfiles': log,
'conf': '\n'.join(conf),
}
......
##############################################################################
#
# Copyright (c) 2012-2013 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.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
class NeoBaseRecipe(GenericBaseRecipe):
......@@ -13,7 +40,7 @@ class NeoBaseRecipe(GenericBaseRecipe):
# allocated.
# Only then can this recipe start succeeding and actually doing anything
# useful, as per NEO deploying constraints.
raise Exception('"masters" parameter is mandatory')
raise UserError('"masters" parameter is mandatory')
option_list = [
options['binary'],
'-l', options['logfile'],
......@@ -23,8 +50,6 @@ class NeoBaseRecipe(GenericBaseRecipe):
#'-n', options['name'],
'-c', options['cluster'],
]
if options['verbose']:
option_list.append('-v')
option_list.extend(self._getOptionList())
return [self.createPythonScript(
options['wrapper'],
......
......@@ -35,20 +35,22 @@ class Recipe(GenericSlapRecipe):
publish_dict = dict()
options = self.options.copy()
del options['recipe']
slave_reference = options.pop('-slave-reference', None)
for k, v in options.iteritems():
if k[:1] == '-':
continue
publish_dict[k] = v
self._setConnectionDict(publish_dict)
self._setConnectionDict(publish_dict, slave_reference)
return []
def _setConnectionDict(self, publish_dict):
return self.setConnectionDict(publish_dict)
def _setConnectionDict(self, publish_dict, slave_reference=None):
return self.setConnectionDict(publish_dict, slave_reference)
SERIALISED_MAGIC_KEY = '_'
class Serialised(Recipe):
def _setConnectionDict(self, publish_dict):
return super(Serialised, self)._setConnectionDict(wrap(publish_dict))
def _setConnectionDict(self, publish_dict, slave_reference=None):
return super(Serialised, self)._setConnectionDict(wrap(publish_dict), slave_reference)
......
......@@ -14,7 +14,7 @@
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes
daemonize no
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
......
......@@ -33,6 +33,12 @@ import traceback
DEFAULT_SOFTWARE_TYPE = 'RootSoftwareInstance'
def getListOption(option_dict, key, default=()):
result = option_dict.get(key, default)
if isinstance(result, basestring):
result = result.split()
return result
class Recipe(object):
"""
Request a partition to a slap master.
......@@ -91,18 +97,18 @@ class Recipe(object):
self.logger = logging.getLogger(name)
software_url = options['software-url']
name = options['name']
return_parameters = options.get('return', '').split()
return_parameters = getListOption(options, 'return')
if not return_parameters:
self.logger.debug("No parameter to return to main instance."
"Be careful about that...")
software_type = options.get('software-type', DEFAULT_SOFTWARE_TYPE)
filter_kw = dict(
(x, options['sla-' + x]) for x in options.get('sla', '').split()
(x, options['sla-' + x]) for x in getListOption(options, 'sla')
if options['sla-' + x]
)
partition_parameter_kw = self._filterForStorage(dict(
(x, options['config-' + x])
for x in options.get('config', '').split()
for x in getListOption(options, 'config')
))
slave = options.get('slave', 'false').lower() in \
librecipe.GenericBaseRecipe.TRUE_VALUES
......
##############################################################################
#
# Copyright (c) 2013 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 textwrap
from slapos.recipe.librecipe import GenericBaseRecipe
class ExportRecipe(GenericBaseRecipe):
"""\
This recipe creates an exporter script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
srv-directory
folder that contain the runner directory.
wrapper
full path of the exporter script to create.
"""
def install(self):
wrapper = self.options['wrapper']
self.createBackupScript(wrapper)
return [wrapper]
def createBackupScript(self, wrapper):
"""\
Create a script to backup the database in 'custom' format.
"""
content = textwrap.dedent("""\
#!%(shell-binary)s
umask 077
sync_element () {
path=$1
backup_path=$2
shift 2
element_list=$*
for element in $element_list
do
cd $path;
if [ -f $element ] || [ -d $element ]; then
%(rsync-binary)s -avz --safe-links --delete $element $backup_path;
fi
done
}
sync_element %(srv-directory)s/runner %(backup-directory)s/runner/ instance project proxy.db softwareLink
sync_element %(etc-directory)s %(backup-directory)s/etc/ .rcode .project .users ssh
if [ -d %(backup-directory)s/runner/software ]; then
rm %(backup-directory)s/runner/software/*
fi
""" % self.options)
self.createExecutable(wrapper, content=content)
class ImportRecipe(GenericBaseRecipe):
"""\
This recipe creates an importer script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
srv-directory
folder that contain the runner directory.
wrapper
full path of the exporter script to create.
"""
def install(self):
wrapper = self.options['wrapper']
self.createRestoreScript(wrapper)
return [wrapper]
def createRestoreScript(self, wrapper):
"""\
Create a script to restore the database from 'custom' format.
"""
content = textwrap.dedent("""\
#!%(shell-binary)s
umask 077
restore_element () {
backup_path=$1
restore_path=$2
shift 2
element_list=$*
for element in $element_list
do
cd $backup_path;
if [ -f $element ] || [ -d $element ]; then
%(rsync-binary)s -avz --delete $backup_path/$element $restore_path;
fi
done
}
restore_element %(backup-directory)s/runner/ %(srv-directory)s/runner instance project proxy.db softwareLink
restore_element %(backup-directory)s/etc/ %(etc-directory)s .rcode .project .users ssh
ifs=$IFS IFS=';'
read user pass remaining < %(etc-directory)s/.users
IFS=$ifs
%(curl-binary)s -vg6L -F clogin="$user" -F cpwd="$pass" --dump-header login_cookie %(backend-url)s/doLogin;
%(curl-binary)s -vg6LX POST --cookie login_cookie --max-time 5 %(backend-url)s/runSoftwareProfile;
rm -f login_cookie
""" % self.options)
self.createExecutable(wrapper, content=content)
......@@ -43,7 +43,11 @@ class Recipe(GenericBaseRecipe):
repozo_wrapper = self.createPythonScript(
self.options['repozo-wrapper'],
'slapos.recipe.librecipe.execute.execute',
[self.options['tidstorage-repozo-binary'], '--config',
configuration_file, '--repozo', self.options['repozo-binary'], '-z'])
[self.options['tidstorage-repozo-binary'],
'--config', configuration_file,
'--repozo', self.options['repozo-binary'],
'--gzip',
'--quick',
])
return [configuration_file, tidstorage_wrapper, repozo_wrapper]
# -*- coding: utf-8 -*-
##############################################################################
#
# 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 sys
import subprocess
import shutil
import json
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options):
pythonPath = ""
for eggs in options['eggs-dirs'].splitlines():
if eggs:
for item in os.listdir(eggs):
path = os.path.join(eggs, item)
pythonPath = path + ":" + pythonPath
options['python_path'] = pythonPath
options['wsgi-dir'] = os.path.join(options['site-dir'].strip(), 'apache')
options['git-dir'] = os.path.join(options['site-dir'].strip(), 'git')
options['svn-dir'] = os.path.join(options['site-dir'].strip(), 'svn')
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
install_path = []
env = os.environ
env['LD_LIBRARY_PATH'] = self.options['python-lib']
project_dir = self.options['site-dir'].strip()
trac_admin = self.options['trac-admin'].strip()
admin = self.options['admin-user'].strip()
passwd = self.options['admin-password'].strip()
config = os.path.join(project_dir, 'conf/trac.ini')
filestat = self.options['file-status'].strip()
self.logger.info("Checking if trac project is not installed...")
if os.path.exists(filestat):
os.unlink(filestat)
if not os.path.exists(project_dir):
self.logger.info("Starting trac project installation at %s" % project_dir)
trac_args = [trac_admin, project_dir, 'initenv']
db_string = "mysql://%s:%s@%s:%s/%s" % (
self.options['mysql-username'].strip(),
self.options['mysql-password'].strip(),
self.options['mysql-host'].strip(),
self.options['mysql-port'].strip(),
self.options['mysql-database'].strip()
)
process_install = subprocess.Popen(trac_args, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
process_install.stdin.write('%s\n%s\n' % (self.options['project'].strip(),
db_string))
result = process_install.communicate()[0]
process_install.stdin.close()
if process_install.returncode is None or process_install.returncode != 0:
if os.path.exists(project_dir):
shutil.rmtree(project_dir)
self.logger.error("Failed to initialize Trac.\nThe error was: %s" % result)
return []
os.mkdir(self.options['git-dir'])
os.mkdir(self.options['svn-dir'])
os.mkdir(self.options['wsgi-dir'])
os.unlink(config)
shutil.copy(self.options['trac-ini'].strip(), config)
shutil.copy(self.options['trac-wsgi'].strip(),
os.path.join(self.options['wsgi-dir'], 'trac.wsgi'))
else:
self.logger.info("The directory %s already exist, skip project installation"
% project_dir)
trac_args = [trac_admin, project_dir, 'repository', 'list']
process_upgrade = subprocess.Popen(trac_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = process_upgrade.communicate()[0]
if process_upgrade.returncode is None or process_upgrade.returncode != 0:
self.logger.error("Failed to run Trac.\nThe error was: %s" % result)
return []
#Add All grant to admin user
self.logger.info("Granting admin rights to the admin user.")
trac_grant = [trac_admin, project_dir, "permission add %s TRAC_ADMIN" % admin]
process = subprocess.Popen(trac_grant, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, env=env)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
raise Exception("Failed to execute Trac-admin.\nThe error was: %s" % result)
self.logger.info("Copying additional plugins into plugins directory")
plugins_dir = os.path.join(project_dir, "plugins")
for item in os.listdir(self.options['plugins-egg-dir'].strip()):
source = os.path.join(self.options['plugins-egg-dir'].strip(), item)
destination = os.path.join(plugins_dir, item)
if not os.path.exists(destination):
shutil.copytree(source, destination)
svn_list = json.loads(self.options.get('svn-project-list', '{}'))
for svn_repo in svn_list:
svn_repo_path = os.path.join(self.options['svn-dir'], svn_repo)
if not os.path.exists(svn_repo_path):
self.logger.info("Initializing %s SVN repository..." % svn_repo)
svn_args = [self.options['svn-repo-script'], project_dir,
svn_repo, svn_list[svn_repo]]
process = subprocess.Popen(svn_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
shutil.rmtree(svn_repo_path)
raise Exception("Failed to create repository.\nThe error was: %s" % result)
shutil.copy(self.options['trac-svn-hook'].strip(),
os.path.join(svn_repo_path, 'hooks/post-commit'))
shutil.copy(self.options['post-revprop-change'].strip(),
os.path.join(svn_repo_path, 'hooks/post-revprop-change'))
self.logger.info("Finished initializing %s reposiroty" % svn_repo)
repolist = json.loads(self.options.get('git-project-list', '{}'))
for repo, desc in repolist.iteritems():
absolute_path = os.path.join(self.options['git-dir'], '%s.git' % repo)
if not os.path.exists(absolute_path):
self.logger.info("Initializing %s GIT repository..." % repo)
subprocess.check_call([self.options['git-binary'], 'init',
'--bare', absolute_path])
subprocess.check_call([trac_admin, project_dir, 'repository',
'add', repo, absolute_path, 'git'], env=env)
subprocess.check_call([trac_admin, project_dir, 'repository',
'resync', repo], env=env)
# XXX: Hardcoded path
shutil.copy(self.options['trac-git-hook'].strip(),
os.path.join(absolute_path, 'hooks/post-commit'))
description_filename = os.path.join(absolute_path, 'description')
with open(description_filename, 'w') as description_file:
description_file.write(desc)
user_list = json.loads(self.options.get('user-list', '{}'))
fd = open(os.path.join(project_dir, 'svnpasswd'), 'w')
fd.write("[users]\n%s = %s" % (admin, passwd))
os.system("%s -cb %s %s %s" % (self.options['htpasswd'],
self.options['passwd-file'],
admin, passwd)
)
for user in user_list:
self.logger.info("Creating or updating user %s ..." % user)
user_args = [self.options['htpasswd'], '-b', self.options['passwd-file'],
user, user_list[user]]
process = subprocess.Popen(user_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
raise Exception("Failed to create user %s.\nThe error was: %s" %
(user, result))
fd.write("\n%s = %s" % (user, user_list[user]))
fd.close()
open(filestat, "w").write("done.")
return install_path
......@@ -34,11 +34,15 @@ class Recipe(GenericSlapRecipe):
"""
def _install(self):
path_list = []
web_checker_mail_address = self.parameter_dict['web-checker-mail-address']
web_checker_smtp_host = self.parameter_dict['web-checker-smtp-host']
web_checker_frontend_url = self.parameter_dict.get(
'web-checker-frontend-url',
self.options['frontend-url'])
try:
web_checker_mail_address = self.options['mail-address']
web_checker_smtp_host = self.options['smtp-host']
web_checker_frontend_url = self.options['frontend-url']
except KeyError:
# BBB
web_checker_mail_address = self.parameter_dict['web-checker-mail-address']
web_checker_smtp_host = self.parameter_dict['web-checker-smtp-host']
web_checker_frontend_url = self.parameter_dict['web-checker-frontend-url']
web_checker_working_directory = \
self.options['web-checker-working-directory']
config = dict(
......
......@@ -35,7 +35,7 @@ class Recipe(GenericBaseRecipe):
wrapper_path = self.options['wrapper-path']
wait_files = self.options.get('wait-for-files')
environment = self.options.get('environment')
parameters_extra = self.options.get('parameters_extra')
parameters_extra = self.options.get('parameters-extra')
if not wait_files and not environment:
# Create a simple wrapper as shell script
......
[buildout]
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
slapos-cookbook
apache-php
......@@ -177,19 +174,6 @@ filename = apache.conf.in
md5sum = ffb1105e2620e9e9f1f45093b67a3df8
location = ${buildout:parts-directory}/${:_buildout_section_name_}
# Local development
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = grid-computing
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
......@@ -309,6 +293,17 @@ signature-certificate-list =
[versions]
Jinja2 = 2.6
Werkzeug = 0.9.1
#Error: Couldn't install: lxml 3.1.2
lxml = 3.1.1
# Numpy 1.7.0 doesn't install well
numpy = 1.6.2
# websockify 0.4.1 doesn't install well
websockify = 0.3.0
slapos.cookbook=0.78.1
setuptools = 0.6c12dev-r88846
MarkupSafe = 0.18
buildout-versions = 1.7
cliff = 1.4
cmd2 = 0.6.5.1
......
{% set part_list = [] -%}
{% set crontab_line_list = [] -%}
###############################
#
# Instanciate dcron
#
###############################
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
log = $${:var}/log
# scripts = $${:etc}/run
services = $${:etc}/service
cron-entries = $${:etc}/cron.d
cron-lines = $${:etc}/cron.lines
crontabs = $${:etc}/crontabs
cronstamps = $${:etc}/cronstamps
backup = $${:srv}/backup
backupscript = $${:etc}/backup
home = $${:etc}/home
ssh = $${:home}/.ssh
#################################
# Cron service
#################################
[dcron-service]
recipe = slapos.recipe.template
url = ${template-dcron-service:output}
output = $${directory:services}/crond
mode = 0700
logfile = $${directory:log}/crond.log
#################################
# Slave backup scripts and crontab
#################################
# Go throught slave list to set their configuration
{% for slave_instance in slave_instance_list -%}
{% set slave_reference = slave_instance.get('slave_reference') -%}
{% set frequency = slave_instance.get('frequency', '') -%}
{% set hostname = slave_instance.get('hostname', '') -%}
{% set connection = slave_instance.get('connection', '') -%}
{% set include = slave_instance.get('include', '') -%}
{% set include_string = "' --include='".join(include.split(' ')) -%}
{% set exclude = slave_instance.get('exclude', '') -%}
{% set exclude_string = '' -%}
{% set sudo = slave_instance.get('sudo', 'False') -%}
{% set remote_schema = 'rdiff-backup --server --restrict-read-only / -- "$@"' -%}
{% if (exclude != '') -%}
{% set exclude_string = "' --exclude='".join(exclude.split(' ')) -%}
{% set exclude_string = "--exclude='" + exclude_string + "'" -%}
{% endif -%}
{% if (sudo == 'True') -%}
{% set remote_schema = 'sudo backupagent_rdiff-backup' -%}
{% endif -%}
{% if (frequency != '') and (hostname != '') and (connection != '') and (include != '') -%}
[{{ slave_reference }}-backup-directory]
recipe = slapos.cookbook:mkdirectory
directory = $${directory:backup}/$${:_buildout_section_name_}
[{{ slave_reference }}-backup-private_key]
recipe = plone.recipe.command
stop-on-error = true
command = ${dropbear-output:keygen} -t $${:type} -s 2048 -f $${:key}
key = $${directory:ssh}/$${:_buildout_section_name_}
location = $${:key}
type = rsa
[{{ slave_reference }}-backup-public_key]
recipe = plone.recipe.command
stop-on-error = true
update-command = $${:command}
command = ${coreutils-output:rm} -f $${:key} && ${dropbear-output:keygen} -y -f {{ '$${' ~ slave_reference }}-backup-private_key:key} | ${grep-output:grep} {{ '$${' ~ slave_reference }}-backup-private_key:type} > $${:key}
key = {{ '$${' ~ slave_reference }}-backup-private_key:key}.pub
location = $${:key}
[{{ slave_reference }}-backup-check-public_key]
recipe = plone.recipe.command
stop-on-error = true
update-command = $${:command}
command = grep ssh-{{ '$${' ~ slave_reference }}-backup-private_key:type} {{ '$${' ~ slave_reference }}-backup-public_key:key}
[{{ slave_reference }}-backup-read-public_key]
recipe = slapos.cookbook:generate.password
storage-path = {{ '$${' ~ slave_reference }}-backup-public_key:key}
bytes = 8
# Publish slave {{ slave_reference }} information
[{{ slave_reference }}-backup-publish]
recipe = slapos.cookbook:publish
-slave-reference = {{ slave_reference }}
authorized_key = {{ '$${' ~ slave_reference }}-backup-read-public_key:passwd}
{% do part_list.append("%s-backup-publish" % slave_reference) -%}
[{{ slave_reference }}-backup-script]
recipe = slapos.recipe.template
url = ${template-backup-script:output}
output = $${directory:backupscript}/$${:_buildout_section_name_}
mode = 0700
datadirectory = {{ '$${' ~ slave_reference }}-backup-directory:directory}
sshkey = {{ '$${' ~ slave_reference }}-backup-private_key:key}
connection = {{ connection }}
hostname = {{ hostname }}
include = {{ include_string }}
exclude_string = {{ exclude_string }}
remote_schema = {{ remote_schema }}
[{{ slave_reference }}-backup-crontab-line]
recipe = slapos.recipe.template
url = ${template-crontab-line:output}
output = $${directory:cron-lines}/$${:_buildout_section_name_}
mode = 0600
script = {{ '$${' ~ slave_reference }}-backup-script:output}
frequency = {{ frequency }}
{% do crontab_line_list.append("$${%s-backup-crontab-line:output}" % slave_reference) -%}
{% endif -%}
{% endfor -%}
#################################
# Generate crontab file
#################################
{% set crontab_line_list_string = " ".join(crontab_line_list) -%}
[activate-crontab-file]
# XXX File is never removed
recipe = plone.recipe.command
stop-on-error = true
update-command = $${:command}
command = ${coreutils-output:cat} ${template-crontab:output} {{ crontab_line_list_string }} | ${dcron-output:crontab} -c $${directory:crontabs} -
# Add parts generated by template
[buildout]
parts =
dcron-service
activate-crontab-file
{% for part in part_list -%}
{{ ' %s' % part }}
{% endfor -%}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[dynamic-template-pullrdiffbackup]
recipe = slapos.recipe.template:jinja2
template = ${template-pullrdiffbackup:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-pullrdiffbackup.cfg
extensions = jinja2.ext.do
context =
key slave_instance_list instance-parameter:slave-instance-list
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = $${:pullrdiffbackup}
# pullrdiffbackup = ${template-pullrdiffbackup:output}
pullrdiffbackup = $${dynamic-template-pullrdiffbackup:rendered}
[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-parameter]
# slave-instance-list = []
[instance-parameter]
# Fetches parameters defined in SlapOS Master for this instance.
# Always the same.
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap_connection:computer_id}
partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file}
[buildout]
extends =
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
# ../../component/nginx/buildout.cfg
../../component/rdiff-backup/buildout.cfg
# ../../component/duplicity/buildout.cfg
# ../../component/git/buildout.cfg
# ../../component/subversion/buildout.cfg
../../component/rsync/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/grep/buildout.cfg
# ../../stack/flask.cfg
../../stack/slapos.cfg
parts =
rdiff-backup
# duplicity
dcron
logrotate
# nginx
# git
# subversion
rsync
# flask-egg
template
template-pullrdiffbackup
template-backup-script
template-crontab-line
slapos-cookbook
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
# Aurélien Calonne
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJ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735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB+DCCAWGgAwIBAgIJAKGd0vpks6T/MA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
BAMMCUNPTVAtMTU4NDAgFw0xMzA2MjAxMjE5MjBaGA8yMTEzMDUyNzEyMTkyMFow
FDESMBAGA1UEAwwJQ09NUC0xNTg0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
gQDZTH9etPUC+wMZQ3UIiOwyyCfHsJ+7duCFYjuo1uZrhtDt/fp8qb8qK9ob+df3
EEYgA0IgI2j/9jNUEnKbc5+OrfKznzXjrlrH7zU8lKBVNCLzQuqBKRNajZ+UvO8R
nlqK2jZCXP/p3HXDYUTEwIR5W3tVCEn/Vda4upTLcPVE5wIDAQABo1AwTjAdBgNV
HQ4EFgQU7KXaNDheQWoy5uOU01tn1M5vNkEwHwYDVR0jBBgwFoAU7KXaNDheQWoy
5uOU01tn1M5vNkEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQASmqCU
Znbvu6izdicvjuE3aKnBa7G++Fdp2bdne5VCwVbVLYCQWatB+n4crKqGdnVply/u
+uZ16u1DbO9rYoKgWqjLk1GfiLw5v86pd5+wZd5I9QJ0/Sbz2vZk5S4ciMIGwArc
m711+GzlW5xe6GyH9SZaGOPAdUbI6JTDwLzEgA==
-----END CERTIFICATE-----
##########################################################
# Service startup scripts and configuration files
##########################################################
[template-dcron-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-dcron-service.sh.in
md5sum = 1372441dac23e4fa7d2dc773a74725ea
output = ${buildout:directory}/template-dcron-service.sh.in
mode = 0644
[template-backup-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-backup-script.sh.in
md5sum = 19c3a72913cc285bf9745ab2f869018e
output = ${buildout:directory}/template-backup-script.sh.in
mode = 0644
[template-crontab-line]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-crontab-line.in
md5sum = 5cbd64f04da0601ba4286516a6161f5e
output = ${buildout:directory}/template-crontab-line.in
mode = 0644
[template-crontab]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-crontab.in
md5sum = 072be0fd04896880c931d44d8eabde37
output = ${buildout:directory}/template-crontab.in
mode = 0644
##########################################################
# Buildout instance.cfg templates
##########################################################
[template-pullrdiffbackup]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pullrdiffbackup.cfg.in
md5sum = 62c236773dadecac11eb9a47dbca9351
output = ${buildout:directory}/template-pullrdiffbackup.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 42021b325159dff29e4bd4e33b8ff2f3
output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
rdiff-backup = 1.0.5
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.9.1
buildout-versions = 1.7
gunicorn = 17.5
itsdangerous = 0.22
meld3 = 0.6.10
plone.recipe.command = 1.1
slapos.cookbook = 0.78.3
slapos.recipe.build = 0.11.6
slapos.recipe.cmmi = 0.1.1
slapos.recipe.template = 2.4.2
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.35.1
Flask = 0.10.1
# Required by:
# slapos.cookbook==0.78.1
inotifyx = 0.2.0-1
# Required by:
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# xml-marshaller==0.9.7
lxml = 3.2.1
# Required by:
# slapos.cookbook==0.78.1
netaddr = 0.7.10
# Required by:
# slapos.core==0.35.1
netifaces = 0.8-1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.3
# Required by:
# slapos.cookbook==0.78.1
pytz = 2013b
# Required by:
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.9.5
# Required by:
# slapos.cookbook==0.78.1
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b2
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.78.1
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
cliff = 1.4
cmd2 = 0.6.5.1
prettytable = 0.7.2
requests = 1.2.3
#!${dash-output:dash}
# trap "echo Backing up failed for $${:hostname}" ERR
export HOME=$${directory:home}
set -e
cd $${:datadirectory}
${rdiff-backup-output:rdiff-backup} \
$${:exclude_string} \
--include='$${:include}' \
--exclude='**' \
--remote-schema '${dropbear-output:ssh} -T -y -i $${:sshkey} %s $${:remote_schema}' \
$${:connection}::/ ./
# python scripts/verify_with_sudo.py ./ $${:connection}:/
# $${:_buildout_section_name_}
$${:frequency} $${:script}
# min(0-59) hours(0-23) day(1-31) month(1-12) dow(0-7) command
MAILTO=admins@erp5.org
#!${dash-output:dash}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec ${dcron-output:crond} \
-s $${directory:cron-entries} \
-c $${directory:crontabs} \
-t $${directory:cronstamps} \
-f -l 5 \
-L $${dcron-service:logfile}
# -M cron_simplelogger
[buildout]
# Local development - to be remove
develop =
${:parts-directory}/slapos.cookbook-repository
parts=
slapos-cookbook
boinc
template
template-boinc
slapos.cookbook-repository
check-recipe
extends =
../../component/boinc-client/buildout.cfg
../../component/git/buildout.cfg
../../stack/slapos.cfg
[template]
......@@ -32,21 +26,173 @@ md5sum = 4a50c02252792d11b99d88206bc49e12
output = ${buildout:directory}/template-boinc.cfg
mode = 0644
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = grid-computing
revision =
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
update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --quiet --hard @{upstream} ; fi
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB8jCCAVugAwI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Q2XPHAo+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-----
[versions]
lxml = 2.3.6
\ No newline at end of file
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.8.3
buildout-versions = 1.7
inotifyx = 0.2.0-1
lxml = 3.2.1
meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pytz = 2013b
slapos.core = 0.35.1
slapos.recipe.cmmi = 0.1.1
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
slapos.cookbook=0.78.1
# Required by:
# slapos.core==0.35.1
Flask = 0.9
# Required by:
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
# slapos.core==0.35.1
netifaces = 0.8-1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.2
# Required by:
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
BOINC Server
============
Introduction
------------
The Berkeley Open Infrastructure for Network Computing (BOINC) is an open
source middleware system for volunteer and grid computing.
http://boinc.berkeley.edu/trac/wiki/ProjectMain
This Software Release is used to deploy an instance of BOINC server on SlapOS
How it work?
------------
The following example show how to request an instance of BOINC server.
BOINC Server Parameters :
- project: The name of your project. Default is project=boinc_test
- full-name: Full name of your project. Default is full-name=Boinc Project SAMPLE
- domain: Use this parameter if you want to define by hand the url of your project.
Ex: domain = http://myboinc.host-dommain.com
- copyright-holder: The name of your compagny. It will be displayed at the footer of
your BOINC project website.
Job Submission Parameters:
- default-template-result (Default is ${boinc-default:template-result}): Set the
default Output Template to use when creating a BOINC work unit.
- default-template-wu (Default is ${boinc-default:template-wu}): Set the
default Input Template to use when creating a BOINC work unit.
- default-extension (Default is ${boinc-default:extension}): For example in windows if
job executable is an .exe, set default-extension=exe
- default-platform (Default is ${boinc-default:platform}): Set the default platform
for job submission. http://boinc.berkeley.edu/trac/wiki/BoincPlatforms
- boinc-app-list: Use this json parameter to submit your job list to BOINC Server.
For exemple:
boinc-app-list = {"APP_NAME":
{"APP_VERSION":
{"use_default":true, "binary":"PATH/URL_OF_BINARY",
"wu-number":NUM, "input-file":"PATH/URL_OF_INPUT_FILE"},
"APP_VERSION2":
{"use_default":false, "binary":"PATH/URL_OF_BINARY",
"wu-number":NUM, "input-file":"PATH/URL_OF_INPUT_FILE",
"extension":"", "platform":"x86_64-pc-linux-gnu",
"template-result":"PATH/URL_OF_OUTPUT_TEMPLATE",
"template-wu":"PATH/URL_OF_INPUT_TEMPLATE"}
}, ...}
APP_NAME example: upper_case (without space)
APP_VERSION examples: 1.00, 2.10, 1.10
Request your instance:
This is a minimal parameter to use:
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="project">Sample</parameter>
<parameter id="full-name">My BOINC project Sample</parameter>
<parameter id="copyright-holder">my.compagny.com</parameter>
<parameter id="boinc-app-list">JSON-JOB-LIST</parameter>
</instance>
Note: - You can update boinc-app-list anytime, this would allow you to update the
nomber of work unit, or to modify files. For any job modification, APP_NAME and
APP_VERSION is required.
- To create another BOINC project, please request another instance on SlapOS.
Warning: Once your project has been started (and BOINC client is connected on current
server), don't change the project name, otherwise this would cause the lost of current project.
Connect to your instance
------------------------
When your instance is ready, SlapOS must provide 3 URL:
boinc_home_page URL_BASE/PROJECT/ (public web page, BOINC Client will use this URL
to connect to your server)
boinc_admin_page URL_BASE/PROJECT_ops/ (administrative web page)
boinc_result_url URL_BASE/PROJECT_result/ (result web page, this page will allow
you to show job result)
[buildout]
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
template
application
......@@ -12,11 +8,8 @@ parts =
template_input
slapos-cookbook
instance-egg
slapos.cookbook-repository
check-recipe
extends =
../../component/git/buildout.cfg
../../stack/boinc/buildout.cfg
#Generate All instances templates
......@@ -72,19 +65,3 @@ template-result = ${template_result:location}/${template_result:filename}
template-wu = ${template_wu:location}/${template_wu:filename}
platform = x86_64-pc-linux-gnu
extension =
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = grid-computing
revision =
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
update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --quiet --hard @{upstream} ; fi
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going upward",
"default": 23000
}]
},
"font-url-list": {
"description": "List of URLs from which fonts are to be downloaded",
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"backend-count": {
"description": "Number of backend cloudooo instances",
"default": 1,
"type": "integer"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by Cloudooo instanciation",
"properties": {
"url": {
"description": "Conversion service access information",
"type": "string"
}
},
"type": "object"
}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set section_list = [] -%}
{% macro section(name) %}{% do section_list.append(name) %}{{ name }}{% endmacro -%}
[buildout]
parts =
publish-cloudooo-connection-information
......@@ -9,35 +12,53 @@ develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-cloudooo-connection-information]
recipe = slapos.cookbook:publishurl
url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/
recipe = slapos.cookbook:publish.serialised
url = cloudooo://${haproxy:ip}:${haproxy:port}/
[cloudooo-instance]
[cloudooo-base]
recipe = slapos.cookbook:generic.cloudooo
# Network options
ip = ${slap-network-information:local-ipv4}
port = 23000
openoffice-port = 23060
# Paths
configuration-file = ${rootdirectory:etc}/cloudooo.cfg
wrapper = ${basedirectory:services}/cloudooo
# Paths: Data
data-directory = ${directory:cloudooo-data}
ip = {{ ipv4 }}
environment =
LD_LIBRARY_PATH = {{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['zlib'] }}/lib
FONTCONFIG_FILE = ${fontconfig-instance:conf-path}
PATH = ${binary-link:target-directory}
# Binary information
# cloudooo specific configuration
ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program
ooo-paster = {{ bin_directory }}/cloudooo_paster
ooo-uno-path = {{ parameter_dict['libreoffice-bin'] }}/basis-link/program
{% set cloudooo_port = slapparameter_dict.get('tcpv4_port', 23000) | int -%}
{% set backend_count = slapparameter_dict.get('backend-count', 1) | int -%}
{% for index in range(backend_count) -%}
{% set name = 'cloudooo-' ~ index -%}
[{{ section(name) }}]
< = cloudooo-base
port = {{ cloudooo_port }}
openoffice-port = {{ cloudooo_port + 1 }}
configuration-file = ${directory:etc}/{{ name }}.cfg
data-directory = ${directory:srv}/{{ name }}
wrapper = ${directory:services}/{{ name }}
{% set cloudooo_port = cloudooo_port + 2 -%}
{% endfor -%}
[haproxy]
recipe = slapos.cookbook:haproxy
name = cloudooo
conf-path = ${directory:etc}/haproxy.cfg
socket-path = ${directory:run}/haproxy.sock
ip = {{ ipv4 }}
port = 8001
maxconn = 1
wrapper-path = ${directory:services}/haproxy
binary-path = {{ parameter_dict['haproxy'] }}/sbin/haproxy
ctl-path = ${directory:bin}/haproxy-ctl
backend-list =
{%- for section_name in section_list %}
{{ "${" ~ section_name ~ ":ip}:${" ~ section_name ~ ":port}" }}
{%- endfor %}
[cloudooo-test-runner]
recipe = slapos.cookbook:cloudooo.test
......@@ -45,24 +66,25 @@ prepend-path = ${buildout:bin-directory}
run-unit-test = ${buildout:bin-directory}/runUnitTest
run-test-suite = ${buildout:bin-directory}/runTestSuite
ooo-paster = ${cloudooo-instance:ooo-paster}
configuration-file = ${cloudooo-instance:configuration-file}
ooo-paster = ${cloudooo-0:ooo-paster}
configuration-file = ${cloudooo-0:configuration-file}
run-unit-test-binary = {{ bin_directory }}/runCloudoooUnitTest
run-test-suite-binary = {{ bin_directory }}/runCloudoooTestSuite
[fontconfig-instance]
recipe = slapos.cookbook:fontconfig
conf-path = ${rootdirectory:etc}/font.conf
conf-path = ${directory:etc}/font.conf
font-system-folder = {{ parameter_dict['fonts'] }}
font-folder = ${directory:font}
url-list =
service-folder = ${basedirectory:services}
{# XXX: violates "instanciation happens offline" rule -#}
url-list = {{ slapparameter_dict.get('font-url-list', []) | join(' ') }}
service-folder = ${directory:services}
onetimedownload_path = {{ bin_directory }}/onetimedownload
[binary-link]
recipe = slapos.cookbook:symbolic.link
target-directory = ${rootdirectory:bin}
target-directory = ${directory:bin}
link-binary =
{{ parameter_dict['coreutils'] }}/bin/basename
{{ parameter_dict['coreutils'] }}/bin/cat
......@@ -78,17 +100,12 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdftohtml
# rest of parts are candidates for some generic stuff
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = ${rootdirectory:etc}/run
[directory]
recipe = slapos.cookbook:mkdirectory
cloudooo-data = ${rootdirectory:srv}/cloudooo
font = ${rootdirectory:srv}/font
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
font = ${:srv}/font
run = ${:var}/run
services = ${:etc}/run
srv = ${buildout:directory}/srv
bin = ${buildout:directory}/bin
var = ${buildout:directory}/var
......@@ -6,6 +6,14 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-parameters]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
......@@ -13,12 +21,14 @@ extra-context =
context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slapparameter_dict slap-parameters:configuration
${:extra-context}
[dynamic-template-cloudooo-parameters]
file = {{ file_location }}
fontconfig = {{ fontconfig_location }}
freetype = {{ freetype_location }}
haproxy = {{ haproxy_location }}
libICE = {{ libICE_location }}
libpng12 = {{ libpng12_location }}
libSM = {{ libSM_location }}
......@@ -40,8 +50,10 @@ buildout-bin-directory = {{ buildout_bin_directory }}
< = jinja2-template-base
template = {{ template_cloudooo }}
filename = instance-cloudoo.cfg
extensions = jinja2.ext.do
extra-context =
section parameter_dict dynamic-template-cloudooo-parameters
key ipv4_set slap-parameters:ipv4
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
......
......@@ -14,10 +14,9 @@ parts +=
# Local development
slapos.cookbook-repository
check-recipe
slapos.cookbook-python2.6
slapos.recipe.template-python2.6
# Create instance template
template
slapos-cookbook
# XXX: Workaround of SlapOS limitation
# Unzippig of eggs is required, as SlapOS do not yet provide nicely working
......@@ -26,11 +25,10 @@ unzip = true
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch cloudooo --quiet http://git.erp5.org/repos/slapos.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
......@@ -38,18 +36,13 @@ stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slapos.cookbook-python2.6]
recipe = zc.recipe.egg
eggs = slapos.cookbook
scripts =
python = python2.6
ugly-depend-on = ${slapos.cookbook-repository:command} ${slapos.cookbook-repository:update-command}
[slapos.recipe.template-python2.6]
recipe = zc.recipe.egg
eggs = slapos.recipe.template
scripts =
python = python2.6
[slap-parameters]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[template-jinja2-base]
recipe = slapos.recipe.template:jinja2
......@@ -69,7 +62,7 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 694205787e78c5d615d72d7b4b26d174
md5sum = 425cb2e76d46d53bb0b0eebdb8c1aa95
extra-context =
key buildout_bin_directory buildout:bin-directory
key dcron_location dcron:location
......@@ -78,6 +71,7 @@ extra-context =
key fonts_location fonts:location
key freetype_location freetype:location
key git_location git:location
key haproxy_location haproxy:location
key imagemagick_location imagemagick:location
key libICE_location libICE:location
key libSM_location libSM:location
......@@ -98,10 +92,9 @@ extra-context =
[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = 4c8608f9525be0f01a09d60b240315a9
md5sum = bbe84b4c9022db62c926e8a8a4bf02a1
mode = 640
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
......
[buildout]
# Local development - to be remove
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
condor
slapos-cookbook
......@@ -11,12 +7,9 @@ parts =
template-condor
description-file
executable
slapos.cookbook-repository
check-recipe
extends =
../../component/condor/buildout.cfg
../../component/git/buildout.cfg
../../stack/slapos.cfg
[template]
......@@ -52,24 +45,9 @@ md5sum = c512f495cdd112bceb04feab7c909a10
[condor-application]
list = {"condor_test":{"description-file":"${description-file:location}/${description-file:filename}", "executable":"${executable:location}/${executable:filename}", "executable-name":"${executable:filename}", "files":{}}}
# Local development
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = grid-computing
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate
# List of signatures of uploaders we trust:
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
......@@ -77,7 +55,7 @@ command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent Signature
# Test Agent (Automatic update from tests)
# Alain Takoudjou
signature-certificate-list =
-----BEGIN CERTIFICATE-----
......@@ -185,17 +163,17 @@ signature-certificate-list =
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
MIIB8jCCAVugAwIBAgIJANlTfgX/9cX7MA0GCSqGSIb3DQEBBQUAMBExDzANBgNV
BAMMBkNPTVAtMDAgFw0xMzA1MzAxMTUyMDhaGA8yMTEzMDUwNjExNTIwOFowETEP
MA0GA1UEAwwGQ09NUC0wMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSGtkh
UPOcYMRiL2czmdfeHNB34nXEr5fMpglbA9RO9Cakf6YhK0jU5Y7kzAb6ZlyEzcC+
YkYWQZ9WCLwGuUvThg5iYlnBxmksv5Ot+5DKyTL4hdMEPCQ0RaLcXSkbxk56q3Rn
EQdYL+IJXS1KGMRWbl4Ql3NhShM9q7vBgyoMuwIDAQABo1AwTjAdBgNVHQ4EFgQU
EpO2oyW/sFAS9eojDbYo3hEOOIIwHwYDVR0jBBgwFoAUEpO2oyW/sFAS9eojDbYo
3hEOOIIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBP02wmekqmeD23
90NmwDwyEznDPEJDJybREtP+T++EJ1Q/rcnxIQ5a1iOEWY4RdH87H/+2O/7nDzGs
L0KzeG3WDdmnxLMQ5zpG9Qd5twC0GoMl1zf+8f9/t4QE7Dn4IosP3H3dkcRDQRch
SKYaJZHMckKx40/hhRsyFDR1Gj215g==
-----END CERTIFICATE-----
[versions]
......@@ -216,13 +194,14 @@ slapos.recipe.cmmi = 0.1.1
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
slapos.cookbook=0.78.1
# Required by:
# slapos.core==0.35.1
Flask = 0.9
# Required by:
# slapos.cookbook==0.78.1.dev
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
......@@ -235,12 +214,12 @@ pyflakes = 0.7.2
# Required by:
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.1.dev
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88997
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.35.1
......
[buildout]
versions = versions
extends =
../../component/apache-php/buildout.cfg
../../component/apache/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../stack/shacache-client.cfg
../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/gzip/buildout.cfg
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/
# Use only quite well working sites.
allow-hosts +=
*.googlecode.com
*.nexedi.org
*.python.org
*.sourceforge.net
alastairs-place.net
bitbucket.org
dist.repoze.org
effbot.org
github.com
launchpad.net
peak.telecommunity.com
sourceforge.net
www.dabeaz.com
www.owlfish.com
parts =
apache-php
application
template
lxml-python
eggs
instance-recipe-egg
unzip= true
[eggs]
recipe = zc.recipe.egg
eggs =
[instance-recipe]
egg = slapos.cookbook
module = davstorage
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[application]
recipe = hexagonit.recipe.download
url = http://garr.dl.sourceforge.net/project/ajaxplorer/ajaxplorer/dev-channel/4.3.4/ajaxplorer-core-4.3.4.tar.gz
md5sum = 2f2ff8bda7bbe841ef0e870c724eb74f
strip-top-level-dir = true
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = bed788dee6daf05349c4577e7a7f1299
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-davstorage]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-davstorage.cfg
md5sum = 699ecf4678386667f58a3391bab7af0f
output = ${buildout:directory}/template-davstorage.cfg
mode = 0644
[lxml-python]
python = python2.7
[buildout]
extends =
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = davstorage-ajaxplorer
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[versions]
zc.buildout = 1.6.0-dev-SlapOS-002
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.6
hexagonit.recipe.download = 1.6nxd002
meld3 = 0.6.10
openssl = 1.0.1c
# Required by:
# slapos.core
Flask = 0.9
# Required by:
# slapos.cookbook
PyXML = 0.8.4
slapos.recipe.template = 2.4.2
# Required by:
# slapos.cookbook==0.24
# slapos.core==0.14
# xml-marshaller==0.9.7
lxml = 3.1.0
# Required by:
# slapos.cookbook==0.24
netaddr = 0.7.10
# Required by:
# slapos.core==0.14
netifaces = 0.8
# Required by:
# slapos.cookbook==0.24
# slapos.core==0.14
# zc.buildout==1.5.3-dev-SlapOS-009
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.73.1
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.cookbook==0.73.1
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.24
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
[buildout]
parts =
davstorage
url
publish-connection-informations
certificate-authority
ca-davstorage
cron
cron-entry-logrotate
logrotate
logrotate-entry-davstorage
request-frontend
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[url]
recipe = slapos.cookbook:publishurl
scheme = webdavs
user = $${davstorage:user}
port = $${davstorage:port}
host = $${davstorage:ip}
password = $${davstorage:password}
[publish-connection-informations]
recipe = slapos.cookbook:publish
webdav_access = https://$${request-frontend:connection-domain}
url = https://$${request-frontend-ajaxupload:connection-domain}
webdav_user = $${davstorage:user}
webdav_password = $${davstorage:password}
[davstorage]
recipe = slapos.cookbook:davstorage
user = user
port = 8080
password = insecure
port_webdav = 8080
port_ajax = 8070
ip = $${slap-network-information:global-ipv6}
# Path
......@@ -42,12 +44,15 @@ root = $${buildout:directory}
email-address = admin+davstorage@vifib.net
htpasswd-file = $${directory:davstorage-conf}/davstorage.htpasswd
promise = $${basedirectory:promises}/davstorage
php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php}
# Binaries
apache-binary = ${apache:location}/bin/httpd
apache-modules-dir = ${apache:location}/modules/
apache-mime-file = ${apache:location}/conf/mime.types
apache-htpasswd = ${apache:location}/bin/htpasswd
source = ${application:location}
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
......@@ -66,7 +71,7 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:binary}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[logrotate]
......@@ -91,8 +96,8 @@ command = $${logrotate:wrapper}
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
binary = $${rootdirectory:bin}/cron_simplelogger
output = $${directory:cronoutput}
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
[logrotate-entry-davstorage]
......@@ -128,6 +133,7 @@ etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
tmp = $${buildout:directory}/tmp/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
......@@ -149,3 +155,38 @@ cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/
cronstamps = $${rootdirectory:etc}/cronstamps/
cronoutput = $${basedirectory:log}/cron/
php-ini-dir = $${rootdirectory:etc}/php
tmp-php = $${rootdirectory:tmp}/php
# Request frontend
[request-frontend-ajaxupload]
<= slap-connection
recipe = slapos.cookbook:request
name = Frontend Ajax
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url https-only
config-https-only = true
config-url = https://[$${davstorage:ip}]:$${davstorage:port_ajax}/
return = domain
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:request
name = Frontend Webdav
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url https-only
config-https-only = true
config-url = https://$${davstorage:user}:$${davstorage:password}@[$${davstorage:ip}]:$${davstorage:port_webdav}/
return = domain
# XXX Vivien: promise not working for now
#[frontend-ajaxupload-promise]
#recipe = slapos.cookbook:check_url_available
#path = $${basedirectory:promises}/frontend-ajaxupload
#url = $${request-frontend-ajaxupload:connection-site_url}
#dash_path = ${dash:location}/bin/dash
#curl_path = ${curl:location}/bin/curl
\ No newline at end of file
[buildout]
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
extends =
../../component/apache/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../stack/shacache-client.cfg
../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/gzip/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
alastairs-place.net
parts =
template
lxml-python
apache
logrotate
dcron
eggs
gzip
instance-recipe-egg
unzip= true
[eggs]
recipe = zc.recipe.egg
eggs =
[instance-recipe]
egg = slapos.cookbook
module = davstorage
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = bed788dee6daf05349c4577e7a7f1299
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-davstorage]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-davstorage.cfg
md5sum = 49c8e049a78e233d3a553e64c8914592
output = ${buildout:directory}/template-davstorage.cfg
mode = 0644
[lxml-python]
python = python2.7
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = davstorage-ajaxplorer
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[versions]
zc.buildout = 1.6.0-dev-SlapOS-002
Jinja2 = 2.6
Werkzeug = 0.7.1
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
Werkzeug = 0.8.3
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.6
hexagonit.recipe.download = 1.6nxd002
meld3 = 0.6.7
slapos.cookbook = 0.26
meld3 = 0.6.10
openssl = 1.0.1c
# Required by:
# slapos.core==0.14
Flask = 0.7.2
# slapos.core
Flask = 0.9
# Required by:
# slapos.cookbook==0.24
# slapos.cookbook
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.9
slapos.recipe.template = 2.4.2
# Required by:
# slapos.cookbook==0.24
# slapos.core==0.14
# xml-marshaller==0.9.7
lxml = 2.3
lxml = 3.1.0
# Required by:
# slapos.cookbook==0.24
netaddr = 0.7.6
netaddr = 0.7.10
# Required by:
# slapos.core==0.14
#netifaces = 0.4
netifaces = 0.8
# Required by:
# slapos.cookbook==0.24
......@@ -115,15 +73,15 @@ netaddr = 0.7.6
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.24
slapos.core = 0.14
# slapos.cookbook==0.73.1
slapos.core = 0.35.1
# Required by:
# slapos.core==0.14
supervisor = 3.0a10
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.cookbook==0.24
# slapos.cookbook==0.73.1
xml-marshaller = 0.9.7
# Required by:
......@@ -131,5 +89,6 @@ xml-marshaller = 0.9.7
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.14
zope.interface = 3.7.0
# slapos.core==0.35.1
zope.interface = 4.0.5
TODO:
+ Move Ajaxplorer to a separate directory (currently in the www/ directory
accessed by webdav client, and so might delete files)
+ Make configuration part disappear ! (configuration when instance deploy,
no need for user to do it at each start of a new instance)
......@@ -12,6 +12,7 @@ extends =
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
# Aurélien Calonne
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
......@@ -117,3 +118,16 @@ signature-certificate-list =
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB+DCCAWGgAwIBAgIJAKGd0vpks6T/MA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
BAMMCUNPTVAtMTU4NDAgFw0xMzA2MjAxMjE5MjBaGA8yMTEzMDUyNzEyMTkyMFow
FDESMBAGA1UEAwwJQ09NUC0xNTg0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
gQDZTH9etPUC+wMZQ3UIiOwyyCfHsJ+7duCFYjuo1uZrhtDt/fp8qb8qK9ob+df3
EEYgA0IgI2j/9jNUEnKbc5+OrfKznzXjrlrH7zU8lKBVNCLzQuqBKRNajZ+UvO8R
nlqK2jZCXP/p3HXDYUTEwIR5W3tVCEn/Vda4upTLcPVE5wIDAQABo1AwTjAdBgNV
HQ4EFgQU7KXaNDheQWoy5uOU01tn1M5vNkEwHwYDVR0jBBgwFoAU7KXaNDheQWoy
5uOU01tn1M5vNkEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQASmqCU
Znbvu6izdicvjuE3aKnBa7G++Fdp2bdne5VCwVbVLYCQWatB+n4crKqGdnVply/u
+uZ16u1DbO9rYoKgWqjLk1GfiLw5v86pd5+wZd5I9QJ0/Sbz2vZk5S4ciMIGwArc
m711+GzlW5xe6GyH9SZaGOPAdUbI6JTDwLzEgA==
-----END CERTIFICATE-----
[buildout]
versions = versions
extends =
../../stack/slapos.cfg
../../component/gcc/buildout.cfg
../../component/openssl/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/gzip/buildout.cfg
../../component/git/buildout.cfg
../../component/nodejs/buildout.cfg
../../component/postgresql/buildout.cfg
parts =
postgresql
nodejs
etherpad-lite-repository
install-deps
template
lxml-python
eggs
instance-recipe-egg
unzip= true
[eggs]
recipe = zc.recipe.egg
eggs =
[instance-recipe]
egg = slapos.cookbook
module = etherpad-lite
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[etherpad-lite-repository]
recipe = slapos.recipe.build:gitclone
repository = http://github.com/ether/etherpad-lite.git
branch = develop
git-executable = ${git:location}/bin/git
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 7ab2a242df988bf5c10bf8002acac3bd
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-etherpad-lite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-etherpad-lite.cfg
md5sum = fd7249be8988155110234c7bb877abb9
output = ${buildout:directory}/template-etherpad-lite.cfg
mode = 0644
[template-conf]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644
filename = settings.json.in
md5sum = 19ab39e6b3256c82fd54ce074488b136
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template-run-script]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644
filename = run.sh.in
md5sum = eac870b5f30e735e109a48913af2fae3
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template-deps-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/${:filename}
etherpad-location = ${etherpad-lite-repository:location}
nodejs-location = ${nodejs:location}
curl-location = ${curl:location}
postgre-location = ${postgresql:location}
mode = 0755
md5sum = 53d0d53d419bd9ee592d3e1a1c84c758
filename = installDeps.sh.in
output = ${etherpad-lite-repository:location}/bin/installDeps.sh
[install-deps]
recipe = plone.recipe.command
command = ${template-deps-script:output}
update-command = command
[lxml-python]
python = python2.7
[buildout]
extends =
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = etherpad-lite
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
\ No newline at end of file
[buildout]
parts =
etherpad-lite
publish-connection-informations
# frontend-etherpad
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
tmp = $${buildout:directory}/tmp/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:etc}/run/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
[directory]
recipe = slapos.cookbook:mkdirectory
etherpad-conf = $${rootdirectory:etc}/etherpad/
etherpad-repository-location = $${buildout:directory}/parts/etherpad-lite-repository
[publish-connection-informations]
recipe = slapos.cookbook:publish
url = $${request-frontend:connection-site_url}
[etherpad-conf-generation]
recipe = slapos.recipe.template
url = ${template-conf:location}/${template-conf:filename}
ip = $${slap-network-information:global-ipv6}
dirtydb-location = $${rootdirectory:var}/dirty.db
port = 9001
mode = 0644
output = $${directory:etherpad-conf}/settings.json
[etherpad-run-script]
recipe = slapos.recipe.template
url = ${template-run-script:location}/${template-run-script:filename}
etherpad-location = ${etherpad-lite-repository:location}
etherpad-repository-location = $${directory:etherpad-repository-location}
nodejs-location = ${nodejs:location}
etherpad-deps-script-location = ${template-deps-script:output}
etherpad-conf-location = $${etherpad-conf-generation:output}
etherpad-conf-name = settings-$${slap-connection:partition-id}.json
mode = 0755
output = $${rootdirectory:bin}/run.sh
# Command line comes from the run script of etherpad-lite
[etherpad-lite]
recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:run}/etherpad-lite
command-line = $${etherpad-run-script:output} -s $${etherpad-run-script:etherpad-conf-name}
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:request
name = Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url
config-url = http://$${etherpad-conf-generation:ip}:$${etherpad-conf-generation:port}
return = site_url
[frontend-etherpad]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend-etherpad
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
\ No newline at end of file
[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-etherpad-lite:output}
[buildout]
extends =
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = etherpad-lite
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
\ No newline at end of file
#!/bin/sh
# Ugly setup
cd ${:etherpad-location}
export PATH=$PATH:${:postgre-location}/bin
#Is gnu-grep (ggrep) installed on SunOS (Solaris)
if [ $(uname) = "SunOS" ]; then
hash ggrep > /dev/null 2>&1 || {
echo "Please install ggrep (pkg install gnu-grep)" >&2
exit 1
}
fi
#Is wget installed?
hash ${:curl-location}/bin/curl > /dev/null 2>&1 || {
echo "Please install curl" >&2
exit 1
}
#Is node installed?
hash ${:nodejs-location}/bin/node > /dev/null 2>&1 || {
echo "Please install node.js ( http://nodejs.org )" >&2
exit 1
}
#Is npm installed?
hash ${:nodejs-location}/bin/npm > /dev/null 2>&1 || {
echo "Please install npm ( http://npmjs.org )" >&2
exit 1
}
echo "Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient."
(
mkdir -p node_modules
cd node_modules
[ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite
cd ep_etherpad-lite
${:nodejs-location}/bin/npm install --loglevel warn
) || {
rm -rf node_modules
exit 1
}
echo "Ensure jQuery is downloaded and up to date..."
DOWNLOAD_JQUERY="true"
NEEDED_VERSION="1.9.1"
if [ $DOWNLOAD_JQUERY = "true" ]; then
${:curl-location}/bin/curl -lo src/static/js/jquery.js http://code.jquery.com/jquery-$NEEDED_VERSION.js || exit 1
fi
#Remove all minified data to force node creating it new
echo "Clear minfified cache..."
rm -f var/minified*
echo "ensure custom css/js files are created..."
for f in "index" "pad" "timeslider"
do
if [ ! -f "src/static/custom/$f.js" ]; then
cp "src/static/custom/js.template" "src/static/custom/$f.js" || exit 1
fi
if [ ! -f "src/static/custom/$f.css" ]; then
cp "src/static/custom/css.template" "src/static/custom/$f.css" || exit 1
fi
done
exit 0
#!/bin/sh
# Copy repository content from the software release
mkdir ${:etherpad-repository-location}
cp -R ${:etherpad-location}/* ${:etherpad-repository-location}
#Move to the folder where ep-lite is installed
cd ${:etherpad-repository-location}
# XXX Vivien: very ugly, definitely need to find a cleaner way
cp ${:etherpad-conf-location} ${:etherpad-repository-location}/${:etherpad-conf-name}
#Move to the node folder and start
echo "start..."
${:nodejs-location}/bin/node node_modules/ep_etherpad-lite/node/server.js $*
/*
This file must be valid JSON. But comments are allowed
Please edit settings.json, not settings.json.template
*/
{
// Name your instance!
"title": "Etherpad",
// favicon default name
// alternatively, set up a fully specified Url to your own favicon
"favicon": "favicon.ico",
//IP and port which etherpad should bind at
"ip": "${:ip}",
"port" : "${:port}",
// Session Key, used for reconnecting user sessions
// Set this to a secure string at least 10 characters long. Do not share this value.
"sessionKey" : "",
/*
// Node native SSL support
// this is disabled by default
//
// make sure to have the minimum and correct file access permissions set
// so that the Etherpad server can access them
"ssl" : {
"key" : "/path-to-your/epl-server.key",
"cert" : "/path-to-your/epl-server.crt"
},
*/
//The Type of the database. You can choose between dirty, postgres, sqlite and mysql
//You shouldn't use "dirty" for for anything else than testing or development
"dbType" : "dirty",
//the database specific settings
"dbSettings" : {
"filename" : "${:dirtydb-location}"
},
/* An Example of MySQL Configuration
"dbType" : "mysql",
"dbSettings" : {
"user" : "root",
"host" : "localhost",
"password": "",
"database": "store"
},
*/
//the default text of a pad
"defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http:\/\/etherpad.org\n",
/* Users must have a session to access pads. This effectively allows only group pads to be accessed. */
"requireSession" : false,
/* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. */
"editOnly" : false,
/* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
but makes it impossible to debug the javascript/css */
"minify" : true,
/* How long may clients use served javascript code (in seconds)? Without versioning this
may cause problems during deployment. Set to 0 to disable caching */
"maxAge" : 21600, // 60 * 60 * 6 = 6 hours
/* This is the path to the Abiword executable. Setting it to null, disables abiword.
Abiword is needed to advanced import/export features of pads*/
"abiword" : null,
/* This setting is used if you require authentication of all users.
Note: /admin always requires authentication. */
"requireAuthentication": false,
/* Require authorization by a module, or a user with is_admin set, see below. */
"requireAuthorization": false,
/* Users for basic authentication. is_admin = true gives access to /admin.
If you do not uncomment this, /admin will not be available! */
/*
"users": {
"admin": {
"password": "changeme1",
"is_admin": true
},
"user": {
"password": "changeme1",
"is_admin": false
}
},
*/
// restrict socket.io transport methods
"socketTransportProtocols" : ["xhr-polling"],
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
"loglevel": "INFO",
//Logging configuration. See log4js documentation for further information
// https://github.com/nomiddlename/log4js-node
// You can add as many appenders as you want here:
"logconfig" :
{ "appenders": [
{ "type": "console",
// "category": "access"// only logs pad access
}
/*
, { "type": "file"
, "filename": "your-log-file-here.log"
, "maxLogSize": 1024
, "backups": 3 // how many log files there're gonna be at max
//, "category": "test" // only log a specific category
}*/
/*{ "type": "logLevelFilter",
"level": "warn" // filters out all log messages that have a lower level than "error"
, "appender":
{ Use whatever appender you want here }
}*/
/*
, { "type": "logLevelFilter"
, "level": "error" // filters out all log messages that have a lower level than "error"
, "appender":
{ "type": "smtp"
, "subject": "An error occured in your EPL instance!"
, "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
, "sendInterval": 60*5 // in secs -- will buffer log messages; set to 0 to send a mail for every message
, "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
"host": "smtp.example.com", "port": 465,
"secureConnection": true,
"auth": {
"user": "foo@example.com",
"pass": "bar_foo"
}
}
}
}*/
] }
}
TODO:
+ Modify etherpad-lite to read absolute path correctly, so that we aren't
forced to move everything to the software release directory for it to work
Watermarking Software Release
=============================
This Software Release is used by Hexaglobe to deploy their video "watermarking"
system.
This is basically just an nginx daemon compiled with a few custom modules and with
a custom configuration, and an "administration" nginx daemon.
This Software Release also supports some early version of the "edge" support
(i.e you request an instance of hexaglobe-watermarking, with "edge" software-type,
and this instance will itself request many instances of watermakring over the world, in a
"computing CDN" style).
......@@ -16,9 +16,6 @@ offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
script = $${:etc}/run/
service = $${:etc}/service
promise = $${:etc}/promise/
bin = $${buildout:directory}/bin/
[download-source]
......@@ -47,6 +44,8 @@ LD_LIBRARY_PATH = ${libxslt:location}/lib:${libxml2:location}/lib:${zlib:locatio
[phantomjs-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${phantomjs:location}/bin/phantomjs
command-line = ${phantomjs:location}/phantomjs-slapos
wrapper-path = $${directory:bin}/phantomjs
parameters_extra = true
\ No newline at end of file
# XXX we must use "parameters-extra" (- instead of _)
# when new slapos.cookbook will be used
parameters_extra = true
......@@ -8,12 +8,7 @@ extends =
../../component/python-2.7/buildout.cfg
../../component/python-setuptools/buildout.cfg
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
slapos.cookbook-repository
slapos-cookbook
template
phantomjs
eggs
......@@ -30,20 +25,12 @@ entry-points =
scripts =
runTestSuite
# Local development until new egg is published (extra parameters to slapos.cookbook:wrapper
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/slapos.git
branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development, but must be filled for production
md5sum = 1ef1bc6a3fb81300ce7139c512af96d7
md5sum = fa9193534c44717eaad226b552523932
mode = 0644
[jio-repository]
......@@ -64,7 +51,7 @@ lxml = 3.1.1
meld3 = 0.6.10
plone.recipe.command = 1.1
psutil = 0.6.1
slapos.cookbook = 0.76.0
slapos.cookbook = 0.78.1
slapos.recipe.build = 0.11.6
slapos.recipe.template = 2.4.2
......
......@@ -37,11 +37,6 @@ Defautls to 12.
Number of replicates.
Defaults to 0 (no resilience).
'verbose' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~
Non-zero to increase verbosity.
Defaults to 0.
'mysql-storage-count' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Number of MySQL-based storage nodes to deploy. One master node is deployed
......
......@@ -19,10 +19,9 @@ partition-id = ${slap-connection:partition-id}
config-cluster = {{ slapparameter_dict['cluster'] }}
config-partitions = {{ slapparameter_dict.get('partitions', 12) }}
config-replicas = {{ slapparameter_dict.get('replicas', 0) }}
config-verbose = {{ dumps(slapparameter_dict.get('verbose', 0)) }}
[request-config]
base = cluster verbose
base = cluster
master = partitions replicas
node = masters
......
......@@ -16,7 +16,6 @@ ip = ${publish:ip}
port = ${publish:port}
cluster = ${slap-parameter:cluster}
masters = ${slap-parameter:masters}
verbose = ${slap-parameter:verbose}
[publish]
recipe = slapos.cookbook:publish
......@@ -33,6 +32,7 @@ link-binary = ${neo-admin:wrapper}
[directory]
recipe = slapos.cookbook:mkdirectory
promises = ${buildout:directory}/etc/promises
run = ${buildout:directory}/etc/run
log = ${buildout:directory}/var/log
bin = ${buildout:directory}/bin
......
......@@ -17,7 +17,6 @@ cluster = ${slap-parameter:cluster}
partitions = ${slap-parameter:partitions}
replicas = ${slap-parameter:replicas}
masters = ${slap-parameter:masters}
verbose = ${slap-parameter:verbose}
[publish]
recipe = slapos.cookbook:publish
......@@ -34,6 +33,7 @@ link-binary = ${neo-master:wrapper}
[directory]
recipe = slapos.cookbook:mkdirectory
promises = ${buildout:directory}/etc/promises
run = ${buildout:directory}/etc/run
log = ${buildout:directory}/var/log
bin = ${buildout:directory}/bin
......
......@@ -10,6 +10,7 @@ database = neo
conf-file = ${directory:etc}/mariadb.cnf
# No networking (ip & port options)
data-directory = ${directory:srv_mariadb}
bin-directory = ${directory:bin}
pid-file = ${directory:var_run}/mariadb.pid
socket = ${directory:var_run}/mariadb.sock
error-log = ${directory:log}/mariadb_error.log
......@@ -33,7 +34,6 @@ logfile = ${directory:log}/neostorage.log
ip = [${slap-network-information:global-ipv6}]
cluster = ${slap-parameter:cluster}
masters = ${slap-parameter:masters}
verbose = ${slap-parameter:verbose}
database-adapter = MySQL
database-parameters = ${mariadb-instance:user}:${mariadb-instance:password}@${mariadb-instance:database}${mariadb-instance:socket}
wait-database = 60
......
# Note on COOKBOOK/END COOKBOOK: the areas delimited by those tags should be
# dropped when a cookbook version containing neoppod recipe is released as an
# egg on pypi.
# Note on LXML/END LXML: they delimit areas where lxml magic is needed. lxml is
# a slapos.cookbook dependency, so it should be fetched automatically. But when
# automatically fetched, it gets built against system headers/libs, which is
......@@ -10,9 +7,6 @@
[buildout]
extends =
../../stack/slapos.cfg
#COOKBOOK
../../component/git/buildout.cfg
#END COOKBOOK
#LXML
../../component/lxml-python/buildout.cfg
#END LXML
......@@ -20,19 +14,9 @@ extends =
../../component/mariadb/buildout.cfg
../../component/mysql-python/buildout.cfg
develop =
#COOKBOOK
# Note: as we develop a path we fetch, first buildout execution will fail as
# develop couldn't find the clone. Second (and later) runs will succeed.
${:parts-directory}/slapos.cookbook-repository
#END COOKBOOK
parts =
#COOKBOOK
slapos.cookbook-repository
check-recipe
#END COOKBOOK
slapos-deps-eggs
slapos-cookbook
# NEO & dependencies
python2.7
mariadb
......@@ -47,29 +31,12 @@ eggs =
#LXML
${lxml-python:egg}
#END LXML
#COOKBOOK
slapos.cookbook
#END COOKBOOK
#LXML
[lxml-python]
python = python2.7
#END LXML
#COOKBOOK
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = neoppod
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = test -e ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
#END COOKBOOK
[base-template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
......@@ -85,12 +52,12 @@ context =
[template-neo-master]
< = base-template
filename = instance-neo-master.cfg
md5sum = b48e9446fb8fdce24d954d7d4f4c7460
md5sum = 8947620b15535b95163c11a0efab546e
[template-neo-storage-mysql]
< = base-template
filename = instance-neo-storage-mysql.cfg
md5sum = e767c66e7de58232de30bdf26188efe1
md5sum = 518c8c41ce73f0b608fbb1c3b889ca1b
extra-context =
key mariadb_location mariadb:location
key master_cfg template-neo-master:rendered
......@@ -98,12 +65,12 @@ extra-context =
[template-neo-admin]
< = base-template
filename = instance-neo-admin.cfg
md5sum = fcf1a5c937a609a934c8ccd7c1326726
md5sum = 987f69333c563898cab21455509f8024
[template-cluster]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/cluster.cfg.in
md5sum = fe37b2ff36fee65b44945393f63e51c3
md5sum = 7177d129e171b20044bf435ed549af43
[template-instance]
< = base-template
......
[buildout]
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
slapos-cookbook
redis
template
template-redis
slapos.cookbook-repository
check-recipe
extends =
../../component/redis/buildout.cfg
......@@ -31,34 +25,16 @@ output = ${buildout:directory}/template-redis.cfg
mode = 0644
md5sum = f7b01ca7698c1b771f0653d64dc945a7
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = grid-computing
revision =
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
update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --quiet --hard @{upstream} ; fi
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate
# List of signatures of uploaders we trust:
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent Signature
# Łukasz Nowak
# Test Agent (Automatic update from tests)
# Alain Takoudjou
signature-certificate-list =
-----BEGIN CERTIFICATE-----
......@@ -166,31 +142,34 @@ signature-certificate-list =
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9DCCAV2gAwIBAgI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2oyW/sFAS9eojDbYo3hEOOIIwHwYDVR0jBBgwFoAUEpO2oyW/sFAS9eojDbYo
3hEOOIIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBP02wmekqmeD23
90NmwDwyEznDPEJDJybREtP+T++EJ1Q/rcnxIQ5a1iOEWY4RdH87H/+2O/7nDzGs
L0KzeG3WDdmnxLMQ5zpG9Qd5twC0GoMl1zf+8f9/t4QE7Dn4IosP3H3dkcRDQRch
SKYaJZHMckKx40/hhRsyFDR1Gj215g==
-----END CERTIFICATE-----
[versions]
Jinja2 = 2.6
slapos.cookbook=0.78.1
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.8.3
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
lxml = 3.1.0
hexagonit.recipe.cmmi = 2.0
inotifyx = 0.2.0-1
lxml = 3.2.1
meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pytz = 2013b
slapos.core = 0.35.1
slapos.recipe.cmmi = 0.1.1
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
......@@ -199,32 +178,29 @@ xml-marshaller = 0.9.7
Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# Required by:
# slapos.cookbook==0.72.0
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
# slapos.core==0.35.1
netifaces = 0.8
netifaces = 0.8-1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.6.1
pyflakes = 0.7.2
# Required by:
# slapos.cookbook==0.72.0
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# supervisor==3.0b1
# supervisor==3.0b2
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
supervisor = 3.0b2
# Required by:
# slapos.core==0.35.1
......
- Use https to connect to the runner. !!! Critical
- resilient sr: Cloned instances should not launch slapgrid-sr if it was not launched on export instance
[buildout]
extends =
../../component/bash/buildout.cfg
../../component/cloud9/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/rsync/buildout.cfg
../../stack/flask.cfg
../../stack/shacache-client.cfg
../../stack/resilient/buildout.cfg
../../stack/slapos.cfg
parts =
slapos.cookbook-repository
rdiff-backup
template
slapos-cookbook
eggs
instance-runner-import
instance-runner-export
# slapos-cookbook
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = 5de75f295f9382a587343718bb1be124
mode = 0644
md5sum = 5307e4200f044ae57b504ad68444491c
[template-runner]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
md5sum = 91d6550c43b7a43a999724af4650ae40
md5sum = e1d9aeeb3b02dfb3578eddfddd44d053
mode = 0644
[instance-resilient]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg
md5sum = f533d354da36e1bb10819fab8a90109a
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
import-list = file parts template-parts:destination
file replicated template-replicated:destination
mode = 0644
[instance-runner-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg
md5sum = b37ec3af1898834041d8032ff755bac3
mode = 0644
[instance-runner-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-export.cfg.in
output = ${buildout:directory}/instance-runner-export.cfg
md5sum = 4028924d0edb61bdcfbf03bb2bac43b8
mode = 0644
[eggs]
recipe = z3c.recipe.scripts
eggs =
${lxml-python:egg}
cns.recipe.symlink
hexagonit.recipe.download
inotifyx
netaddr
slapos.libnetworkcache
slapos.toolbox[flask_auth]
slapos.core
cns.recipe.symlink
xml_marshaller
pytz
......@@ -10,21 +10,24 @@ extends = common.cfg
parts +=
slapos.cookbook-repository
slapos.core-repository
slapos.toolbox-repository
check-recipe
# slapos.toolbox-repository
# slapos.core-repository
# check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.core-repository
${:parts-directory}/slapos.toolbox-repository
# ${:parts-directory}/slapos.toolbox-repository
# ${:parts-directory}/slapos.core-repository
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = slaprunner
git-executable = ${git:location}/bin/git
#[slapos.toolbox-repository]
#recipe = slapos.recipe.build:gitclone
#repository = http://git.erp5.org/repos/slapos.toolbox.git
#branch = slaprunner-resiliency
#git-executable = ${git:location}/bin/git
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
......@@ -32,17 +35,18 @@ repository = http://git.erp5.org/repos/slapos.git
branch = slaprunner
git-executable = ${git:location}/bin/git
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
git-executable = ${git:location}/bin/git
#[slapos.core-repository]
#recipe = slapos.recipe.build:gitclone
#repository = http://git.erp5.org/repos/slapos.core.git
#branch = master
#git-executable = ${git:location}/bin/git
#
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
# grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
# vim: set ft=cfg:
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts +=
{{ parts.replicate("runner", "3") }}
publish-connection-informations
{{ replicated.replicate("runner", "3", "runner-export", "runner-import") }}
# Bubble up the parameters
[request-runner]
return = url ssh-public-key ssh-url notification-id ip backend_url url cloud9_url ssh_command password_recovery_code
config = instance-amount debug domain number authorized-key notify ip-list namebase runner1-computer-guid pbs-runner1-computer-guid runner2-computer-guid pbs-runner2-computer-guid runner3-computer-guid pbs-runner3-computer-guid
# XXX Cedric LN Ugly hack, resilient stack and slaprunner stack sharing too much ssh sections
config-authorized-key = ${request-pbs-runner-1:connection-ssh-key} ${request-pbs-runner-2:connection-ssh-key} ${slap-parameter:authorized-key}
config-instance-amount = ${slap-parameter:instance-amount}
config-debug = ${slap-parameter:debug}
config-runner1-computer-guid = ${slap-parameter:runner1-computer-guid}
config-pbs-runner1-computer-guid = ${slap-parameter:pbs-runner1-computer-guid}
config-runner2-computer-guid = ${slap-parameter:runner2-computer-guid}
config-pbs-runner2-computer-guid = ${slap-parameter:pbs-runner2-computer-guid}
config-runner3-computer-guid = ${slap-parameter:runner3-computer-guid}
config-pbs-runner3-computer-guid = ${slap-parameter:pbs-runner3-computer-guid}
config-domain = ${slap-parameter:domain}
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = ${request-runner:connection-backend_url}
url = ${request-runner:connection-url}
cloud9_url = ${request-runner:connection-cloud9_url}
ssh_command = ${request-runner:connection-ssh_command}
password_recovery_code = ${request-runner:connection-password_recovery_code}
[slap-parameter]
# Default parameters for distributed deployment
# I.e state "backup1 of maria should go there, ..."
# XXX-Cedric: Hardcoded number of backups. Should be dynamically generated.
runner1-computer-guid =
pbs-runner1-computer-guid =
runner2-computer-guid =
pbs-runner2-computer-guid =
runner3-computer-guid =
pbs-runner3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
domain =
authorized-key =
instance-amount = 10
debug = false
[buildout]
extends = ${template-runner:output}
${pbsready-export:output}
parts +=
urls
slaprunner
cron-entry-backup
[exporter]
recipe = slapos.cookbook:slaprunner.export
wrapper = $${directory:bin}/$${slap-parameter:namebase}-exporter
srv-directory = $${directory:srv}
etc-directory = $${directory:etc}
backup-directory = $${directory:backup}
shell-binary = ${dash:location}/bin/dash
rsync-binary = ${rsync:location}/bin/rsync
# Extends publish section with resilient parameters
[urls]
<= resilient-publish-connection-parameter
backend_url = $${slaprunner:access-url}
url = $${request-frontend:connection-site_url}
cloud9_url = $${cloud9:access-url}
ssh_command = ssh $${dropbear-runner-server:host} -p $${dropbear-runner-server:port}
password_recovery_code = $${recovery-code:passwd}
[buildout]
extends = ${template-runner:output}
${pbsready-import:output}
parts +=
slaprunner
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer]
recipe = slapos.cookbook:slaprunner.import
wrapper = $${directory:bin}/$${slap-parameter:namebase}-importer
srv-directory = $${directory:srv}
etc-directory = $${directory:etc}
backup-directory = $${directory:backup}
shell-binary = ${dash:location}/bin/dash
rsync-binary = ${rsync:location}/bin/rsync
curl-binary = ${curl:location}/bin/curl
backend-url = $${slaprunner:access-url}
......@@ -3,7 +3,7 @@ parts =
cloud9
slaprunner
test-runner
sshkeys-dropbear
sshkeys-dropbear-runner
dropbear-server-add-authorized-key
sshkeys-authority
publish-connection-informations
......@@ -13,7 +13,6 @@ parts =
dropbear-promise
symlinks
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
......@@ -82,9 +81,9 @@ instance-directory = $${runnerdirectory:instance-root}
etc_dir = $${directory:etc}
log_dir = $${directory:log}
run_dir = $${directory:run}
ssh_client = $${sshkeys-dropbear:wrapper}
public_key = $${sshkeys-dropbear:public-key}
private_key = $${sshkeys-dropbear:private-key}
ssh_client = $${sshkeys-dropbear-runner:wrapper}
public_key = $${sshkeys-dropbear-runner:public-key}
private_key = $${sshkeys-dropbear-runner:private-key}
ipv4 = $${slap-network-information:local-ipv4}
ipv6 = $${slap-network-information:global-ipv6}
proxy_port = 50000
......@@ -121,28 +120,28 @@ keys-directory = $${sshkeys-directory:keys}
wrapper = $${directory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[dropbear-server]
[dropbear-runner-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
port = 22222
home = $${directory:ssh}
wrapper = $${directory:bin}/raw_sshd
shell = /bin/bash
wrapper = $${directory:bin}/runner_sshd
shell = ${bash:location}/bin/bash
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[sshkeys-dropbear]
[sshkeys-dropbear-runner]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-server:wrapper}
public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${directory:services}/sshd
executable = $${dropbear-runner-server:wrapper}
public-key = $${dropbear-runner-server:rsa-keyfile}.pub
private-key = $${dropbear-runner-server:rsa-keyfile}
wrapper = $${directory:services}/runner_sshd
[dropbear-server-add-authorized-key]
<= dropbear-server
<= dropbear-runner-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
......@@ -166,7 +165,7 @@ recipe = slapos.cookbook:publish
backend_url = $${slaprunner:access-url}
url = $${request-frontend:connection-site_url}
cloud9_url = $${cloud9:access-url}
ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port}
ssh_command = ssh $${dropbear-runner-server:host} -p $${dropbear-runner-server:port}
password_recovery_code = $${recovery-code:passwd}
......@@ -194,8 +193,8 @@ curl_path = ${curl:location}/bin/curl
[dropbear-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/dropbear
hostname = $${dropbear-server:host}
port = $${dropbear-server:port}
hostname = $${dropbear-runner-server:host}
port = $${dropbear-runner-server:port}
[symlinks]
recipe = cns.recipe.symlink
......
......@@ -8,4 +8,11 @@ offline = true
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-runner:output}
\ No newline at end of file
default = ${template-runner:output}
resilient = ${instance-resilient:rendered}
runner = ${template-runner:output}
runner-import = ${instance-runner-import:output}
runner-export = ${instance-runner-export:output}
frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output}
......@@ -5,7 +5,7 @@
# 2/ Define list of trusted certificates for the cache.
[buildout]
extends = common.cfg
extends = development.cfg
[networkcache]
# signature certificates of the following uploaders.
......@@ -55,13 +55,13 @@ meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pycrypto = 2.6
pytz = 2012j
slapos.cookbook = 0.71.1
slapos.core = 0.34
slapos.libnetworkcache = 0.13.3
pytz = 2013b
#slapos.cookbook = 0.71.1
slapos.core = 0.35.1
slapos.libnetworkcache = 0.13.4
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.34.0
#slapos.toolbox = 0.34.0
smmap = 0.8.2
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
......
......@@ -56,10 +56,11 @@ recipe = slapos.cookbook:mysql
# Options
recovering = false
user = user
user = trac
port = 3306
password = $${mysql-password:passwd}
ip = $${slap-network-information:local-ipv4}
database = boincdb
database = trac
# Paths
wrapper = $${basedirectory:services}/mariadb
......@@ -79,6 +80,11 @@ mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
mysqld-binary = ${mariadb:location}/bin/mysqld
[mysql-password]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.passwd
bytes = 4
[slapmonitor]
recipe = slapos.cookbook:slapmonitor
pid-file = $${basedirectory:run}/mariadb.pid
......@@ -215,4 +221,4 @@ command = $${logrotate:wrapper}
logbox-ip =
logbox-port =
logbox-user =
logbox-passwd =
logbox-passwd =
\ No newline at end of file
[buildout]
parts =
certificate-authority
ca-stunnel
logrotate
logrotate-entry-stunnel
logrotate-entry-apache
cron
cron-entry-logrotate
trac-config
trac-git-hook-script
trac-svn-hook-script
post-revprop-change-script
gitweb-conf
httpd
gitdaemon
promise
ca-shellinabox
frontend-promise
content-promise
publish-connection-informations
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
#----------------
#--
#-- Creation of all needed directories.
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise
[directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
ca-dir = $${rootdirectory:srv}/ssl
httpd-log = $${basedirectory:log}/apache
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
tracconfig = $${rootdirectory:srv}
stunnel-conf = $${rootdirectory:etc}/stunnel
shellinabox = $${rootdirectory:srv}/shellinabox/
[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
#----------------
#--
#-- Deploy cron.
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
#----------------
#--
#-- Deploy logrotate.
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${rootdirectory:bin}/logrotate
conf = $${rootdirectory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status
#----------------
#--
#-- Deploy stunnel.
[stunnel]
recipe = slapos.cookbook:stunnel
client = true
stunnel-binary = ${stunnel:location}/bin/stunnel
remote-host = $${mariadb-urlparse:host}
remote-port = $${mariadb-urlparse:port}
local-host = $${slap-network-information:local-ipv4}
local-port = 3306
log-file = $${basedirectory:log}/stunnel.log
config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid
wrapper = $${rootdirectory:bin}/raw_stunnel
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
[logrotate-entry-stunnel]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = stunnel
log = $${stunnel:log-file}
frequency = daily
rotate-num = 30
notifempty = true
create = true
post = $${stunnel:post-rotate-script}
#----------------
#--
#-- Certificate stuff.
[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-stunnel]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${stunnel:wrapper}
wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Request MariaDB instance and parse its URL.
[request-mariadb]
<= slap-connection
recipe = slapos.cookbook:request
name = MariaDB
software-url = $${slap-connection:software-release-url}
software-type = mariadb
return = url
sla = computer_guid
sla-computer_guid = $${slap-connection:computer-id}
[mariadb-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url}
#----------------
#--
#-- Deploy Apache + PHP application.
[httpd-conf]
recipe = slapos.recipe.template
url = ${template-httpd-conf:location}/${template-httpd-conf:filename}
output = $${rootdirectory:etc}/apache.conf
document_root = $${rootdirectory:srv}/site/
wsgi_location = $${rootdirectory:srv}/site/apache
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
pid_file = $${basedirectory:run}/apache.pid
lock_file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
error_log = $${directory:httpd-log}/error.log
access_log = $${directory:httpd-log}/access.log
[trac-config]
recipe = slapos.recipe.template
url = ${tracIni:location}/${tracIni:filename}
output = $${directory:tracconfig}/trac-config-model.ini
mode = 0600
project_dir = $${rootdirectory:srv}/site
#project_url = http://[$${slap-network-information:global-ipv6}]:8080
project_url = $${request-frontend:connection-site_url}
trac_plugins = $${:project_dir}/plugins
git_bin = ${git:location}/bin/git
git_project_base = $${:project_dir}/git
git_project_list =
git_url = $${:project_url}git
admin_email = $${slap-parameter:admin-email}
project_description = $${slap-parameter:project-desc}
project_footer = $${slap-parameter:project-footer}
project_name = $${slap-parameter:project-name}
#MySQL informations
mysql_username = $${mariadb-urlparse:username}
mysql_password = $${mariadb-urlparse:password}
mysql_database = $${mariadb-urlparse:path}
mysql_host = $${stunnel:local-host}
mysql_port = $${stunnel:local-port}
[trac-wsgi]
recipe = slapos.recipe.template
url = ${tracWsgi:location}/${tracWsgi:filename}
output = $${directory:tracconfig}/trac.wsgi
mode = 0700
trac_env = $${trac-config:project_dir}
python_bin = ${python2.7:location}/bin/python2.7
[trac-svn-hook-script]
recipe = slapos.recipe.template
url = ${trac-svn-hook:location}/${trac-svn-hook:filename}
output = $${directory:tracconfig}/trac-svn-hook
mode = 0700
trac_env = $${trac-config:project_dir}
trac_admin = ${buildout:bin-directory}
python_bin = ${python2.7:location}/bin
python_lib = ${python2.7:location}/lib
svn_python = ${subversion-1.9:location}/lib/svn-python
[trac-git-hook-script]
recipe = slapos.recipe.template
url = ${trac-git-hook:location}/${trac-git-hook:filename}
output = $${directory:tracconfig}/trac-git-hook
mode = 0700
git_bin = ${git:location}/bin/git
trac_admin = ${buildout:bin-directory}/trac-admin
trac_env = $${trac-config:project_dir}
[post-revprop-change-script]
recipe = slapos.recipe.template
url = ${post-revprop-change:location}/${post-revprop-change:filename}
output = $${directory:tracconfig}/post-revprop-change
mode = 0700
trac_svn_hook = $${trac-svn-hook-script:output}
[trac-svnrepo-script]
recipe = slapos.recipe.template
url = ${create-svn-repo:location}/${create-svn-repo:filename}
output = $${rootdirectory:bin}/create-svn-repository.sh
mode = 0700
trac_admin = ${buildout:bin-directory}
svn_bin = ${subversion-1.9:location}/bin
svn_python = ${subversion-1.9:location}/lib/svn-python
python_lib = ${python2.7:location}/lib
[gitweb-conf]
recipe = slapos.recipe.template
url = ${template-gitweb-conf:location}/${template-gitweb-conf:filename}
output = $${rootdirectory:etc}/gitweb.conf
url-list = $${trac-config:project_url}git http://[$${slap-network-information:global-ipv6}]:8080/git git://[$${slap-network-information:global-ipv6}]
base-directory = $${trac-config:project_dir}/git
[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
base-directory = $${trac-config:project_dir}/git
[trac-admin]
recipe = slapos.cookbook:pwgen
file = $${buildout:directory}/.password
pwgen-binary = ${pwgen:location}/bin/pwgen
user = TracAdmin
#---------------------
#to avoid manipulate apache after installation, this part is installed before
#running apache services for the first time
[inittrac]
recipe = slapos.cookbook:trac
site-dir = $${trac-config:project_dir}
site-url = $${trac-config:project_url}
project = $${slap-parameter:project-name}
#Use to install trac additional plugins
plugins-egg-dir = ${trac-plugins-egg:location}
#Usefull for update pythonPath
eggs-dirs =
${buildout:eggs-directory}
${buildout:develop-eggs-directory}
python-lib = ${python2.7:location}/lib
trac-admin = ${buildout:bin-directory}/trac-admin
admin-user = $${trac-admin:user}
admin-password = $${trac-admin:password}
#MySQL informations
mysql-username = $${mariadb-urlparse:username}
mysql-password = $${mariadb-urlparse:password}
mysql-database = $${mariadb-urlparse:path}
mysql-host = $${stunnel:local-host}
mysql-port = $${stunnel:local-port}
#SVN - GIT Project list
svn-project-list = $${slap-parameter:svn-project-list}
git-project-list = $${slap-parameter:git-project-list}
git-binary = ${git:location}/bin/git
#configurations files
trac-ini = $${trac-config:output}
trac-wsgi = $${trac-wsgi:output}
svn-repo-script = $${trac-svnrepo-script:output}
post-revprop-change = $${post-revprop-change-script:output}
trac-svn-hook = $${trac-svn-hook-script:output}
trac-git-hook = $${trac-git-hook-script:output}
file-status = $${buildout:directory}/.status
#Trac User list
htpasswd = ${apache:location}/bin/htpasswd
passwd-file = $${trac-config:project_dir}/.htpasswd
user-list = $${slap-parameter:trac-user-list}
[httpd]
recipe = slapos.cookbook:wrapper
command-line = ${apache:location}/bin/httpd -DFOREGROUND -f "$${httpd-conf:output}"
environment = PYTHONPATH=${subversion-1.9:location}/lib/svn-python:$${inittrac:python_path}
LD_LIBRARY_PATH=${python2.7:location}/lib
wrapper-path = $${basedirectory:services}/httpd
wait-for-files = $${inittrac:file-status}
[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=$${inittrac:site-dir}/git/%D
wrapper-path = $${basedirectory:services}/git-daemon
wait-for-files = $${inittrac:file-status}
[logrotate-entry-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${httpd-conf:error_log} $${httpd-conf:access_log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
#--------------------------
#-----
#---- Request Console for Trac-administration (cannot use Trac without console admin)
[ca-shellinabox]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${shellinabox:wrapper}
wrapper = $${basedirectory:services}/shellinaboxd
key-file = $${shellinabox:key-file}
cert-file = $${shellinabox:cert-file}
[shellinabox]
recipe = slapos.cookbook:shellinabox
ipv6 = $${slap-network-information:global-ipv6}
port = 9000
shell = $${shell:wrapper}
wrapper = $${rootdirectory:bin}/shellinaboxd_raw
shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
password = $${trac-admin:password}
directory = $${inittrac:site-dir}
login-shell = $${rootdirectory:bin}/login
certificate-directory = $${directory:shellinabox}
cert-file = $${directory:shellinabox}/public.crt
key-file = $${directory:shellinabox}/private.key
[shell-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/trac-admin $${inittrac:site-dir}
environment = PYTHONPATH=${subversion-1.9:location}/lib/svn-python:$${inittrac:python_path}
ENV=$${inittrac:site-dir}
SNV_REPOS=$${inittrac:site-dir}/svn
GIT_REPOS=$${inittrac:site-dir}/git
wrapper-path = $${rootdirectory:bin}/shell_raw
[shell]
recipe = slapos.cookbook:shell
wrapper = $${rootdirectory:bin}/shell
shell = $${shell-wrapper:wrapper-path}
home = $${inittrac:site-dir}
ps1 = "\\w> "
path =
#----------------
#--
#-- Request frontend.
#-- We need to remove dependancy between apache, trac and frontend, because url is needed in
#-- trac configuration file and apache depend on trac.
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url custom_domain
config-url = http://[$${slap-network-information:global-ipv6}]:8080
return = site_url
config-custom_domain = $${slap-parameter:domain}
#----------------
#--
#-- Publish instance parameters.
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = http://[$${httpd-conf:ip}]:$${httpd-conf:port}/
frontend_url = $${request-frontend:connection-site_url}
git = $${request-frontend:connection-site_url}git/
svn = $${request-frontend:connection-site_url}svn/
admin_user = $${trac-admin:user}
admin_password = $${trac-admin:password}
admin_shell = https://[$${shellinabox:ipv6}]:$${shellinabox:port}/
#----------------
#--
#-- Deploy promises scripts.
[promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache
hostname = $${httpd-conf:ip}
port = $${httpd-conf: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
[content-promise]
recipe = slapos.cookbook:check_page_content
path = $${basedirectory:promises}/content
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
match = $${slap-parameter:project-name}
[slap-parameter]
domain =
project-name = project
project-desc = My example project
project-footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
admin-email = you.admin@email.com
trac-user-list = {}
svn-project-list = {}
git-project-list = {}
[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-trac:output}
mariadb = ${instance-mariadb:output}
\ No newline at end of file
[buildout]
#develop =
# ${:parts-directory}/slapos.cookbook-repository
# ${trac-plugins-egg:location}/accountmanager
parts =
apache-wsgi
slapos-cookbook
gitweb
subversion-1.9
instance-egg
instance
instance-trac
instance-mariadb
template-httpd-conf
tracWsgi
tracIni
trac-svn-hook
trac-git-hook
post-revprop-change
template-gitweb-cgi
template-gitweb-conf
template-git-http-backend-cgi
# trac-plugins-egg
# check-egg
# slapos.cookbook-repository
# check-recipe
extends =
../../stack/slapos.cfg
../../component/apache/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/apache-wsgi/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/subversion/buildout.cfg
../../component/gzip/buildout.cfg
../../component/dcron/buildout.cfg
../../component/dash/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/git/buildout.cfg
../../component/pwgen/buildout.cfg
../../component/shellinabox/buildout.cfg
../../component/perl/buildout.cfg
allow-hosts +=
*.edgewall.org
*.edgewall.com
[lxml-python]
python = python2.7
[instance-egg]
recipe = z3c.recipe.scripts
python = python2.7
eggs =
${mysql-python:egg}
slapos.toolbox
collective.recipe.cmd
Genshi
docutils
Pygments
pytz
Trac
[trac-plugins-egg]
recipe = plone.recipe.command
svn = ${subversion-1.9:location}/bin/svn
location = ${buildout:parts-directory}/${:_buildout_section_name_}
#command = ${:svn} co http://trac-hacks.org/svn/simplemultiprojectplugin/trunk/ ${:multipleproject}
command = ${:svn} co http://trac-hacks.org/svn/accountmanagerplugin/0.11 ${:location}/accountmanager
[check-egg]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/accountmanager.egg-link
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = bc6ed91a1862a10af661713aa0691848
[instance-trac]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-trac.cfg
output = ${buildout:directory}/template-trac.cfg
md5sum = 1546a60e086b4d083d58ad4fca6dcca8
mode = 0644
[instance-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
output = ${buildout:directory}/template-mariadb.cfg
md5sum = 4ea69039e41ff45bffe8f2620bdf187c
mode = 0644
[template-download]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[tracIni]
<= template-download
filename = trac.ini.in
md5sum = 10286b368b9b6eacae2cdd6caf362759
[tracWsgi]
<= template-download
filename = trac.wsgi.in
md5sum = 5226978477d3336f21f0d8684d23a55a
[trac-svn-hook]
<= template-download
filename = trac-svn-hook.in
md5sum = 81a0e2627af1db4c1d601aabc0ebee0a
[trac-git-hook]
<= template-download
filename = trac-git-hook.in
md5sum = 8704e9717bf1223157b3d25de5a8d9d6
[post-revprop-change]
<= template-download
filename = post-revprop-change.in
md5sum = 917deaeda572ca3e98c2baaf15fcdacc
[create-svn-repo]
<= template-download
filename = create-svn-repo.sh.in
md5sum = 3e4d25ce53dcc3729f4bc682e0d2d239
[template-httpd-conf]
<= template-download
filename = apache.in
md5sum = 4f6d1b748c149f32a39c89931e0cd94a
[template-gitweb-cgi]
<= template-download
filename = gitweb.cgi.in
md5sum = 957a7741c7ab60c4bee6c640e0bdd2fb
[template-gitweb-conf]
<= template-download
filename = gitweb.conf.in
md5sum = ace5a69f59c0be7ea7454183a5550537
[template-git-http-backend-cgi]
<= template-download
filename = git-http-backend.cgi.in
md5sum = d6101df47ddd3b04e34e1f0284686b55
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = trac
revision =
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
update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --quiet --hard @{upstream} ; fi
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
# Alain Takoudjou
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV
BAMMB3RzeGRldjMwHhcNMTExMDE0MT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1AwTjAdBgNVHQ4EFgQU
EpO2oyW/sFAS9eojDbYo3hEOOIIwHwYDVR0jBBgwFoAUEpO2oyW/sFAS9eojDbYo
3hEOOIIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBP02wmekqmeD23
90NmwDwyEznDPEJDJybREtP+T++EJ1Q/rcnxIQ5a1iOEWY4RdH87H/+2O/7nDzGs
L0KzeG3WDdmnxLMQ5zpG9Qd5twC0GoMl1zf+8f9/t4QE7Dn4IosP3H3dkcRDQRch
SKYaJZHMckKx40/hhRsyFDR1Gj215g==
-----END CERTIFICATE-----
[versions]
#Error: Couldn't install: lxml 3.1.2
lxml = 3.1.1
lock-file = 2.0
Genshi = 0.7
Jinja2 = 2.6
MySQL-python = 1.2.4
Pygments = 1.6
Trac = 1.0.1
Werkzeug = 0.8.3
apache-libcloud = 0.12.4
async = 0.6.1
buildout-versions = 1.7
collective.recipe.cmd = 0.6
docutils = 0.10
gitdb = 0.5.4
hexagonit.recipe.cmmi = 2.0
slapos.recipe.cmmi = 0.1.1
inotifyx = 0.2.0
meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pycrypto = 2.6
pytz = 2013b
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.34.0
smmap = 0.8.2
z3c.recipe.scripts = 1.0.1
slapos.cookbook = 0.78.1
# Required by:
# slapos.core==0.35.1
# slapos.toolbox==0.34.0
Flask = 0.9
# Required by:
# slapos.toolbox==0.34.0
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.34.0
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.34.0
feedparser = 5.1.3
# Required by:
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# slapos.toolbox==0.34.0
paramiko = 1.10.1
# Required by:
# slapos.toolbox==0.34.0
psutil = 0.7.0
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.1
# Required by:
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.toolbox==0.34.0
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.toolbox==0.34.0
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
# Apache static configuration
# Automatically generated
# Basic server configuration
PidFile "${:pid_file}"
Listen ${:ip}:${:port}
ServerAdmin someone@email
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
# Log configuration
ErrorLog "${:error_log}"
LogLevel warn
LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b" common
CustomLog "${:access_log}" common
ScriptSock "${:cgid-sock}"
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
WSGIScriptAlias / ${:wsgi_location}/trac.wsgi
<Directory ${:wsgi_location}>
WSGIApplicationGroup %{GLOBAL}
AllowOverride All
Require all granted
</Directory>
<Location /login>
AuthType Basic
AuthName "Trac Administrator Access"
AuthUserFile ${:document_root}/.htpasswd
Require valid-user
</Location>
<Location /svn>
ErrorDocument 404 default
DAV svn
SVNParentPath ${:document_root}/svn/
AuthType Basic
AuthName "SVN Repository Access"
AuthUserFile ${:document_root}/.htpasswd
SVNAdvertiseV2Protocol Off
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Alias "/static/" "${:gitweb-static-dir}"
<Directory "${:gitweb-static-dir}">
Options FollowSymLinks
Require all granted
</Directory>
# This is Static Accelerated git pull
AliasMatch "^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$" "${:document_root}/git/$1"
AliasMatch "^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$" "${:document_root}/git/$1"
# When it can't be statically delivered, we rely on git-http-backend
ScriptAliasMatch \
"(?x)^/git/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
"${:git-http-backend}/$1"
# Everything else is gitweb interface
ScriptAlias "/git" "${:gitweb-script}"
RewriteEngine On
RewriteCond %{QUERY_STRING} service=git-receive-pack
RewriteRule ^/git/.*/info/refs$ - [E=git_receive_pack:1]
<Location /git>
Order deny,allow
Deny from env=git_receive_pack
AuthType Basic
AuthName "Git Push Access"
AuthBasicProvider file
AuthUserFile ${:document_root}/.htpasswd
Require valid-user
Satisfy any
</Location>
<LocationMatch "^/git/.*/git-receive-pack$">
AuthType Basic
AuthName "Git Push Access"
AuthBasicProvider file
AuthUserFile ${:document_root}/.htpasswd
Require valid-user
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
</LocationMatch>
# List of modules
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule env_module modules/mod_env.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule wsgi_module modules/mod_wsgi.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.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
\ No newline at end of file
#!/bin/sh
export PATH=${:trac_admin}:${:svn_bin}:$PATH
export PYTHONPATH=${:svn_python}:$PYTHONPATH
export LD_LIBRARY_PATH=${:python_lib}:$LD_LIBRARY_PATH
ENV="$1"
REPO="$2"
REALM="$3"
if [ -z "$ENV" -o -z "$REPO" ]; then
echo "Usage: $0 ENV REPO"
exit 2
fi
RPATH="$ENV/svn/$REPO"
PASSWD="$ENV/svnpasswd"
svnadmin create $RPATH
trac-admin $ENV repository add $REPO $RPATH svn
trac-admin $ENV repository resync $REPO
echo "[general]
anon-access = read
auth-access = write
password-db = $PASSWD
realm = $REALM" > $RPATH/conf/svnserve.conf
#!/bin/sh
## This is a very dirty hack
export PATH_INFO="$${REDIRECT_URL:-$PATH_INFO}"
GIT_PROJECT_ROOT='${:base-directory}' GIT_HTTP_EXPORT_ALL= exec '${:githttpbackend}' $@
#!/bin/sh
GITWEB_CONFIG='${gitweb-conf:output}' exec '${:perl}' '${:gitweb}' $@
\ No newline at end of file
$projectroot = '${:base-directory}';
$site_name = '${slap-parameter:project-name}';
our @git_base_url_list = qw(${:url-list});
# Beautiful URLs
$feature{'pathinfo'}{'default'} = [1];
$feature{'blame'}{'default'} = [1];
#!/bin/sh
if [ "$PROPNAME" = "svn:log" -o "$PROPNAME" = "svn:author" ]; then
${:trac_svn_hook} $REPOS $REV $USER $PROPNAME
fi
\ No newline at end of file
#!/bin/sh
REV=$(${:git_bin} rev-parse HEAD)
${:trac_admin} ${:trac_env} added "$1" $REV
\ No newline at end of file
#!/bin/sh
export TRAC_ENV=${:trac_env}
export PATH=${:trac_admin}:${:python_bin}:$PATH
export LD_LIBRARY_PATH=${:python_lib}:$LD_LIBRARY_PATH
export PYTHONPATH=${:svn_python}:$PYTHONPATH
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
# -- Foolproofing
if [ -z "$REPOS" -o -z "$REV" ]; then
echo "Usage: $0 REPOS REV"
exit 2
fi
if ! python -V 2>/dev/null; then
echo "python is not in the PATH ($PATH), check PATH and LD_LIBRARY_PATH."
exit 2
fi
if [ -z "$TRAC_ENV" ]; then
echo "TRAC_ENV is not set."
exit 2
fi
# -- Feedback
echo "----"
if [ -z "$USER" -a -z "$PROPNAME" ]; then
EVENT="added"
echo "Changeset $REV was added in $REPOS"
else
EVENT="modified"
echo "Changeset $REV was modified by $USER in $REPOS"
fi
# -- Call "trac-admin ... changeset ... $$REPOS $$REV" for each Trac environment
ifs=$IFS
IFS=:
if [ -n "$BASH_VERSION" ]; then # we can use Bash syntax
if [[ $${BASH_VERSINFO[5]} = *cygwin ]]; then
IFS=";"
fi
fi
for env in $TRAC_ENV; do
if [ -r "$env/VERSION" ]; then
log=$env/log/svn-hooks-`basename $REPOS`.log
nohup sh <<EOF >> $log 2>&1 &
echo "Changeset $REV $EVENT"
trac-admin $env changeset $EVENT $REPOS $REV && \
echo "OK" || echo "FAILED: see the Trac log"
EOF
else
echo "$env doesn't seem to be a Trac environment, skipping..."
fi
done
IFS=$ifs
# -*- coding: utf-8 -*-
[attachment]
max_size = 262144
max_zip_size = 2097152
render_unsafe_content = false
[browser]
color_scale = True
downloadable_paths = /trunk, /branches/*, /tags/*
hide_properties = svk:merge
intermediate_color =
intermediate_point =
newest_color = (255, 136, 136)
oldest_color = (136, 136, 255)
oneliner_properties = trac:summary
render_unsafe_content = false
wiki_properties = trac:description
[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true
[header_logo]
alt = (please configure the [header_logo] section in trac.ini)
height = -1
link =
src = site/your_project_logo.png
width = -1
[git]
cached_repository = false
git_bin = ${:git_bin}
git_fs_encoding = utf-8
persistent_cache = false
projects_base = ${:git_project_base}
projects_list = ${:git_project_list}
projects_url = ${:git_url}
shortrev_len = 7
trac_user_rlookup = false
use_committer_id = true
use_committer_time = true
wikishortrev_len = 40
[svn]
branches = trunk, branches/*
tags = tags/*
[components]
webadmin.* = enabled
tracopt.versioncontrol.svn.* = enabled
tracopt.versioncontrol.git.* = enabled
tracopt.ticket.commit_updater.* = enabled
[inherit]
htdocs_dir =
plugins_dir = ${:trac_plugins}
templates_dir =
[logging]
log_file = trac.log
# log_format = <inherited>
log_level = DEBUG
log_type = none
[milestone]
stats_provider = DefaultTicketGroupStatsProvider
[mimeviewer]
max_preview_size = 262144
mime_map = text/x-dylan:dylan, text/x-idl:ice, text/x-ada:ads:adb
mime_map_patterns = text/plain:README|INSTALL|COPYING.*
pygments_default_style = trac
pygments_modes =
tab_width = 8
treat_as_binary = application/octet-stream, application/pdf, application/postscript, application/msword,application/rtf,
[notification]
admit_domains =
always_notify_owner = false
always_notify_reporter = false
always_notify_updater = true
ambiguous_char_width = single
batch_subject_template = $prefix Batch modify: $tickets_descr
email_sender = SmtpEmailSender
ignore_domains =
mime_encoding = none
sendmail_path = sendmail
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = false
smtp_from = trac@localhost
smtp_from_author = false
smtp_from_name =
smtp_password =
smtp_port = 25
smtp_replyto = trac@localhost
smtp_server = localhost
smtp_subject_prefix = __default__
smtp_user =
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false
[project]
admin = ${:admin_email}
admin_trac_url = .
descr = ${:project_description}
footer = ${:project_footer}
icon = common/trac.ico
name = ${:project_name}
url = ${:project_url}
[query]
default_anonymous_query = status!=closed&cc~=$USER
default_query = status!=closed&owner=$USER
items_per_page = 100
ticketlink_query = ?status=!closed
[report]
items_per_page = 100
items_per_page_rss = 0
[revisionlog]
default_log_limit = 100
graph_colors = ['#cc0', '#0c0', '#0cc', '#00c', '#c0c', '#c00']
[roadmap]
stats_provider = DefaultTicketGroupStatsProvider
[search]
# default_disabled_filters = <inherited>
min_query_length = 3
[sqlite]
# extensions = <inherited>
[ticket]
default_cc =
default_component =
default_description =
default_keywords =
default_milestone =
default_owner = < default >
default_priority = major
default_resolution = fixed
default_severity =
default_summary =
default_type = defect
default_version =
max_comment_size = 262144
max_description_size = 262144
preserve_newlines = default
restrict_owner = false
workflow = ConfigurableTicketWorkflow
[ticket-workflow]
accept = new,assigned,accepted,reopened -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,accepted,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,accepted,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY
[ticket-custom]
project = ${:project_name}
project.label = Project
project.value =
[timeline]
abbreviated_messages = True
changeset_collapse_events = false
changeset_long_messages = false
changeset_show_files = 0
default_daysback = 30
max_daysback = 90
newticket_formatter = oneliner
ticket_show_details = false
[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
authz_file =
authz_module_name =
auto_preview_timeout = 2.0
auto_reload = False
backup_dir = db
base_url = ${:project_url}
check_auth_ip = false
database = mysql://${:mysql_username}:${:mysql_password}@${:mysql_host}:${:mysql_port}/${:mysql_database}
debug_sql = False
default_charset = utf-8
default_dateinfo_format = relative
genshi_cache_size = 128
htdocs_location =
ignore_auth_case = false
jquery_location =
jquery_ui_location =
jquery_ui_theme_location =
mainnav = wiki, timeline, roadmap, browser, tickets, newticket, search
metanav = login, logout, prefs, help, about
mysqldump_path = mysqldump
never_obfuscate_mailto = false
permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
pg_dump_path = pg_dump
repository_dir =
repository_sync_per_request = (default)
repository_type = svn
resizable_textareas = true
secure_cookies = False
show_email_addresses = false
show_ip_addresses = false
timeout = 20
use_base_url_for_redirect = False
[versioncontrol]
allowed_repository_dir_prefixes =
[wiki]
ignore_missing_pages = false
max_size = 262144
render_unsafe_content = false
safe_schemes = cvs, file, ftp, git, irc, http, https, news, sftp, smb, ssh, svn, svn+ssh
split_page_names = false
#!${:python_bin}
# -*- coding: utf-8 -*-
import os
def application(environ, start_request):
if not 'trac.env_parent_dir' in environ:
environ.setdefault('trac.env_path', '${:trac_env}')
if 'PYTHON_EGG_CACHE' in environ:
os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
elif 'trac.env_path' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_path'], '.egg-cache')
elif 'trac.env_parent_dir' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
from trac.web.main import dispatch_request
return dispatch_request(environ, start_request)
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going upward",
"default": 6001
}]
},
"backend-url": {
"description": "The backend url that varnish will cache",
"type": "string"
},
"web-checker": {
"description": "Controls automated cache checker, disabled if null or empty"
"properties": {
"frontend-url": {
"description": "Override entry-point-url web checker will check the HTTP headers of all links in the web site, '%(ip)s' and '%(port)s' being substituted with varnish's listening ip and port, respectively",
"default": "http://%(ip)s:%(port)s/",
"type": "string"
},
"mail-address": {
"description": "Email address to which web checker result is sent",
"type": "string"
},
"smtp-host": {
"description": "The smtp server to be used to send the web checker result",
"type": "string"
}
},
"type": "object"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by Varnish instanciation",
"properties": {
"url": {
"description": "Varnish HTTP service access information",
"type": "string"
}
},
"type": "object"
}
{% set tcpv4_port = slapparameter_dict.get('tcpv4_port', 6001) -%}
{% set ip = (ipv4_set | list)[0] %}
[buildout]
parts =
publish-varnish-connection-information
varnish-instance
cron
cron-entry-logrotate
{# When web_checker related parameter is given, web_checker will be enabled.-#}
{% set web_checker_dict = slapparameter_dict.get('web-checker', {}) -%}
{% if web_checker_dict -%}
web-checker
cron-entry-web-checker
logrotate-entry-web-checker
[cron-entry-web-checker]
<= cron
recipe = slapos.cookbook:cron.d
name = web-checker
frequency = 0 0 * * *
command = ${varnish-instance:web-checker} ${web-checker:web-checker-config}
[web-checker]
recipe = slapos.cookbook:webchecker
web-checker-config = ${rootdirectory:etc}/web_checker.cfg
web-checker-working-directory = ${directory:web-checker}
frontend-url = {{ web_checker_dict.get('frontend-url', 'http://%(ip)s:%(port)s/') % {
'ip': ip,
'port': tcpv4_port,
} }}
mail-address = {{ web_checker_dict['mail-address'] }}
smtp-host = {{ web_checker_dict['smtp-host'] }}
wget-binary-path = {{ parameter_dict['wget'] }}/bin/wget
varnishlog-binary-path = ${varnish-instance:varnishlog-wrapper}
web-checker-log = ${basedirectory:log}/web-checker.log
[logrotate-entry-web-checker]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = web-checker
log = ${web-checker:web-checker-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
{%- endif %}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-varnish-connection-information]
recipe = slapos.cookbook:publish.serialised
url = http://${varnish-instance:ip}:${varnish-instance:server-port}/
[varnish-instance]
recipe = slapos.cookbook:generic.varnish
backend-url = {{ slapparameter_dict['backend-url'] }}
# Network options
ip = {{ ip }}
server-port = {{ tcpv4_port }}
manager-port = {{ tcpv4_port + 1 }}
stunnel-port = {{ tcpv4_port + 2}}
# Paths: Running wrappers
varnishd-wrapper = ${basedirectory:services}/varnishd
varnishlog-wrapper = ${rootdirectory:bin}/varnishlog
stunnel-wrapper = ${basedirectory:services}/stunnel
# Binary information
varnishd-binary = {{ parameter_dict['varnish'] }}/sbin/varnishd
varnishlog-binary = {{ parameter_dict['varnish'] }}/bin/varnishlog
shell-path = {{ parameter_dict['dash'] }}/bin/dash
stunnel-binary = {{ parameter_dict['stunnel'] }}/bin/stunnel
gcc-location = {{ parameter_dict['gcc'] }}/bin
# Configuration by VCL
vcl-file = ${rootdirectory:etc}/default.vcl
pid-file = ${basedirectory:run}/varnishd.pid
stunnel-conf-file = ${rootdirectory:etc}/stunnel.conf
stunnel-pid-file = ${basedirectory:run}/stunnel.pid
varnish-data = ${directory:varnish-data}
# this will pass at -n option
varnish-instance-name = ${directory:varnish-instance}
web-checker = {{ parameter_dict['buildout-bin-directory'] }}/web_checker_utility
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = {{ parameter_dict['dcron'] }}/sbin/crond
cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps}
binary = ${basedirectory:services}/crond
catcher = ${cron-simplelogger:wrapper}
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${rootdirectory:bin}/cron_simplelogger
log = ${basedirectory:log}/cron.log
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = {{ parameter_dict['logrotate'] }}/usr/sbin/logrotate
gzip-binary = {{ parameter_dict['gzip'] }}/bin/gzip
gunzip-binary = {{ parameter_dict['gzip'] }}/bin/gunzip
# Directories
wrapper = ${rootdirectory:bin}/logrotate
conf = ${rootdirectory:etc}/logrotate.conf
logrotate-entries = ${directory:logrotate-entries}
backup = ${directory:logrotate-backup}
state-file = ${rootdirectory:srv}/logrotate.status
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = ${rootdirectory:etc}/run
run = ${rootdirectory:var}/run
backup = ${rootdirectory:srv}/backup
log = ${rootdirectory:var}/log
backup = ${rootdirectory:srv}/backup
[directory]
recipe = slapos.cookbook:mkdirectory
varnish-data = ${rootdirectory:srv}/varnish
varnish-instance = ${directory:varnish-data}/instance
cron-entries = ${rootdirectory:etc}/cron.d
crontabs = ${rootdirectory:etc}/crontabs
cronstamps = ${rootdirectory:etc}/cronstamps
logrotate-backup = ${basedirectory:backup}/logrotate
logrotate-entries = ${rootdirectory:etc}/logrotate.d
web-checker = ${rootdirectory:srv}/web-checker
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
srv = ${buildout:directory}/srv
bin = ${buildout:directory}/bin
[buildout]
parts =
switch-softwaretype
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context =
context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slapparameter_dict slap-configuration:configuration
key ipv4_set slap-configuration:ipv4
${:extra-context}
[dynamic-template-varnish-parameters]
dash = {{ dash_location }}
dcron = {{ dcron_location }}
gcc = {{ gcc_location }}
gzip = {{ gzip_location }}
logrotate = {{ logrotate_location }}
stunnel = {{ stunnel_location }}
varnish = {{ varnish_location }}
wget = {{ wget_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-varnish]
< = jinja2-template-base
template = {{ template_varnish }}
filename = instance-varnish.cfg
extra-context =
section parameter_dict dynamic-template-varnish-parameters
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${dynamic-template-varnish:rendered}
[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}
[buildout]
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
extensions =
slapos.zcbworkarounds
mr.developer
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/
http://dist.repoze.org
http://www.nexedi.org/static/packages/source/
extends =
../../stack/slapos.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gcc/buildout.cfg
../../component/git/buildout.cfg
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/varnish/buildout.cfg
../../component/wget/buildout.cfg
parts =
dash
dcron
gcc-minimal
slapos-toolbox
stunnel
varnish-3.0
wget
# Local development
slapos.cookbook-repository
check-recipe
# Create instance template
template
# Local development
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[template-jinja2-base]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${buildout:directory}/${:filename}
# XXX: extra-context is needed because we cannot append to a key of an extended
# section.
extra-context =
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
${:extra-context}
[template]
< = template-jinja2-base
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 8e906d749e19ee13fe5b7f4d9bfcf896
extra-context =
key buildout_bin_directory buildout:bin-directory
key dash_location dash:location
key dcron_location dcron:location
key gcc_location gcc-minimal:location
key gzip_location gzip:location
key logrotate_location logrotate:location
key stunnel_location stunnel:location
key template_varnish template-varnish:target
key varnish_location varnish-3.0:location
key wget_location wget:location
[template-varnish]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-varnish.cfg.in
md5sum = 4334d900f212d170fd0ca35865879bdf
mode = 640
[eggs]
recipe = zc.recipe.egg
python = python2.7
eggs =
${lxml-python:egg}
erp5.util
pytz
lock_file
inotifyx
scripts =
web_checker_utility = erp5.util.webchecker:web_checker_utility
[lxml-python]
python = python2.7
[slapos-toolbox]
recipe = zc.recipe.egg
python = ${eggs:python}
eggs =
${lxml-python:egg}
slapos.toolbox
scripts =
killpidfromfile
[versions]
erp5.util = 0.4.34
lxml = 2.3.6
slapos.toolbox = 0.33.1
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
# Aurélien Calonne
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO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A4GNADCBiQKB
gQDZTH9etPUC+wMZQ3UIiOwyyCfHsJ+7duCFYjuo1uZrhtDt/fp8qb8qK9ob+df3
EEYgA0IgI2j/9jNUEnKbc5+OrfKznzXjrlrH7zU8lKBVNCLzQuqBKRNajZ+UvO8R
nlqK2jZCXP/p3HXDYUTEwIR5W3tVCEn/Vda4upTLcPVE5wIDAQABo1AwTjAdBgNV
HQ4EFgQU7KXaNDheQWoy5uOU01tn1M5vNkEwHwYDVR0jBBgwFoAU7KXaNDheQWoy
5uOU01tn1M5vNkEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQASmqCU
Znbvu6izdicvjuE3aKnBa7G++Fdp2bdne5VCwVbVLYCQWatB+n4crKqGdnVply/u
+uZ16u1DbO9rYoKgWqjLk1GfiLw5v86pd5+wZd5I9QJ0/Sbz2vZk5S4ciMIGwArc
m711+GzlW5xe6GyH9SZaGOPAdUbI6JTDwLzEgA==
-----END CERTIFICATE-----
============================
Zabbix Agent Software Release
=============================
This Software Release allows to deploy a Zabbix Agent that will connect
to an existing Zabbix Server.
Please see http://www.zabbix.com/ for more informations.
Mandatory parameters
====================
hostname
--------
Name of the machine probed by the agent.
server
------
list of Zabbix servers to connect to, comma-seperated.
Optional parameters
===================
custom-user-parameter
---------------------
Add custom UserParameter(s) lines to the Zabbix Agent configuration file.
Examples of instance parameters XML
===================================
Example 1
~~~~~~~~~
Simple request: just request a new instance of it, with the following parameters::
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="server">REPLACE BY IP(v6) OF ZABBIX SERVER</parameter>
<parameter id="hostname">REPLACE BY DESIRED HOSTNAME OF MACHINE</parameter>
</instance>
Example 2
~~~~~~~~~
Deploy a Zabbix Agent instance for machine named "mymachine" connecting to a Zabbix server accessible from 2001:41d0:1:9b1a::1::
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="server">2001:41d0:1:9b1a::1</parameter>
<parameter id="hostname">mymachine</parameter>
</instance>
Example 3
~~~~~~~~~
Deploy a Zabbix Agent instance for machine named "mymachine" connecting to a Zabbix server accessible from 2001:41d0:1:9b1a::1, with several custom parameters::
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="server">2001:41d0:1:9b1a::1</parameter>
<parameter id="hostname">mymachine</parameter>
<parameter id="custom-user-parameter">
UserParameter=custom_random,echo $RANDOM
UserParameter=custom_date,date
</parameter>
</instance>
......@@ -52,73 +52,49 @@ signature-certificate-list =
[versions]
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.59
slapos.recipe.template = 2.4
inotifyx = 0.2.0-1
lxml = 3.2.0
meld3 = 0.6.10
netaddr = 0.7.10
pytz = 2013b
slapos.cookbook = 0.78.0
slapos.core = 0.35.1
slapos.recipe.cmmi = 0.1
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.26.2
# slapos.core==0.35.1
Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.59
PyXML = 0.8.4
# Required by:
# netaddr==0.7.7
Sphinx = 1.1.3
# Required by:
# slapos.cookbook==0.59
inotifyx = 0.2.0
# slapos.core==0.35.1
netifaces = 0.8-1
# Required by:
# slapos.cookbook==0.59
# slapos.core==0.26.2
# xml-marshaller==0.9.7
lxml = 2.3.4
# slapos.core==0.35.1
pyflakes = 0.7.2
# Required by:
# slapos.cookbook==0.59
netaddr = 0.7.7
# Required by:
# slapos.core==0.26.2
netifaces = 0.8
# Required by:
# slapos.cookbook==0.59
# slapos.core==0.26.2
# zc.buildout==1.6.0-dev-SlapOS-006
# zc.recipe.egg==1.3.2
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.0
# slapos.core==0.35.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.59
slapos.core = 0.26.2
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.26.2
supervisor = 3.0a12
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.59
xml-marshaller = 0.9.7
# slapos.core==0.35.1
zope.interface = 4.0.5
# Required by:
# slapos.cookbook==0.59
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.26.2
zope.interface = 4.0.1
......@@ -34,15 +34,15 @@ eggs =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-boinc.cfg
output = ${buildout:directory}/template-boinc.cfg
md5sum = ead728e74a7fe58ef9b39397f2354f77
md5sum = 6642942dde15ab5195d8d8533690ef29
mode = 0644
#Template for deploying MySQL Database Server
[template-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
url = ${:_profile_base_location_}/../lamp/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/template-mariadb.cfg
md5sum = 8142244a3087a23e002a08225579528a
#md5sum = 8142244a3087a23e002a08225579528a
mode = 0644
[template-httpd-conf]
......@@ -50,7 +50,7 @@ recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
mode = 0644
filename = apache.in
md5sum = 030892494ce87357e6e09dcd89187bf4
md5sum = 5d5f49331debc4e3d2a02d8525064f8e
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[boinc-default]
......@@ -179,11 +179,83 @@ signature-certificate-list =
-----END CERTIFICATE-----
[versions]
#Couldn't install lxml 3.1.2
lxml = 3.1.1
# Numpy 1.7.0 doesn't install well
numpy = 1.6.2
# websockify 0.4.1 doesn't install well
websockify = 0.3.0
pycrypto = 2.6
lxml = 3.2.1
setuptools = 0.6c12dev-r88846
Jinja2 = 2.7
MarkupSafe = 0.18
MySQL-python = 1.2.4
Werkzeug = 0.8.3
apache-libcloud = 0.12.4
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
inotifyx = 0.2.0-1
meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pytz = 2013b
slapos.recipe.cmmi = 0.1.1
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.34.0
smmap = 0.8.2
slapos.cookbook=0.78.1
# Required by:
# slapos.core==0.35.1
# slapos.toolbox==0.34.0
Flask = 0.9
# Required by:
# slapos.toolbox==0.34.0
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.34.0
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.34.0
feedparser = 5.1.3
# Required by:
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
# slapos.core==0.35.1
netifaces = 0.8-1
# Required by:
# slapos.toolbox==0.34.0
paramiko = 1.10.1
# Required by:
# slapos.toolbox==0.34.0
psutil = 0.7.1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.2
# Required by:
# slapos.toolbox==0.34.0
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.toolbox==0.34.0
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
\ No newline at end of file
......@@ -136,6 +136,7 @@ php_ini_dir = $${directory:php-ini-dir}
niceprojectname = $${slap-parameter:project}@HOME
project = $${slap-parameter:project}
installroot = $${rootdirectory:project}/$${slap-parameter:project}
result_dir = $${rootdirectory:project}/$${slap-parameter:project}/sample_results/
[environment]
PATH = $${rootdirectory:bin}:${subversion:location}/bin:${perl:location}/bin:%(PATH)s
......@@ -321,6 +322,7 @@ path = $${basedirectory:scripts}/slapmonitor
[publish-connection-informations]
recipe = slapos.cookbook:publish
boinc_admin_page = $${boinc-server:admin_page}
boinc_result_url = $${boinc-server:result_page}
boinc_home_page = $${boinc-server:home_page}
boinc_user = $${boinc-server:user}
boinc_passwd = $${boinc-passwd:passwd}
......@@ -350,7 +352,6 @@ curl_path = ${curl:location}/bin/curl
[slap-parameter]
#Default config value for boinc
dbname = boinctest
project = boinc_test
full-name = Boinc Project SAMPLE
copyright-holder = REPLACE WITH COPYRIGHT HOLDER
......
......@@ -59,11 +59,13 @@ LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule autoindex_module modules/mod_autoindex.so
## Settings for BOINC project ${:niceprojectname}
Alias /${:project} ${:installroot}/html/user
Alias /${:project}_ops ${:installroot}/html/ops
Alias /${:project}_result/ ${:installroot}/sample_results/
ScriptAlias /${:project}_cgi ${:installroot}/cgi-bin
# Note: projects/*/keys/ should NOT be readable!
......@@ -78,4 +80,13 @@ ScriptAlias /${:project}_cgi ${:installroot}/cgi-bin
Options ExecCGI
AllowOverride AuthConfig
Require all granted
</Directory>
Alias /${:project}_result/ ${:result_dir}
<Directory "${:result_dir}">
Options +Indexes
AuthName "${:project}"
AuthType Basic
AuthUserFile ${:installroot}/html/ops/.htpasswd
require valid-user
</Directory>
\ No newline at end of file
......@@ -36,7 +36,6 @@ extends =
../component/libreoffice-bin/buildout.cfg
../component/libpng/buildout.cfg
../component/lxml-python/buildout.cfg
../component/python-2.6/buildout.cfg
../component/python-2.7/buildout.cfg
../component/xorg/buildout.cfg
../component/fonts/buildout.cfg
......@@ -50,6 +49,7 @@ extends =
../component/dcron/buildout.cfg
../component/coreutils/buildout.cfg
../component/cloudooo/buildout.cfg
../component/haproxy/buildout.cfg
versions = versions
......@@ -77,17 +77,14 @@ parts =
poppler
ffmpeg
bootstrap2.6
rdiff-backup
haproxy
cloudooo
# Local development
develop +=
${:parts-directory}/cloudooo
[bootstrap2.6]
python = python2.6
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-006
......@@ -19,7 +19,7 @@ allow-hosts += pybrary.net
extends =
# Exact version of Zope
http://svn.zope.org/repos/main/Zope/tags/2.12.26/versions.cfg
https://raw.github.com/zopefoundation/Zope/2.13.21/versions.cfg
../../stack/slapos.cfg
../../component/logrotate/buildout.cfg
../../component/dcron/buildout.cfg
......@@ -44,10 +44,10 @@ extends =
../../component/pil-python/buildout.cfg
../../component/pycrypto-python/buildout.cfg
../../component/pysvn-python/buildout.cfg
../../component/python-2.6/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/python-ldap-python/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/subversion/buildout.cfg
../../component/tesseract/buildout.cfg
../../component/varnish/buildout.cfg
......@@ -76,6 +76,7 @@ parts =
graphviz
haproxy
jsl
stunnel
varnish-3.0
w3m
poppler
......@@ -91,7 +92,6 @@ parts =
w3-validator
tesseract
hookbox
bootstrap2.6
perl-DBD-mariadb
perl-DBI
percona-toolkit
......@@ -134,8 +134,6 @@ parts =
# Local development
slapos.cookbook-repository
check-recipe
slapos.cookbook-python2.6
slapos.recipe.template-python2.6
# Create instance template
template
......@@ -152,19 +150,6 @@ stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slapos.cookbook-python2.6]
recipe = zc.recipe.egg
eggs = slapos.cookbook
scripts =
python = python2.6
ugly-depend-on = ${slapos.cookbook-repository:repository} ${slapos.cookbook-repository:branch}
[slapos.recipe.template-python2.6]
recipe = zc.recipe.egg
eggs = slapos.recipe.template
scripts =
python = python2.6
[template-jinja2-base]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
......@@ -215,7 +200,7 @@ extra-context =
[template-tidstorage]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-tidstorage.cfg.in
md5sum = bd5872108f812c6823a8915670e51c4c
md5sum = 5572d10b343bd2de90deeaf55dd0fdc7
mode = 640
[template-cloudooo]
......@@ -235,7 +220,7 @@ mode = 640
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = fbb7ea50d7ea6d4e25725801cc3fd5f9
md5sum = a1a5a9983207e4a8128bab331cbd3cd5
extra-context =
key apache_location apache:location
key aspell_location aspell:location
......@@ -274,6 +259,7 @@ extra-context =
key openssl_location openssl:location
key poppler_location poppler:location
key sed_location sed:location
key stunnel_location stunnel:location
key template_cloudooo template-cloudooo:target
key template_erp5_single template-erp5-single:target
key template_erp5_cluster template-erp5-cluster:target
......@@ -316,7 +302,7 @@ mode = 640
[template-varnish]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-varnish.cfg.in
md5sum = 17aee2df57b121343b1fd65f4b51ce80
md5sum = ae0465591c22c0cb316c1706965c6b18
mode = 640
[bt5-repository]
......@@ -340,9 +326,6 @@ command =
${buildout:executable} ${:genbt5list} ${local-bt5-repository:list}
update-command = ${:command}
[bootstrap2.6]
python = python2.6
[erp5_repository_list]
repository_id_list = erp5
......@@ -364,7 +347,7 @@ update-command = ${:command}
# XXX: Workaround for fact ERP5Type is not an distribution and does not
# expose entry point for test runner
recipe = zc.recipe.egg
python = python2.6
python = python2.7
eggs = ${eggs:eggs}
extra-paths = ${eggs:extra-paths}
entry-points =
......@@ -402,7 +385,7 @@ initialization =
# XXX: Workaround for fact ERP5Type is not an distribution and does not
# expose entry point for test runner
recipe = zc.recipe.egg
python = python2.6
python = python2.7
eggs = ${eggs:eggs}
extra-paths = ${eggs:extra-paths}
entry-points =
......@@ -421,7 +404,7 @@ initialization =
[eggs]
recipe = zc.recipe.egg
python = python2.6
python = python2.7
eggs =
${mysql-python:egg}
${lxml-python:egg}
......@@ -429,6 +412,7 @@ eggs =
${python-ldap-python:egg}
${pysvn-python:egg}
${pycrypto-python:egg}
lock_file
PyXML
SOAPpy
cElementTree
......@@ -491,6 +475,10 @@ eggs =
Products.TIDStorage
Products.LongRequestLogger
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler).
zope.app.testing
# Currently forked in our repository
# Products.PortalTransforms
# Dependency for our fork of PortalTransforms
......@@ -502,7 +490,7 @@ eggs =
# parameterizing the version of the generated python interpreter name by the
# python section version causes dependency between this egg section and the
# installation of python, which we don't want on an instance
interpreter = python2.6
interpreter = python2.7
scripts =
repozo
runzope
......@@ -516,7 +504,7 @@ extra-paths =
[zodbanalyze]
recipe = zc.recipe.egg
python = python2.6
python = python2.7
eggs =
ZODB3
erp5.util
......@@ -526,22 +514,22 @@ scripts = zodbanalyze
[cloudooo-repository]
branch = master
revision = 168786a4c747d4dc4578a6428d39b3b2b3e1eb10
revision = 5c67568c403239bd8e25993602d03c553236fcec
[mysql-python]
python = python2.6
python = python2.7
[lxml-python]
python = python2.6
python = python2.7
[pil-python]
python = python2.6
python = python2.7
[python-ldap-python]
python = python2.6
python = python2.7
[pysvn-python]
python = python2.6
python = python2.7
[slapos-toolbox]
recipe = zc.recipe.egg
......@@ -605,6 +593,16 @@ Products.CMFDefault = 2.2.2
Products.CMFTopic = 2.2.1
Products.CMFUid = 2.2.1
# newer version requires zope.traversing>=4.0.0a2.
zope.app.appsetup = 3.16.0
# newer version requires zope.i18n>=4.0.0a3
zope.app.publication = 3.14.0
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler).
zope.app.testing = 3.8.1
# Pinned versions
Flask = 0.9
GitPython = 0.3.2.RC1
......@@ -622,11 +620,12 @@ Products.LongRequestLogger = 1.1.0
Products.MimetypesRegistry = 2.0.4
Products.PluginRegistry = 1.3
Products.TIDStorage = 5.4.8
Products.ZSQLMethods = 2.13.4
Pygments = 1.6
StructuredText = 2.11.1
WSGIUtils = 0.7
Werkzeug = 0.8.3
apache-libcloud = 0.12.1
apache-libcloud = 0.12.4
argparse = 1.2.1
async = 0.6.1
atomize = 0.1.1
......@@ -636,10 +635,11 @@ coverage = 3.6
csp-eventlet = 0.7.0
elementtree = 1.2.7-20070827-preview
erp5.recipe.cmmiforcei686 = 0.1.3
erp5.util = 0.4.33
erp5.util = 0.4.34
erp5diff = 0.8.1.5
eventlet = 0.12.1
feedparser = 5.1.3
five.formlib = 1.0.4
five.localsitemanager = 2.0.5
fpconst = 0.7.2
gitdb = 0.5.4
......@@ -649,23 +649,23 @@ http-parser = 0.8.1
huBarcode = 0.63
inotifyx = 0.2.0
ipdb = 0.7
ipython = 0.13.1
ipython = 0.13.2
meld3 = 0.6.10
mr.developer = 1.25
netaddr = 0.7.10
netifaces = 0.8
netifaces = 0.8_1
ordereddict = 1.1
paramiko = 1.10.0
paramiko = 1.10.1
plone.recipe.command = 1.1
ply = 3.4
polib = 1.0.3
psutil = 0.6.1
psutil = 0.7.1
pyPdf = 1.13
pyflakes = 0.6.1
pyflakes = 0.7.2
python-ldap = 2.4.10
python-magic = 0.4.3
qrcode = 2.5.1
requests = 1.1.0
qrcode = 2.7
requests = 1.2.3
restkit = 4.2.1
rtjp-eventlet = 0.3.2
slapos.core = 0.35.1
......@@ -674,12 +674,15 @@ slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33.1
smmap = 0.8.2
socketpool = 0.5.2
spyne = 2.9.4
supervisor = 3.0b1
spyne = 2.10.7
supervisor = 3.0b2
threadframe = 0.2
timerserver = 2.0.2
urlnorm = 1.1.2
uuid = 1.30
validictory = 0.9.0
validictory = 0.9.1
xml-marshaller = 0.9.7
xupdate-processor = 0.4
zope.app.debug = 3.4.1
zope.app.dependable = 3.5.1
zope.app.form = 4.0.2
......@@ -466,12 +466,14 @@ post = {{ bin_directory }}/killpidfromfile ${apache-{{ backend_name }}:pid-file}
recipe = slapos.cookbook:haproxy
name = {{ backend_name }}
conf-path = ${directory:etc}/haproxy-{{ backend_name }}.cfg
socket-path = ${directory:run}/haproxy-{{ backend_name }}.sock
ip = {{ ipv4 }}
port = {{ current_haproxy_port }}
maxconn = {{ backend_configuration['maxconn'] }}
server-check-path = /{{ site_id }}/getId
wrapper-path = ${directory:services}/haproxy-{{ backend_name }}
binary-path = {{ parameter_dict['haproxy'] }}/sbin/haproxy
ctl-path = ${directory:bin}/haproxy-{{ backend_name }}-ctl
backend-list = {{ haproxy_backend_list | join(' ')}}
{%- endif %}
{% endfor -%}
......
......@@ -10,6 +10,7 @@ parts =
{% if web_checker_parameter is defined %}
web-checker
cron-entry-web-checker
logrotate-entry-web-checker
{% endif %}
eggs-directory = {{ eggs_directory }}
......@@ -27,18 +28,23 @@ recipe = slapos.cookbook:generic.varnish
ip = ${slap-network-information:local-ipv4}
server-port = 6001
manager-port = 6002
stunnel-port = 6003
# Paths: Running wrappers
varnishd-wrapper = ${basedirectory:services}/varnishd
varnishlog-wrapper = ${rootdirectory:bin}/varnishlog
stunnel-wrapper = ${basedirectory:services}/stunnel
# Binary information
varnishd-binary = {{ parameter_dict['varnish'] }}/sbin/varnishd
varnishlog-binary = {{ parameter_dict['varnish'] }}/bin/varnishlog
shell-path = {{ parameter_dict['dash'] }}/bin/dash
stunnel-binary = {{ parameter_dict['stunnel'] }}/bin/stunnel
# Configuration by VCL
vcl-file = ${rootdirectory:etc}/default.vcl
pid-file = ${basedirectory:run}/varnishd.pid
stunnel-conf-file = ${rootdirectory:etc}/stunnel.conf
stunnel-pid-file = ${basedirectory:run}/stunnel.pid
varnish-data = ${directory:varnish-data}
# this will pass at -n option
varnish-instance-name = ${directory:varnish-instance}
......@@ -94,6 +100,17 @@ logrotate-entries = ${directory:logrotate-entries}
backup = ${directory:logrotate-backup}
state-file = ${rootdirectory:srv}/logrotate.status
[logrotate-entry-web-checker]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = web-checker
log = ${web-checker:web-checker-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = ${rootdirectory:etc}/run
......
......@@ -99,6 +99,7 @@ dash = {{ dash_location }}
dcron = {{ dcron_location }}
gzip = {{ gzip_location }}
logrotate = {{ logrotate_location }}
stunnel = {{ stunnel_location }}
varnish = {{ varnish_location }}
wget = {{ wget_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
......
......@@ -127,6 +127,27 @@ wrapper. I suggest you only add options and specify your export/import recipe.
Checking that it works
----------------------
To check that your software instance is resilient you can proceed this way:
Once all instances are successfully deployed, go to your export instance, connect as the instance user and run:
$ ~/bin/exporter
It is the script responsible for triggering the resiliency stack on your instance. After doing a backup of your data, it will notify the pull-backup instances of a new backup, triggering the transfer of this data to the import instances.
Once this script is run successfully, go to your import instance, connect as its instance user and check ~/srv/backup/"your sofwtare"/, the location of the data you wanted to receive. The last part of the resiliency is up to your import script.
DEBUGGING:
Here is a partial list of things you can check to understand what is causing the problem:
- Check that your import script does not fail and successfully places your data in ~/srv/backup/"your software" (as the import instance user) by runnig:
$ ~/bin/"your software"-exporter
- Check the export instance script is run successfully as this instance user by running:
$ ~/bin/exporter
- Check the pull-instance system did its job by going to one of your pull-backup instance, connect as its user and check the log : ~/var/log/equeue.log
-----------------------------------------------------------------------------------------
Finally, instance-mysoftware-import.cfg.in and
......
[buildout]
extends =
../../component/gzip/buildout.cfg
../../component/rdiff-backup/buildout.cfg
parts =
rdiff-backup
pbsready
pbsready-import
pbsready-export
......@@ -9,6 +13,9 @@ parts =
instance-frozen
template-resilient
# needed tools for resiliency
gzip
#----------------
#--
......
......@@ -60,18 +60,20 @@ recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
cliff
hexagonit.recipe.download
inotifyx
netaddr
netifaces
requests
slapos.core
supervisor
xml_marshaller
pytz
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-010
# Use xz-friendly hexagonit.recipe.download
hexagonit.recipe.download = 1.6nxd002
# zc.recipe.egg 2.x is for Buildout 2
zc.recipe.egg = 1.3.2
# Use own version of h.r.download to be able to open xz-like archives
......
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