Commit 92bfb5ca authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge branch 'erp5' into erp5-z2.13

Conflicts:
	stack/erp5/buildout.cfg
parents c632afdd 591782d6
Changes Changes
======= =======
0.73.1 (2012-02-19)
-------------------
* softwaretype recipe: all falsy parameter values are now ignored. [Cedric de Saint Martin]
0.73.0 (2013-02-18)
-------------------
* Add mioga and apacheperl recipes. [Viktor Horvath]
* request.py: Properly fetch instance_guid of instance. [Cedric de Saint Martin]
* request.py: Only append SLA parameter to the list if the key actually exists and is not empty string. [Cedric de Saint Martin]
0.72.0 (2013-02-11)
-------------------
* librecipe: correctly handle newline and missing file in addLineToFile(). [Marco Mariani]
* LAMP: Copy php application even if directory exists but is empty. This handle new resilient LAMP stack. [Cedric de Saint Martin]
* LAMP: Don't even try to restart/reload/graceful Apache. This fix "Apache hangs" problem. [Cedric de Saint Martin]
0.71.4 (2013-02-01)
-------------------
* Enable IPv6 support in KumoFS. [Vincent Pelletier]
* Use new connection and get result when try to create new erp5 site. [Rafael Monnerat]
* Set up timezone database in mariab's mysql table so that we can use timezone conversion function. [Kazuhiko Shiozaki]
* Make erp5_bootstrap wait for manage_addERP5Site response [Rafael Monnerat]
0.71.3 (2013-01-31)
-------------------
* Add mysql_ip and mysql_port parameters in apachephp recipe [Cedric de Saint
Martin]
* Random password for postgres in standalone SR and lapp stack; accept
connections from the world. [Marco Mariani]
0.71.2 (2013-01-29)
-------------------
* revised postgres/lapp recipe. [Marco Mariani]
0.71.1 (2013-01-04) 0.71.1 (2013-01-04)
------------------- -------------------
......
[buildout] [buildout]
parts = apache-perl parts = apache-perl perl-Apache2-Request
extends = extends =
../apache/buildout.cfg ../apache/buildout.cfg
...@@ -15,7 +15,16 @@ configure-command = ...@@ -15,7 +15,16 @@ configure-command =
${perl:location}/bin/perl Makefile.PL ${perl:location}/bin/perl Makefile.PL
configure-options = configure-options =
MP_AP_PREFIX=${apache-2.2:location} MP_AP_PREFIX=${apache-2.2:location}
LIBS="-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}"
# for mod_apreq2 and Apache2::Request
[perl-Apache2-Request]
recipe = slapos.recipe.build:cpan
modules =
I/IS/ISAAC/libapreq2-2.13.tar.gz
perl = perl
cpan-configuration =
makepl_arg = ('--with-apache2-apxs=${apache-2.2:location}/bin/apxs')
environment = environment =
# CPPFLAGS=-I${libuuid:location}/include APR_LDFLAGS = -L${libuuid:location}/lib -Wl,-R${libuuid:location}/lib -L${libexpat:location}/lib -Wl,-R${libexpat:location}/lib -L${apache-2.2:location}/lib -Wl,-R${apache-2.2:location}/lib
MP_CCOPTS=-L${libuuid:location}/lib LDFLAGS=-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${libexpat:location}/lib -Wl,-rpath=${libexpat:location}/lib -L${apache-2.2:location}/lib -Wl,-rpath=${apache-2.2:location}/lib
...@@ -149,6 +149,7 @@ configure-options = --disable-static ...@@ -149,6 +149,7 @@ configure-options = --disable-static
--enable-proxy-scgi --enable-proxy-scgi
--enable-dav --enable-dav
--enable-dav-fs --enable-dav-fs
--enable-dav-lock
--enable-so --enable-so
--enable-ssl --enable-ssl
--with-included-apr --with-included-apr
......
...@@ -51,7 +51,7 @@ md5sum = 5dc8cc28447ed3747b8a53c768d872aa ...@@ -51,7 +51,7 @@ md5sum = 5dc8cc28447ed3747b8a53c768d872aa
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
commit = 6b0112363dd0f9523430808394a162d3cc699550 commit = 9158bbf9e886e3b96e91239249aca66e420aa8d1
repository = https://github.com/ajaxorg/cloud9.git repository = https://github.com/ajaxorg/cloud9.git
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location}; environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location};
......
...@@ -10,7 +10,7 @@ parts = ...@@ -10,7 +10,7 @@ parts =
[libtiff] [libtiff]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 4.0.3 version = 4.0.3
url = http://download.osgeo.org/libtiff/tiff-${:version}.tar.gz url = http://www.imagemagick.org/download/delegates/tiff-${:version}.tar.gz
md5sum = 051c1068e6a0627f461948c365290410 md5sum = 051c1068e6a0627f461948c365290410
configure-options = configure-options =
--disable-static --disable-static
......
[buildout]
extends =
../perl/buildout.cfg
../../component/openssl/buildout.cfg
../../component/zlib/buildout.cfg
parts =
perl-Crypt-SSLeay
[perl-Crypt-SSLeay]
recipe = slapos.recipe.build:cpan
modules =
G/GA/GAAS/URI-1.60.tar.gz
N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
cpan-configuration =
make_arg=('OTHERLDFLAGS="-L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${openssl:location}/lib -Wl,-R${openssl:location}/lib"')
makepl_arg=('INC=-I${openssl:location}/include')
environment =
OPENSSL_PREFIX=${openssl:location}
perl = perl
[buildout]
extends =
../perl/buildout.cfg
../postgresql/buildout.cfg
parts =
perl-DBD-Pg
[perl-DBD-Pg]
recipe = slapos.recipe.build:cpan
modules =
T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz
environment =
POSTGRES_HOME=${postgresql:location}
perl = perl
[buildout]
extends =
../perl/buildout.cfg
../imagemagick/buildout.cfg
parts = perl-Image-Magick
[perl-Image-Magick_MakefilePL.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 31043e2b79e725d3b251aa09b4549046
download-only = true
filename = ${:_buildout_section_name_}
[perl-Image-Magick]
recipe = hexagonit.recipe.cmmi
depends =
${perl:version}
${imagemagick:location}
url = http://search.cpan.org/CPAN/authors/id/J/JC/JCRISTY/PerlMagick-6.77.tar.gz
md5sum = fa0f66fa0cabbd1b196254f94dec8e99
patch-options = -p0
patches =
${perl-Image-Magick_MakefilePL.patch:location}/${perl-Image-Magick_MakefilePL.patch:filename}
configure-command =
${perl:location}/bin/perl Makefile.PL LIBS="-L${imagemagick:location}/lib -Wl,-R${imagemagick:location}/lib -L${perl:location}/libs-c -Wl,-R${perl:location}/libs-c" INC="-I${imagemagick:location}/include/ImageMagick"
--- Makefile.PL.orig 2012-10-02 14:58:25.537661734 +0200
+++ Makefile.PL 2012-10-02 15:23:32.250928745 +0200
@@ -156,11 +156,26 @@
}
# defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile
-my $INC_magick = '-I../ -I.. -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"';
-my $LIBS_magick = '-L../magick/.libs -lMagickCore -lperl -lm';
-my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread";
-my $LDFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'ldflags'} -L/usr/lib";
-my $LDDLFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'lddlflags'} -L/usr/lib";
+my %paths_magick = ();
+foreach my $section ('INC', 'LIBS', 'CCFLAGS', 'LDFLAGS', 'LDDLFLAGS') {
+ $paths_magick{$section} = '';
+}
+{
+ my $i = 0;
+ while ($i <= $#ARGV) {
+ my ($key, $val) = split(/=/, $ARGV[$i], 2);
+ if (exists $paths_magick{$key}) {
+ $paths_magick{$key} = $val;
+ delete $ARGV[$i];
+ }
+ $i++;
+ }
+}
+# Enforce standard components
+$paths_magick{LIBS} .= ' -lMagickCore -lperl -lm';
+$paths_magick{CCFLAGS} .= " $Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread";
+$paths_magick{LDFLAGS} .= " -lMagickCore $Config{'ldflags'}";
+$paths_magick{LDDLFLAGS} .= " -lMagickCore $Config{'lddlflags'}";
if (($^O eq 'MSWin32') && ($Config{cc} =~ /gcc/)) {
my($Ipaths, $Lpaths) = AutodetectWin32gcc();
@@ -168,11 +183,11 @@
#
# Setup for strawberry perl.
#
- $INC_magick = "$Ipaths";
- $LIBS_magick = "-lMagickCore";
- $CCFLAGS_magick = "$Config{'ccflags'}";
- $LDFLAGS_magick = "$Config{'ldflags'} $Lpaths ";
- $LDDLFLAGS_magick = "$Config{'lddlflags'} $Lpaths ";
+ $paths_magick{INC} = "$Ipaths";
+ $paths_magick{LIBS} = "-lMagickCore";
+ $paths_magick{CCFLAGS} = "$Config{'ccflags'}";
+ $paths_magick{LDFLAGS} = "$Config{'ldflags'} $Lpaths ";
+ $paths_magick{LDDLFLAGS} = "$Config{'lddlflags'} $Lpaths ";
}
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
@@ -195,7 +210,7 @@
'DEFINE' => ' -D_LARGE_FILES=1 -DHAVE_CONFIG_H', # e.g., '-DHAVE_SOMETHING'
# Header search specfication and preprocessor flags
- 'INC' => $INC_magick,
+ 'INC' => $paths_magick{INC},
# C compiler
#'CC' => 'gcc -std=gnu99 -std=gnu99',
@@ -204,22 +219,22 @@
# 'CPPFLAGS' => "$Config{'cppflags'} -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2",
# C compiler flags (e.g. -O -g)
- 'CCFLAGS' => $CCFLAGS_magick,
+ 'CCFLAGS' => $paths_magick{CCFLAGS},
# Linker
#'LD' => $Config{'ld'} == $Config{'cc'} ? 'gcc -std=gnu99 -std=gnu99' : $Config{'ld'},
# Linker flags for building an executable
- 'LDFLAGS' => $LDFLAGS_magick,
+ 'LDFLAGS' => $paths_magick{LDFLAGS},
# Linker flags for building a dynamically loadable module
- 'LDDLFLAGS' => $LDDLFLAGS_magick,
+ 'LDDLFLAGS' => $paths_magick{$LDDLFLAGS},
# Install PerlMagick binary into ImageMagick bin directory
'INSTALLBIN' => '/usr/local/bin',
# Library specification
- 'LIBS' => [ $LIBS_magick ],
+ 'LIBS' => [ $paths_magick{LIBS} ],
# Perl binary name (if a Perl binary is built)
'MAP_TARGET' => 'PerlMagick',
[buildout]
extends =
../perl/buildout.cfg
../xapian/buildout.cfg
parts =
perl-Search-Xapian
[perl-Search-Xapian]
recipe = slapos.recipe.build:cpan
modules =
O/OL/OLLY/Search-Xapian-1.2.10.0.tar.gz
environment =
XAPIAN_CONFIG=${xapian:location}/bin/xapian-config
perl = perl
[buildout]
extends =
../perl/buildout.cfg
../ncurses/buildout.cfg
../readline/buildout.cfg
parts = perl-Term-ReadLine-Gnu
[perl-Term-ReadLine-Gnu.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = d4e4624e717c8da63e4d153149d57b68
download-only = true
filename = ${:_buildout_section_name_}
[perl-Term-ReadLine-Gnu]
recipe = hexagonit.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz
md5sum = fa33510193b89a2ada74fcef00816322
patch-options = -p0
patches =
${perl-Term-ReadLine-Gnu.patch:location}/${perl-Term-ReadLine-Gnu.patch:filename}
configure-command =
${perl:location}/bin/perl Makefile.PL --libdir=${readline:location}/lib --includedir="${readline:location}/include" LIBS="-Wl,-R${readline:location}/lib -L${ncurses:location}/lib -Wl,-R${ncurses:location}/lib" INC="-I${ncurses:location}/include"
--- Makefile.PL.orig 2012-09-26 16:40:42.922821617 +0200
+++ Makefile.PL 2012-10-02 02:51:26.400659861 +0200
@@ -22,7 +22,22 @@
use Config;
use Getopt::Long;
use 5.007; use 5.7.0; # use version 1.09 for older Perl
-my ($defs, $libs, $lddflags, $RLLIB, $RLINC);
+my ($defs, $lddflags, %config);
+
+{
+ $config{LIBS} = '';
+ $config{INC} = '';
+
+ my $i = 0;
+ while ($i <= $#ARGV) {
+ my ($key, $val) = split(/=/, $ARGV[$i], 2);
+ $config{$key} = $val;
+ if ($key eq 'LIBS' || $key eq 'INC') {
+ delete $ARGV[$i];
+ }
+ $i++;
+ }
+}
# exit 0 before creating the Makefile to be CPAN Testers friendly
# see http://wiki.cpantester.org/wiki/CPANAuthorNotes
@@ -36,20 +51,23 @@
$defs = ($Config{strings} =~ m|/string.h$|) ? '-DHAVE_STRING_H' : '';
# Parse command line to specify paths for the GNU Readline Library
+# (if they have not already been included within LIBS or INC)
{
my ($prefix, $libdir, $incdir);
GetOptions("prefix=s" => \$prefix,
"libdir=s" => \$libdir,
"includedir=s" => \$incdir);
- $RLLIB = defined $libdir
+ my $RLLIB = defined $libdir
? "-L$libdir" : (defined $prefix ? "-L$prefix/lib" : '');
- $RLINC = defined $incdir
+ my $RLINC = defined $incdir
? "-I$incdir" : (defined $prefix ? "-I$prefix/include" : '');
+ $config{LIBS} .= " $RLLIB";
+ $config{INC} .= " $RLINC";
}
if ($Config{osname} eq 'os2') {
# Check ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2/
- $libs = '-lreadline_import';
+ $config{LIBS} .= ' -lreadline_import';
$defs .= ' -DOS2_USEDLL';
$lddflags = '';
} else {
@@ -60,18 +78,27 @@
# Old Cygwin may require setting false (0).
my $PREFER_CURSES = $Config{osname} eq 'aix' || $Config{osname} eq 'hpux'
|| $Config{osname} eq 'cygwin';
- my $TERMCAP_LIB = (! $PREFER_CURSES && &search_lib('-ltermcap'))
- || &search_lib('-lncurses')
- || &search_lib('-lcurses');
+ my @lib_dirs = ();
+ # Turn -L<path> parameters into a list of <path>s
+ {
+ foreach my $libopt (split(' ',$config{LIBS})) {
+ if ($libopt =~ m#^-L(.*)$#) {
+ push @lib_dirs, $1;
+ }
+ }
+ }
+ my $TERMCAP_LIB = (! $PREFER_CURSES && &search_lib('-ltermcap', \@lib_dirs))
+ || &search_lib('-lncurses', \@lib_dirs)
+ || &search_lib('-lcurses', \@lib_dirs);
unless ($TERMCAP_LIB) {
warn "Could not find neither libtermcap.a, libncurses.a, or libcurses.\n";
exit $err;
}
- $libs = "-lreadline $TERMCAP_LIB";
+ $config{LIBS} .= " -lreadline $TERMCAP_LIB";
# Latest Perl in FreeBSD does not need this hack. (Dec.2002)
- $libs .= ' -lcrypt' if ($Config{osname} =~ /freebsd/i);
+ $config{LIBS} .= ' -lcrypt' if ($Config{osname} =~ /freebsd/i);
$lddflags = '';
# If you are using old Cygwin, enable the following line.
#$lddflags = ($Config{osname} =~ /cygwin/i) ? '-static' : '';
@@ -80,7 +107,7 @@
# Check version of GNU Readline Library (for version 4.2 and before)
{
my ($rlmajorver, $rlminorver) =
- check_readline_version($RLINC, $RLLIB, $defs, $lddflags, $libs);
+ check_readline_version($defs, $lddflags, \%config);
if ($rlmajorver < 4 || $rlmajorver == 4 && $rlminorver <= 2) {
$defs .= " -DRL_READLINE_VERSION=" .
@@ -95,15 +122,15 @@
(
NAME => 'Term::ReadLine::Gnu',
VERSION_FROM => 'Gnu.pm',
- LIBS => [ "$RLLIB $libs" ],
- LDDLFLAGS => "$RLLIB $Config{lddlflags}",
+ LIBS => $config{LIBS},
+ LDDLFLAGS => $Config{lddlflags},
dynamic_lib => { OTHERLDFLAGS => $lddflags },
DEFINE => $defs,
($Config{osname} eq 'os2' ?
(
IMPORTS => { xfree => 'emxlibcm.401' }, # Yuck!
) : () ),
- INC => $RLINC,
+ INC => $config{INC},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz' },
clean => { FILES => "rlver.c rlver$Config{_exe}" },
);
@@ -122,20 +149,20 @@
exit(0);
########################################################################
-# Search a library '$lib' in $Config{libpth} directories, and return
+# Search a library '$lib' in the given directories (listref), and return
# $lib if exist or undef unless exist.
# ExtUtils::Liblist::ext() do similar job as this subroutine, but it
# warns unnecessary messages.
sub search_lib {
- my ($lib) = @_;
+ my ($lib, $lib_dirs) = @_;
unless ($lib =~ /^-l/) {
warn "search_lib: illegal arguments, \`$lib\'.\n";
return undef;
}
my $libbase = 'lib' . substr($lib, 2) . $Config{lib_ext};
my $libbase_so = 'lib' . substr($lib, 2) . "." . $Config{so};
- foreach (split(' ', $Config{libpth})) {
+ foreach (split(' ', $Config{libpth}), @$lib_dirs) {
if (-f $_ . '/' . $libbase) {
# print "$_/$libbase\n";
print "Found \`$_/$libbase\'.\n";
@@ -158,7 +185,7 @@
# RL_VERSION_MINOR
# Someday we don't need this subroutine..
sub check_readline_version {
- my ($RLINC, $RLLIB, $defs, $lddflags, $libs) = @_;
+ my ($defs, $lddflags, $config) = @_;
my $frlver = 'rlver.c';
# make temp file
@@ -172,7 +199,7 @@
close(F);
# compile it
- my $comp_cmd = "$Config{cc} $RLINC $Config{ccflags} $defs $frlver -o rlver $RLLIB $lddflags $Config{ldflags} $libs";
+ my $comp_cmd = "$Config{cc} $config->{INC} $Config{ccflags} $defs $frlver -o rlver $lddflags $Config{ldflags} $config->{LIBS}";
print $comp_cmd, "\n";
system($comp_cmd);
if ($?) {
[buildout]
extends =
../perl/buildout.cfg
../libiconv/buildout.cfg
parts = perl-Text-Iconv
[perl-Text-Iconv]
recipe = slapos.recipe.build:cpan
cpan-configuration =
makepl_arg='LIBS="-L${libiconv:location}/lib -Wl,-R${libiconv:location}/lib" INC="-I${libiconv:location}/include"'
modules =
M/MP/MPIOTR/Text-Iconv-1.7.tar.gz
perl = perl
[buildout]
extends =
../perl/buildout.cfg
../libxslt/buildout.cfg
../libxml2/buildout.cfg
../zlib/buildout.cfg
parts = perl-XML-LibXSLT
[perl-XML-LibXSLT]
recipe = slapos.recipe.build:cpan
cpan-configuration =
makepl_arg='LIBS="-L${libxslt:location}/lib -Wl,-R${libxslt:location}/lib -L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${libxml2:location}/lib -Wl,-R${libxml2:location}/lib" INC="-I${libxslt:location}/include -I${libxml2:location}/include/libxml2"'
modules =
S/SH/SHLOMIF/XML-LibXSLT-1.78.tar.gz
perl = perl
...@@ -12,6 +12,13 @@ md5sum = 9873a89c969bd5a478434c3b8b2d57d8 ...@@ -12,6 +12,13 @@ md5sum = 9873a89c969bd5a478434c3b8b2d57d8
download-only = true download-only = true
filename = ${:_buildout_section_name_} filename = ${:_buildout_section_name_}
[perl-postmakehook-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 7fded8308c1676decf77575c6d6b325f
download-only = true
filename = create-libs-symlink.py
[perl] [perl]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
depends = depends =
...@@ -30,6 +37,8 @@ configure-command = ...@@ -30,6 +37,8 @@ configure-command =
-Dcflags=-I${gdbm:location}/include \ -Dcflags=-I${gdbm:location}/include \
-Dldflags="-L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib" \ -Dldflags="-L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib" \
-Ui_db \ -Ui_db \
-Dnoextensions=ODBM_File -Dnoextensions=ODBM_File \
-Dusethreads
environment = environment =
PATH=${patch:location}/bin:%(PATH)s PATH=${patch:location}/bin:%(PATH)s
post-make-hook = ${perl-postmakehook-download:location}/${perl-postmakehook-download:filename}:post_make_hook
import fnmatch
import os
import pprint
def post_make_hook(options, buildout):
location = options['location']
matches = []
for root, dirnames, filenames in os.walk(location):
for filename in fnmatch.filter(filenames, 'libperl.a'):
matches.append(os.path.join(root, filename))
nr_matches = len(matches)
if nr_matches == 0:
print "ERROR - no libperl.* found!"
exit
elif nr_matches > 1:
print "WARNING - several libperl.a found, taking only the first one:", matches.join("\n")
# matches[0] is a prefix of "location"
# For the symlink, we want the relative path.
rel_link = os.path.relpath(os.path.dirname(matches[0]), location)
os.symlink(rel_link, os.path.join(location, "libs-c"))
print "Created symlink \"libs-c\" to", rel_link
...@@ -4,6 +4,7 @@ extends = ...@@ -4,6 +4,7 @@ extends =
../readline/buildout.cfg ../readline/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../ncurses/buildout.cfg ../ncurses/buildout.cfg
../perl/buildout.cfg
parts = postgresql parts = postgresql
...@@ -15,10 +16,10 @@ parts = postgresql ...@@ -15,10 +16,10 @@ parts = postgresql
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.1.7/postgresql-9.1.7.tar.bz2 url = http://ftp.postgresql.org/pub/source/v9.1.7/postgresql-9.1.7.tar.bz2
md5sum = eaf7b67493d59d1a60767ffdfbd65ce9 md5sum = eaf7b67493d59d1a60767ffdfbd65ce9
configure-options = --with-openssl configure-options = --with-openssl --with-perl
environment = environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${perl:location}/libs-c -Wl,-rpath=${perl:location}/libs-c
[postgresql92] [postgresql92]
...@@ -28,5 +29,4 @@ md5sum = 1cc388988e69bf75c6b55d59070100f6 ...@@ -28,5 +29,4 @@ md5sum = 1cc388988e69bf75c6b55d59070100f6
configure-options = --with-openssl configure-options = --with-openssl
environment = environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${perl:location}/libs-c -Wl,-rpath=${perl:location}/libs-c
[buildout]
parts =
rsync
[rsync]
recipe = hexagonit.recipe.cmmi
url = http://rsync.samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz
md5sum = 5ee72266fe2c1822333c407e1761b92b
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
...@@ -114,6 +114,7 @@ scripts = ...@@ -114,6 +114,7 @@ scripts =
slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl
slapgrid-supervisord = slapos.grid.svcbackend:supervisord slapgrid-supervisord = slapos.grid.svcbackend:supervisord
slapproxy = slapos.proxy:main slapproxy = slapos.proxy:main
slapproxy-query = slapos.proxy.query:main
slapos = slapos.entry:main slapos = slapos.entry:main
slapos-watchdog = slapos.grid.watchdog:main slapos-watchdog = slapos.grid.watchdog:main
...@@ -129,45 +130,54 @@ scripts = py ...@@ -129,45 +130,54 @@ scripts = py
# Use our own buildout version # Use our own buildout version
zc.buildout = 1.6.0-dev-SlapOS-010 zc.buildout = 1.6.0-dev-SlapOS-010
# Generated by buildout-versions # Don't use beta
lxml = 3.0.2
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
collective.recipe.template = 1.9 collective.recipe.template = 1.9
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
lxml = 3.0.1 meld3 = 0.6.10
meld3 = 0.6.9
netaddr = 0.7.10 netaddr = 0.7.10
slapos.core = 0.33.1 slapos.core = 0.35
slapos.libnetworkcache = 0.13.2 slapos.libnetworkcache = 0.13.3
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.35
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.6 # hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1 hexagonit.recipe.download = 1.6
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.35
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.35
# slapos.libnetworkcache==0.13.2 pyflakes = 0.6.1
# Required by:
# slapos.core==0.35
# slapos.libnetworkcache==0.13.3
# supervisor==3.0b1 # supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010 # zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.1 # zope.interface==4.0.3
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.35
supervisor = 3.0b1 supervisor = 3.0b1
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.35
zope.interface = 4.0.1 unittest2 = 0.5.1
# Required by:
# slapos.core==0.35
zope.interface = 4.0.3
[buildout]
parts =
xapian
depends =
../zlib/buildout.cfg
../libuuid/buildout.cfg
[xapian]
recipe = hexagonit.recipe.cmmi
url = http://oligarchy.co.uk/xapian/1.2.12/xapian-core-1.2.12.tar.gz
md5sum = faf33a3945edbe4c848627750856cbeb
environment =
CPPFLAGS = -I${zlib:location}/include -I${libuuid:location}/include
LDFLAGS = -L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${libuuid:location}/lib -Wl,-R${libuuid:location}/lib
\ No newline at end of file
...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages ...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.71.2-dev' version = '0.73.2-dev'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
...@@ -70,6 +70,7 @@ setup(name=name, ...@@ -70,6 +70,7 @@ setup(name=name,
'agent = slapos.recipe.agent:Recipe', 'agent = slapos.recipe.agent:Recipe',
'apache.frontend = slapos.recipe.apache_frontend:Recipe', 'apache.frontend = slapos.recipe.apache_frontend:Recipe',
'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe', 'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe',
'apacheperl = slapos.recipe.apacheperl:Recipe',
'apachephp = slapos.recipe.apachephp:Recipe', 'apachephp = slapos.recipe.apachephp:Recipe',
'apacheproxy = slapos.recipe.apacheproxy:Recipe', 'apacheproxy = slapos.recipe.apacheproxy:Recipe',
'certificate_authority = slapos.recipe.certificate_authority:Recipe', 'certificate_authority = slapos.recipe.certificate_authority:Recipe',
...@@ -130,6 +131,7 @@ setup(name=name, ...@@ -130,6 +131,7 @@ setup(name=name,
'logrotate.d = slapos.recipe.logrotate:Part', 'logrotate.d = slapos.recipe.logrotate:Part',
'memcached = slapos.recipe.memcached:Recipe', 'memcached = slapos.recipe.memcached:Recipe',
'mkdirectory = slapos.recipe.mkdirectory:Recipe', 'mkdirectory = slapos.recipe.mkdirectory:Recipe',
'mioga.instantiate = slapos.recipe.mioga.instantiate:Recipe',
'mydumper = slapos.recipe.mydumper:Recipe', 'mydumper = slapos.recipe.mydumper:Recipe',
'mysql = slapos.recipe.mysql:Recipe', 'mysql = slapos.recipe.mysql:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe', 'nbdserver = slapos.recipe.nbdserver:Recipe',
......
##############################################################################
#
# 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 shutil
import os
import signal
from binascii import b2a_uu as uuencode
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
path_list = []
# Copy application
# shutil.rmtree(self.options['htdocs'])
# shutil.copytree(self.options['source'],
# self.options['htdocs'])
# Install apache
apache_config = dict(
pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'],
ip=self.options['ip'],
port=self.options['port'],
error_log=self.options['error-log'],
access_log=self.options['access-log'],
document_root=self.options['htdocs'],
)
httpd_conf = self.createFile(self.options['httpd-conf'],
self.substituteTemplate(self.getTemplateFilename('apache.in'),
apache_config)
)
path_list.append(httpd_conf)
wrapper = self.createPythonScript(self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute',
[self.options['httpd-binary'], '-f', self.options['httpd-conf'],
'-DFOREGROUND']
)
path_list.append(wrapper)
if os.path.exists(self.options['pid-file']):
# Reload apache configuration
with open(self.options['pid-file']) as pid_file:
pid = int(pid_file.read().strip(), 10)
try:
os.kill(pid, signal.SIGUSR1) # Graceful restart
except OSError:
pass
return path_list
# Apache static configuration
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule mime_module modules/mod_mime.so
LoadModule perl_module modules/mod_perl.so
LoadModule apreq_module modules/mod_apreq2.so
# Basic server configuration
PidFile "%(pid_file)s"
Listen [%(ip)s]:%(port)s
ServerAdmin someone@email
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
# Log configuration
ErrorLog "%(error_log)s"
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)s" common
<Perl>
use strict;
use warnings;
package mytest;
use Apache2::Const -compile => qw(OK);
use Apache2::RequestIO ();
use Apache2::RequestRec ();
use Apache2::Request;
use Date::Calc ();
use Image::Magick;
sub test_handler {
my ($r) = @_;
$r->content_type('text/plain');
{
my $date = localtime();
$r->print("Hello world! Current time: $date\n");
}
{
my $year = (localtime())[5] + 1900;
$r->print("Testing Date::Calc: English ordinal for current year is "
. Date::Calc::English_Ordinal($year) . "\n");
}
{
my $apreq = new Apache2::Request($r);
my $hello = $apreq->param('hello');
$r->print("Testing Apache2::Request: The parameter 'hello' is '$hello'\n");
}
{
my $im = new Image::Magick;
$r->print("Testing Image::Magick: PerlMagick success: "
. Image::Magick->Success . "\n");
}
return Apache2::Const::OK;
}
</Perl>
<Location />
SetHandler perl-script
PerlHandler mytest::test_handler
</Location>
DocumentRoot %(document_root)s
DirectoryIndex index.html
...@@ -24,26 +24,26 @@ ...@@ -24,26 +24,26 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
import shutil import shutil
import os import os
import signal import signal
import subprocess
from binascii import b2a_uu as uuencode from binascii import b2a_uu as uuencode
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def install(self): def install(self):
path_list = [] path_list = []
# Copy application # Copy application if not already existing
if not os.path.exists(self.options['htdocs']): htdocs_location = self.options['htdocs']
shutil.copytree(self.options['source'], if not (os.path.exists(htdocs_location) and os.listdir(htdocs_location)):
self.options['htdocs']) try:
os.rmdir(htdocs_location)
except:
pass
shutil.copytree(self.options['source'], htdocs_location)
# Install php.ini # Install php.ini
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'], php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
...@@ -98,6 +98,8 @@ class Recipe(GenericBaseRecipe): ...@@ -98,6 +98,8 @@ class Recipe(GenericBaseRecipe):
mysql_password=self.options['mysql-password'], mysql_password=self.options['mysql-password'],
mysql_host='%s:%s' % (self.options['mysql-host'], mysql_host='%s:%s' % (self.options['mysql-host'],
self.options['mysql-port']), self.options['mysql-port']),
mysql_ip=self.options['mysql-host'],
mysql_port=self.options['mysql-port'],
secret_key=secret_key, secret_key=secret_key,
) )
...@@ -116,16 +118,12 @@ class Recipe(GenericBaseRecipe): ...@@ -116,16 +118,12 @@ class Recipe(GenericBaseRecipe):
self.substituteTemplate(self.options['template'], application_conf)) self.substituteTemplate(self.options['template'], application_conf))
path_list.append(config) path_list.append(config)
# Reload apache configuration. #if os.path.exists(self.options['pid-file']):
# notez-bien: a graceful restart or a SIGUSR1 can somehow hang the apache threads. # # Reload apache configuration
# with open(self.options['pid-file']) as pid_file:
subprocess.call([ # pid = int(pid_file.read().strip(), 10)
self.options['httpd-binary'], # try:
'-f', # os.kill(pid, signal.SIGUSR1) # Graceful restart
self.options['httpd-conf'], # except OSError:
'-k', # pass
'graceful'
])
return path_list return path_list
# vim: set et sts=2:
############################################################################## ##############################################################################
# #
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved. # Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
...@@ -24,12 +25,13 @@ ...@@ -24,12 +25,13 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
import random
import os
import binascii import binascii
import os
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options): def __init__(self, buildout, name, options):
...@@ -44,7 +46,7 @@ class Recipe(GenericBaseRecipe): ...@@ -44,7 +46,7 @@ class Recipe(GenericBaseRecipe):
return GenericBaseRecipe.__init__(self, buildout, name, options) return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self): def install(self):
open_file = open(self.options['storage-path'], 'w') with open(self.options['storage-path'], 'w') as fout:
open_file.write(self.options['passwd']) fout.write(self.options['passwd'])
open_file.close()
return [self.options['storage-path']] return [self.options['storage-path']]
...@@ -98,9 +98,9 @@ class GenericBaseRecipe(object): ...@@ -98,9 +98,9 @@ class GenericBaseRecipe(object):
line must be unicode.""" line must be unicode."""
try: if os.path.exists(filepath):
lines = io.open(filepath, 'r', encoding=encoding).readlines() lines = [l.rstrip('\n') for l in io.open(filepath, 'r', encoding=encoding)]
except IOError: else:
lines = [] lines = []
if not line in lines: if not line in lines:
......
This diff is collapsed.
...@@ -70,8 +70,7 @@ class Recipe(GenericBaseRecipe): ...@@ -70,8 +70,7 @@ class Recipe(GenericBaseRecipe):
""" """
def _options(self, options): def _options(self, options):
options['password'] = self.generatePassword() options['url'] = 'postgresql://%(superuser)s:%(password)s@[%(ipv6-random)s]:%(port)s/%(dbname)s' % options
options['url'] = 'postgresql://%(superuser)s:%(password)s@[%(ipv6_random)s]:%(port)s/%(dbname)s' % options
def install(self): def install(self):
...@@ -160,11 +159,13 @@ class Recipe(GenericBaseRecipe): ...@@ -160,11 +159,13 @@ class Recipe(GenericBaseRecipe):
'host all all ::1/128 md5', 'host all all ::1/128 md5',
] ]
ipv4_netmask_bits = self.options.get('ipv4-netmask-bits', '32')
for ip in ipv4: for ip in ipv4:
cfg_lines.append('host all all %s/32 md5' % ip) cfg_lines.append('host all all %s/%s md5' % (ip, ipv4_netmask_bits))
ipv6_netmask_bits = self.options.get('ipv6-netmask-bits', '128')
for ip in ipv6: for ip in ipv6:
cfg_lines.append('host all all %s/128 md5' % ip) cfg_lines.append('host all all %s/%s md5' % (ip, ipv6_netmask_bits))
cfg.write('\n'.join(cfg_lines)) cfg.write('\n'.join(cfg_lines))
......
...@@ -98,6 +98,7 @@ class Recipe(object): ...@@ -98,6 +98,7 @@ class Recipe(object):
software_type = options.get('software-type', DEFAULT_SOFTWARE_TYPE) software_type = options.get('software-type', DEFAULT_SOFTWARE_TYPE)
filter_kw = dict( filter_kw = dict(
(x, options['sla-' + x]) for x in options.get('sla', '').split() (x, options['sla-' + x]) for x in options.get('sla', '').split()
if options['sla-' + x]
) )
partition_parameter_kw = self._filterForStorage(dict( partition_parameter_kw = self._filterForStorage(dict(
(x, options['config-' + x]) (x, options['config-' + x])
...@@ -124,8 +125,9 @@ class Recipe(object): ...@@ -124,8 +125,9 @@ class Recipe(object):
filter_kw=filter_kw, shared=slave) filter_kw=filter_kw, shared=slave)
return_parameter_dict = self._getReturnParameterDict(self.instance, return_parameter_dict = self._getReturnParameterDict(self.instance,
return_parameters) return_parameters)
# XXX what is the right way to get a global id? if not slave:
options['instance_guid'] = self.instance.getId() # XXX: convention: should be instance-guid
options['instance_guid'] = self.instance.getId()
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady) as exc: except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady) as exc:
self._raise_request_exception = exc self._raise_request_exception = exc
self._raise_request_exception_formatted = traceback.format_exc() self._raise_request_exception_formatted = traceback.format_exc()
......
...@@ -65,9 +65,9 @@ class Recipe(object): ...@@ -65,9 +65,9 @@ class Recipe(object):
Set of IPv4 addresses. Set of IPv4 addresses.
ipv6 ipv6
Set of IPv6 addresses. Set of IPv6 addresses.
ipv4_random ipv4-random
One of the IPv4 addresses. One of the IPv4 addresses.
ipv6_random ipv6-random
One of the IPv6 addresses. One of the IPv6 addresses.
tap tap
Set of TAP interfaces. Set of TAP interfaces.
...@@ -129,9 +129,9 @@ class Recipe(object): ...@@ -129,9 +129,9 @@ class Recipe(object):
# also export single ip values for those recipes that don't support sets. # also export single ip values for those recipes that don't support sets.
if ipv4_set: if ipv4_set:
options['ipv4_random'] = list(ipv4_set)[0] options['ipv4-random'] = list(ipv4_set)[0]
if ipv6_set: if ipv6_set:
options['ipv6_random'] = list(ipv6_set)[0] options['ipv6-random'] = list(ipv6_set)[0]
options['tap'] = tap_set options['tap'] = tap_set
parameter_dict = self._expandParameterDict(options, parameter_dict) parameter_dict = self._expandParameterDict(options, parameter_dict)
......
...@@ -114,10 +114,14 @@ class Recipe: ...@@ -114,10 +114,14 @@ class Recipe:
if not buildout.has_section('slap-parameter'): if not buildout.has_section('slap-parameter'):
buildout.add_section('slap-parameter') buildout.add_section('slap-parameter')
for parameter, value in self.parameter_dict.items(): for parameter, value in self.parameter_dict.items():
if isinstance(value, str): # All parameters evaluating to False are... False, and shouldn't
buildout.set('slap-parameter', parameter, value) # convey any information.
else: # Here, all those parameters are set to empty string.
buildout.set('slap-parameter', parameter, json.dumps(value)) if value:
if isinstance(value, str):
buildout.set('slap-parameter', parameter, value)
else:
buildout.set('slap-parameter', parameter, json.dumps(value))
buildout.add_section('slap-network-information') buildout.add_section('slap-network-information')
buildout.set('slap-network-information', 'local-ipv4', buildout.set('slap-network-information', 'local-ipv4',
......
...@@ -54,7 +54,7 @@ context = ...@@ -54,7 +54,7 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
md5sum = ea305baf481766227752e08d287c0bf8 md5sum = 694205787e78c5d615d72d7b4b26d174
extra-context = extra-context =
key buildout_bin_directory buildout:bin-directory key buildout_bin_directory buildout:bin-directory
key dcron_location dcron:location key dcron_location dcron:location
...@@ -83,7 +83,7 @@ extra-context = ...@@ -83,7 +83,7 @@ extra-context =
[template-cloudooo] [template-cloudooo]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = fd5964a038613ea3e0b54f87564fe248 md5sum = 4c8608f9525be0f01a09d60b240315a9
mode = 640 mode = 640
......
...@@ -9,8 +9,8 @@ parts += ...@@ -9,8 +9,8 @@ parts +=
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://ftp.drupal.org/files/projects/drupal-7.16.tar.gz url = http://ftp.drupal.org/files/projects/drupal-7.19.tar.gz
md5sum = 352497b2df94b5308e31cb8da020b631 md5sum = c1dd3960f1555df208c80ef612e0c53a
[download-patch-hide-dbsetup] [download-patch-hide-dbsetup]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
......
...@@ -5,13 +5,11 @@ $i = 1; ...@@ -5,13 +5,11 @@ $i = 1;
/* Server parameters */ /* Server parameters */
$cfg['Servers'][$i]['host'] = 'Put here mysql host template key'; $cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
$cfg['Servers'][$i]['port'] = 'Put here mysql port template key'; $cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
$cfg['Servers'][$i]['only_db'] = 'Put here mysql database template key';
/* Authentication type */ /* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = ''; $cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false;
/* rajk - for blobstreaming */ /* rajk - for blobstreaming */
......
...@@ -13,3 +13,7 @@ php_ini = $${directory:php-ini-dir}/php.ini ...@@ -13,3 +13,7 @@ php_ini = $${directory:php-ini-dir}/php.ini
root_docservers = $${buildout:directory}/srv/docservers root_docservers = $${buildout:directory}/srv/docservers
dependency = $${apache-php:recipe} dependency = $${apache-php:recipe}
[publish-connection-informations]
# XXX login should not be hardcoded
login = superadmin
password = $${maarch-configuration:db_password}
...@@ -12,19 +12,16 @@ develop = ...@@ -12,19 +12,16 @@ develop =
# += since we need rdiff-backup and friends # += since we need rdiff-backup and friends
parts += parts +=
slapos-cookbook
apache-php-postgres apache-php-postgres
pear-modules pear-modules
eggs eggs
instance instance
instance-apache-php instance-apache-php
slapos.cookbook-repository
slapos.recipe.maarch-repository slapos.recipe.maarch-repository
check-recipe check-recipe
[versions] [versions]
slapos.cookbook =
slapos.recipe.maarch = slapos.recipe.maarch =
...@@ -34,18 +31,12 @@ repository = http://git.erp5.org/repos/slapos.recipe.maarch.git ...@@ -34,18 +31,12 @@ repository = http://git.erp5.org/repos/slapos.recipe.maarch.git
branch = master branch = master
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = lapp-resilient3
git-executable = ${git:location}/bin/git
[check-recipe] [check-recipe]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
update-command = ${:command} update-command = ${:command}
command = command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link
...@@ -72,7 +63,7 @@ part-list = maarch-configuration ...@@ -72,7 +63,7 @@ part-list = maarch-configuration
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-custom.cfg.in url = ${:_profile_base_location_}/instance-custom.cfg.in
output = ${buildout:directory}/instance-custom.cfg output = ${buildout:directory}/instance-custom.cfg
md5sum = 22d8e4d8bb1a5b1c42c6cfb42ee490a0 md5sum = d1b02a8c571886a225f2f1c8da06286c
mode = 0644 mode = 0644
......
...@@ -18,7 +18,7 @@ offline = true ...@@ -18,7 +18,7 @@ offline = true
[url] [url]
recipe = slapos.cookbook:publishurl recipe = slapos.cookbook:publishurl
url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-address}]:$${stunnel:remote-port}/$${mariadb:database} url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-host}]:$${stunnel:remote-port}/$${mariadb:database}
[mariadb] [mariadb]
recipe = slapos.cookbook:mysql recipe = slapos.cookbook:mysql
...@@ -92,10 +92,11 @@ key-file = $${ca-stunnel:key-file} ...@@ -92,10 +92,11 @@ key-file = $${ca-stunnel:key-file}
cert-file = $${ca-stunnel:cert-file} cert-file = $${ca-stunnel:cert-file}
pid-file = $${basedirectory:run}/stunnel.pid pid-file = $${basedirectory:run}/stunnel.pid
local-port = $${mariadb:port} local-port = $${mariadb:port}
local-address = $${mariadb:ip} local-host = $${mariadb:ip}
remote-address = $${slap-network-information:global-ipv6} remote-host = $${slap-network-information:global-ipv6}
remote-port = 6446 remote-port = 6446
client = false client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
[logrotate] [logrotate]
recipe = slapos.cookbook:logrotate recipe = slapos.cookbook:logrotate
...@@ -128,13 +129,13 @@ dcrond-binary = ${dcron:location}/sbin/crond ...@@ -128,13 +129,13 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries} cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs} crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps} cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:binary} catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond binary = $${basedirectory:services}/crond
[cron-simplelogger] [cron-simplelogger]
recipe = slapos.cookbook:simplelogger recipe = slapos.cookbook:simplelogger
binary = $${rootdirectory:bin}/cron_simplelogger wrapper = $${rootdirectory:bin}/cron_simplelogger
output = $${directory:cronoutput} log = $${basedirectory:log}/crond.log
[cron-entry-logrotate] [cron-entry-logrotate]
<= cron <= cron
......
...@@ -12,7 +12,6 @@ extends = ...@@ -12,7 +12,6 @@ extends =
parts = parts =
# Create instance template # Create instance template
#TODO : list here all parts.
template template
instance-remotebackuped instance-remotebackuped
instance-mariadb instance-mariadb
...@@ -49,14 +48,14 @@ mode = 0644 ...@@ -49,14 +48,14 @@ mode = 0644
[instance-mariadb] [instance-mariadb]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg url = ${:_profile_base_location_}/instance-mariadb.cfg
md5sum = 135ad8e59a45e053f3aaf75deb35c5b0 md5sum = d160bb15d8d3a3913706a4ed29c49388
output = ${buildout:directory}/template-mariadb.cfg output = ${buildout:directory}/template-mariadb.cfg
mode = 0644 mode = 0644
[instance-remotebackuped] [instance-remotebackuped]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-remotebackuped.cfg url = ${:_profile_base_location_}/instance-remotebackuped.cfg
md5sum = bf9e5aa9d63bda9c4aa87d9527fec3e8 md5sum = 1bfe1b564def00726b6db46d27534210
output = ${buildout:directory}/template-backuped.cfg output = ${buildout:directory}/template-backuped.cfg
mode = 0644 mode = 0644
...@@ -82,4 +81,72 @@ signature-certificate-list = ...@@ -82,4 +81,72 @@ signature-certificate-list =
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE----- -----END CERTIFICATE-----
\ No newline at end of file
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.6
hexagonit.recipe.download = 1.6
meld3 = 0.6.10
slapos.cookbook = 0.72.0
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
# Required by:
# slapos.core==0.35
Flask = 0.9
# Required by:
# slapos.cookbook==0.72.0
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.72.0
# slapos.core==0.35
# xml-marshaller==0.9.7
lxml = 3.1.0
# Required by:
# slapos.cookbook==0.72.0
netaddr = 0.7.10
# Required by:
# slapos.core==0.35
netifaces = 0.8
# Required by:
# slapos.core==0.35
pyflakes = 0.6.1
# Required by:
# slapos.cookbook==0.72.0
pytz = 2012j
# Required by:
# slapos.cookbook==0.72.0
# slapos.core==0.35
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.72.0
slapos.core = 0.35
# Required by:
# slapos.core==0.35
supervisor = 3.0b1
# Required by:
# slapos.core==0.35
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.72.0
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35
zope.interface = 4.0.3
[buildout] [buildout]
parts = parts =
urls postgres-urlparse
apache-proxy # apacheperl-promise
logrotate mioga-instance
logrotate-entry-apache cron-entry-crawler
cron
cron-entry-logrotate
sshkeys-authority
sshkeys-dropbear sshkeys-dropbear
dropbear-server dropbear-server-add-authorized-key
dropbear-server-pbs-authorized-key sshkeys-authority
publish-connection-information
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
#----------------
#--
#-- Creation of all needed directories.
[rootdirectory] [rootdirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin log = $${buildout:directory}/log
tmp = $${buildout:directory}/tmp var = $${buildout:directory}/var
buildinst = $${buildout:directory}/buildinst
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/run
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise promises = $${rootdirectory:etc}/promise
htdocs = $${rootdirectory:srv}/htdocs
[directory] cronstamps = $${rootdirectory:etc}/cronstamps/
recipe = slapos.cookbook:mkdirectory cron-entries = $${rootdirectory:etc}/cron.d/
htdocs = $${rootdirectory:srv}/www crontabs = $${rootdirectory:etc}/crontabs/
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
ssh = $${rootdirectory:etc}/ssh
sshkeys = $${rootdirectory:srv}/sshkeys sshkeys = $${rootdirectory:srv}/sshkeys
httpd-log = $${basedirectory:log}/apache ssh = $${rootdirectory:etc}/ssh
#---------------- [cron-simplelogger]
#-- recipe = slapos.cookbook:simplelogger
#-- Deploy cron. wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${rootdirectory:log}/crond.log
[cron] [cron]
recipe = slapos.cookbook:cron recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries} cronstamps = $${basedirectory:cronstamps}
crontabs = $${directory:crontabs} cron-entries = $${basedirectory:cron-entries}
cronstamps = $${directory:cronstamps} crontabs = $${basedirectory:crontabs}
catcher = $${cron-simplelogger:wrapper} catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond binary = $${basedirectory:services}/crond
[cron-simplelogger] [cron-entry-crawler]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
#----------------
#--
#-- Deploy logrotate.
[cron-entry-logrotate]
<= cron <= cron
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
name = logrotate name = logrotate
frequency = 0 0 * * * frequency = 23 50 * * *
command = $${logrotate:wrapper} command = $${mioga-instance:bin_dir}/crawl.sh
[logrotate] [apacheperl-promise]
recipe = slapos.cookbook:logrotate recipe = slapos.cookbook:check_port_listening
# Binaries path = $${basedirectory:promises}/httpd_promise
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate hostname = $${apacheperl-instance:ip}
gzip-binary = ${gzip:location}/bin/gzip port = $${apacheperl-instance:port}
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories [publish-connection-information]
wrapper = $${rootdirectory:bin}/logrotate recipe = slapos.cookbook:publish
conf = $${rootdirectory:etc}/logrotate.conf direct_url = $${mioga-url:direct_url}
logrotate-entries = $${directory:logrotate-entries} ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port}
backup = $${directory:logrotate-backup} url = $${request-frontend:connection-site_url}
state-file = $${rootdirectory:srv}/logrotate.status
# Request POSTGRES INSTANCE and parse its URL
#---------------- [request-postgres]
#-- <= slap-connection
#-- sshkeys recipe = slapos.cookbook:request
name = Postgres
software-url = $${slap-connection:software-release-url}
software-type = postgres
return = url
sla = computer_guid
sla-computer_guid = $${slap-connection:computer-id}
[postgres-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-postgres:connection-url}
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin
# SSH SERVER
[sshkeys-directory] [sshkeys-directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests requests = $${basedirectory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys keys = $${basedirectory:sshkeys}/keys/
[sshkeys-authority] [sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority recipe = slapos.cookbook:sshkeys_authority
...@@ -110,6 +101,16 @@ keys-directory = $${sshkeys-directory:keys} ...@@ -110,6 +101,16 @@ keys-directory = $${sshkeys-directory:keys}
wrapper = $${basedirectory:services}/sshkeys_authority wrapper = $${basedirectory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey keygen-binary = ${dropbear:location}/bin/dropbearkey
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${basedirectory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = /bin/bash
rsa-keyfile = $${basedirectory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[sshkeys-dropbear] [sshkeys-dropbear]
<= sshkeys-authority <= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request recipe = slapos.cookbook:sshkeys_authority.request
...@@ -120,78 +121,67 @@ public-key = $${dropbear-server:rsa-keyfile}.pub ...@@ -120,78 +121,67 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile} private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd wrapper = $${basedirectory:services}/sshd
[dropbear-server-add-authorized-key]
#----------------
#--
#-- Dropbear.
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = $${rdiff-backup-server:wrapper}
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[dropbear-server-pbs-authorized-key]
<= dropbear-server <= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key} key = $${slap-parameter:authorized-key}
[slap-parameter]
#---------------- # Default value if no ssh key is specified
#-- authorized-key =
#-- rdiff
# IPv4 AND PORT 80 FRONTEND
[rdiff-backup-server]
recipe = slapos.cookbook:pbs [request-frontend]
client = false <= slap-connection
path = $${directory:htdocs} recipe = slapos.cookbook:requestoptional
wrapper = $${rootdirectory:bin}/rdiffbackup-server name = Frontend
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup # 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 = $${mioga-url:direct_url}
#-- Apache Proxy. return = site_url
[apache-proxy] # MIOGA INSTANCE
recipe = slapos.cookbook:apacheproxy
url = $${slap-parameter:proxy-url} [mioga-instance]
pid-file = $${basedirectory:run}/apache.pid recipe = slapos.cookbook:mioga.instantiate
lock-file = $${basedirectory:run}/apache.lock # mioga_compile_dir = ${template-apacheperl:compile-directory}
ip = $${slap-network-information:global-ipv6} # Pity that the following line does not work. Or does it?
port = 8080 # mioga_compile_env = ${mioga:environment}
error-log = $${directory:httpd-log}/error.log mioga_location = ${mioga:location}
access-log = $${directory:httpd-log}/access.log mioga_buildinst = ${mioga:buildinst}
httpd-conf = $${rootdirectory:etc}/apache.conf libxslt_bin = ${libxslt:location}/bin
wrapper = $${basedirectory:services}/apache libxml2_bin = ${libxml2:location}/bin
rsync_bin = ${rsync:location}/bin
promise = $${basedirectory:promises}/apache var_directory = $${rootdirectory:var}
buildinst_directory = $${rootdirectory:buildinst}
httpd-binary = ${apache:location}/bin/httpd instance_root = $${buildout:directory}
perl_bin = ${perl:location}/bin
[logrotate-entry-apache] postgres_bin = ${postgresql:location}/bin
<= logrotate htdocs = $${apacheperl-instance:htdocs}
recipe = slapos.cookbook:logrotate.d db_host = $${postgres-urlparse:host}
name = apache db_port = $${postgres-urlparse:port}
log = $${apache-proxy:error-log} $${apache-proxy:access-log} db_dbname = $${postgres-urlparse:path}
frequency = daily db_username = $${postgres-urlparse:username}
rotate-num = 30 db_password = $${postgres-urlparse:password}
sharedscripts = true public_ipv6 = $${slap-network-information:global-ipv6}
notifempty = true public_ipv6_port = 8080
create = true private_ipv4 = $${slap-network-information:local-ipv4}
httpd_binary = ${apache-2.2:location}/bin/httpd
path = $${basedirectory:services}/apacheperl
#---------------- htdocs = $${basedirectory:htdocs}
#-- httpd_conf = $${rootdirectory:etc}/httpd.conf
#-- Publish instance parameters. pid_file = $${basedirectory:services}/apache.pid
lock_file = $${basedirectory:services}/apache.lock
[urls] dav_locks = $${buildout:directory}/var/dav_locks
recipe = slapos.cookbook:publish services_dir = $${basedirectory:services}
url = http://[$${apache-proxy:ip}]:$${apache-proxy:port}/ error_log = $${rootdirectory:log}/error.log
ssh-public-key = $${sshkeys-dropbear:public-key-value} access_log = $${rootdirectory:log}/access.log
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path} bin_dir = $${rootdirectory:bin}
log_dir = $${rootdirectory:log}
site_perl = ${perl:siteprefix}
[mioga-url]
direct_url = http://[$${slap-network-information:global-ipv6}]:$${mioga-instance:public_ipv6_port}
\ No newline at end of file
[buildout]
parts =
symlinks
publish
postgres-instance
postgres-promise
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance-parameters]
# Fetches parameters defined in SlapOS Master for this instance
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}
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
services = $${rootdirectory:etc}/run/
promises = $${rootdirectory:etc}/promise/
var = $${buildout:directory}/var
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin
[postgres-instance]
# create cluster, configuration files and a database
recipe = slapos.cookbook:postgres
# Options
ipv6_host = $${slap-network-information:global-ipv6}
user = mioga
port = 5432
dbname = mioga2
# pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${rootdirectory:var}/data
services = $${rootdirectory:services}
bin = $${rootdirectory:bin}
# Deploy promises scripts
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
path = $${rootdirectory:promises}/postgres
hostname = $${slap-network-information:global-ipv6}
port = $${postgres-instance:port}
[publish]
recipe = slapos.cookbook:publishurl
url = $${postgres-instance:url}
[buildout] [buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts = instance [switch-softwaretype]
recipe = slapos.cookbook:softwaretype
[instance] default = ${template-apacheperl:output}
recipe = ${instance-recipe:egg}:${instance-recipe:module} postgres = ${template-postgres:output}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
import fnmatch
import grp
import os
import pprint
import pwd
import re
import shutil
import sys
class FileModifier:
def __init__(self, filename):
self.filename = filename
f = open(filename, 'rb')
self.content = f.read()
f.close()
def modify(self, key, value):
(self.content, count) = re.subn(
r'(<parameter[^>]*\sname\s*=\s*"' + re.escape(key) + r'"[^>]*\sdefault\s*=\s*")[^"]*',
r"\g<1>" + value,
self.content)
return count
def save(self):
f = open(self.filename, 'w')
f.write(self.content)
f.close()
def pre_configure_hook(options, bo, env):
location = options['location']
# TODO: double-check which one of these values must be set
# at instantiation time!
fm = FileModifier('conf/Config.xml')
fm.modify('apache_user', pwd.getpwuid(os.getuid())[0])
fm.modify('apache_group', grp.getgrgid(os.getgid())[0])
mioga_base = os.path.join(location, 'var', 'lib', 'Mioga2')
fm.modify('install_dir', mioga_base)
fm.modify('tmp_dir', os.path.join(mioga_base, 'tmp'))
fm.modify('search_tmp_dir', os.path.join(mioga_base, 'mioga_search'))
fm.modify('maildir', os.path.join(location, 'var', 'spool', 'mioga', 'maildir'))
fm.modify('maildirerror', os.path.join(location, 'var', 'spool', 'mioga', 'error'))
fm.modify('mailfifo', os.path.join(location, 'var', 'spool', 'mioga', 'fifo'))
fm.save()
# TODO: mail settings are certainly wrong, what is the domain name?
# Correct shebangs to the right Perl
for root, dirnames, filenames in os.walk('.'):
for filename in fnmatch.filter(filenames, '*.pl'):
with open(os.path.join(root, filename), "r+") as f:
lines = f.readlines()
(lines[0], count) = re.subn(r'^#!/usr/bin/perl',
'#!' + options['perl-binary'],
lines[0], 1)
if count > 0:
f.seek(0)
f.writelines(lines)
print "Corrected interpreter for script "+filename
# def post_make_hook(options, buildout):
# location = options['location']
# print "Mioga - postmakehook"
# print "We are currently in", os.getcwd()
# shutil.move("var", location)
# return None
This diff is collapsed.
[buildout] [buildout]
extends = develop =
../../component/postgresql/buildout.cfg /srv/slapgrid/slappart9/srv/runner/project/slapos
/opt/slapdev_build
extends =
../../component/rsync/buildout.cfg
../../component/apache-perl/buildout.cfg ../../component/apache-perl/buildout.cfg
../../component/perl-Crypt-SSLeay/buildout.cfg
../../component/perl-XML-Parser/buildout.cfg
../../component/perl-XML-LibXML/buildout.cfg
../../component/perl-XML-LibXSLT/buildout.cfg
../../component/perl-Term-ReadLine-Gnu/buildout.cfg
../../component/perl-Text-Iconv/buildout.cfg
../../component/perl-Image-Magick/buildout.cfg
../../component/postgresql/buildout.cfg
../../component/perl-DBD-Pg/buildout.cfg
../../component/perl-Search-Xapian/buildout.cfg
../../component/libxslt/buildout.cfg
../../component/dcron/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/lxml-python/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
parts =
eggs
apache-perl
perl-Apache2-Request
perl-Crypt-SSLeay
perl-DBD-Pg
perl-XML-Parser
perl-XML-LibXML
perl-XML-LibXSLT
perl-Term-ReadLine-Gnu
perl-Text-Iconv
perl-Image-Magick
perl-String-Checker-mioga
perl-Search-Xapian
cpan-simple-modules
rsync
mioga
template
template-apacheperl
template-postgres
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
cns.recipe.symlink
# override perl here to keep using 5.14.x.
[perl]
recipe = hexagonit.recipe.cmmi
depends =
${gdbm:version}
version = 5.14.2
url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2
md5sum = 04a4c5d3c1f9f19d77daff8e8cd19a26
siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_}
patch-options = -p1
patches =
${perl-keep-linker-flags-in-ldflags.patch:location}/${perl-keep-linker-flags-in-ldflags.patch:filename}
# Viktor has adapted the following commands for AMD64 compilation
# TODO: find out how we can write a generic code that suits all architectures
configure-command =
sh Configure -des \
-A ccflags=-fPIC \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
-Dsiteprefix=${:siteprefix} \
-Dcflags=-I${gdbm:location}/include \
-Dldflags="-L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib" \
-Ui_db \
-Dnoextensions=ODBM_File \
-Dusethreads
environment =
PATH=${patch:location}/bin:%(PATH)s
CFLAGS='-m64 -mtune=nocona'
post-make-hook = ${perl-postmakehook-download:location}/${perl-postmakehook-download:filename}:post_make_hook
[cpan-simple-modules]
recipe = slapos.recipe.build:cpan
modules =
S/ST/STBEY/Date-Calc-6.3.tar.gz
D/DC/DCOPPIT/Benchmark-Timer-0.7102.tar.gz
R/RB/RBOW/Date-ICal-2.678.tar.gz
S/SB/SBECK/Date-Manip-6.37.tar.gz
G/GB/GBARR/TimeDate-1.20.tar.gz
S/SH/SHLOMIF/Error-0.17018.tar.gz
P/PA/PARDUS/File-MimeInfo/File-MimeInfo-0.16.tar.gz
O/OV/OVID/HTML-TokeParser-Simple-3.15.tar.gz
D/DS/DSKOLL/MIME-tools-5.503.tar.gz
D/DS/DSKOLL/IO-stringy-2.110.tar.gz
C/CO/COSIMO/HTTP-DAV-0.47.tar.gz
M/MA/MARSCHAP/perl-ldap-0.48.tar.gz
F/FD/FDESAR/Parse-Yapp-1.05.tar.gz
S/SN/SNOWHARE/Unicode-MapUTF8-1.11.tar.gz
G/GA/GAAS/Unicode-String-2.09.tar.gz
T/TY/TYEMQ/Algorithm-Diff-1.1902.tar.gz
J/JG/JGMYERS/Encode-Detect-1.01.tar.gz
G/GU/GUIDO/libintl-perl-1.20.tar.gz
K/KE/KEN/XML-XML2JSON-0.06.tar.gz
A/AR/ARISTOTLE/XML-Atom-SimpleFeed-0.86.tar.gz
P/PE/PETDANCE/Test-WWW-Mechanize-1.44.tar.gz
G/GR/GRANTM/XML-Simple-2.20.tar.gz
A/AD/ADAMK/Archive-Zip-1.30.tar.gz
D/DU/DURIST/Proc-ProcessTable-0.45.tar.gz
S/SU/SULLR/Net-INET6Glue-0.5.tar.gz
perl = perl
cpan-configuration =
makepl_arg=''
make_arg=''
[perl-String-Checker-mioga]
recipe = hexagonit.recipe.cmmi
depends =
${perl:version}
url = http://packages.alixen.org/contribs/String-Checker-0.03.tar.gz
md5sum = c750a33505609544f95eace7a2896c84
configure-command =
${perl:location}/bin/perl Makefile.PL
[mioga]
recipe = hexagonit.recipe.cmmi
version = 2.4.16
# No use re-using "version", the whole URL will change for the next one
url = http://www.alixen.org/attachments/download/89/Mioga2-2.4.16.tar.gz
md5sum = 1d2e76c798ee6d5f233011997200e125
location = ${buildout:parts-directory}/${:_buildout_section_name_}
buildinst = ${mioga:location}/buildinst
static = ${mioga:location}/static
environment =
MIOGA_BASE=${mioga:location}
MIOGA_BUILDINST=${mioga:buildinst}
MIOGA_STATIC=${mioga:static}
MIOGA_SITEPERL=${perl:siteprefix}
PATH=${libxslt:location}/bin:${libxml2:location}/bin:${perl:location}/bin:${perl:siteprefix}/bin:${rsync:location}/bin:%(PATH)s
patch-options = -p1
patches =
${mioga-patch:location}/${mioga-patch:filename}
# post-make-hook = ${mioga-postmakehook:location}/${mioga-postmakehook:filename}:post_make_hook
pre-configure-hook = ${mioga-hooks:location}/${mioga-hooks:filename}:pre_configure_hook
configure-command =
${perl:location}/bin/perl Makefile.PL
make-targets =
slapos-compilation
keep-compile-dir = true
perl-binary = ${perl:location}/bin/perl
[mioga-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
# md5sum = b836ad89902d1ea68b091a5b9800edd8
download-only = true
filename = ${:_buildout_section_name_}
[mioga-hooks]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
# md5sum = c7ceec7788749238cb5fbe09beb647b1
download-only = true
filename = mioga-hooks.py
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
# md5sum =
output = ${buildout:directory}/template.cfg
mode = 0644
[template-apacheperl]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apacheperl.cfg
# md5sum =
output = ${buildout:directory}/template-apacheperl.cfg
mode = 0644
compile-directory = ${mioga:compile-directory}/Mioga2-${mioga:version}
[template-postgres]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-postgres.cfg
# md5sum =
output = ${buildout:directory}/template-postgres.cfg
mode = 0644
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
# Test agent # Test agent
...@@ -33,4 +214,4 @@ signature-certificate-list = ...@@ -33,4 +214,4 @@ signature-certificate-list =
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE----- -----END CERTIFICATE-----
\ No newline at end of file
...@@ -16,6 +16,7 @@ offline = true ...@@ -16,6 +16,7 @@ offline = true
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc etc = $${buildout:directory}/etc
srv = $${buildout:directory}/srv
services = $${directories:etc}/service services = $${directories:etc}/service
promises = $${directories:etc}/promise promises = $${directories:etc}/promise
var = $${buildout:directory}/var var = $${buildout:directory}/var
...@@ -30,9 +31,14 @@ recipe = slapos.cookbook:postgres ...@@ -30,9 +31,14 @@ recipe = slapos.cookbook:postgres
# Options # Options
ipv6 = $${instance-parameters:ipv6} ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6-netmask-bits = 0
ipv4 = $${instance-parameters:ipv4} ipv4 = $${instance-parameters:ipv4}
ipv6_random = $${instance-parameters:ipv6_random} # listen to connections from anywhere
ipv4-netmask-bits = 0
ipv6-random = $${instance-parameters:ipv6-random}
superuser = postgres superuser = postgres
password = $${gen-passwd:passwd}
port = 5432 port = 5432
dbname = db dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand. # pgdata_directory is created by initdb, and should not exist beforehand.
...@@ -41,6 +47,16 @@ bin = ${postgresql:location}/bin ...@@ -41,6 +47,16 @@ bin = ${postgresql:location}/bin
services = $${directories:services} services = $${directories:services}
#----------------
#--
#-- Generates a random password and stores it in the filesystem
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${directories:srv}/postgres_passwd
bytes = 16
#---------------- #----------------
#-- #--
#-- Deploy promise scripts. #-- Deploy promise scripts.
...@@ -48,7 +64,7 @@ services = $${directories:services} ...@@ -48,7 +64,7 @@ services = $${directories:services}
[postgres-promise] [postgres-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/postgres path = $${directories:promises}/postgres
hostname = $${instance-parameters:ipv6_random} hostname = $${instance-parameters:ipv6-random}
port = $${postgres-instance:port} port = $${postgres-instance:port}
......
...@@ -17,7 +17,7 @@ parts = ...@@ -17,7 +17,7 @@ parts =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = dfba09a7cccefc5d92d455aaed2c1835 md5sum = d8b833a2054b82b6031a9420008b58fd
mode = 0644 mode = 0644
...@@ -25,18 +25,19 @@ mode = 0644 ...@@ -25,18 +25,19 @@ mode = 0644
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
cns.recipe.symlink = 0.2.3
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0 inotifyx = 0.2.0
lxml = 3.1beta1 lxml = 3.1beta1
meld3 = 0.6.10 meld3 = 0.6.10
netaddr = 0.7.10 netaddr = 0.7.10
pytz = 2012j pytz = 2012j
slapos.cookbook = 0.71.2
slapos.core = 0.34
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
...@@ -44,21 +45,30 @@ Flask = 0.9 ...@@ -44,21 +45,30 @@ Flask = 0.9
hexagonit.recipe.download = 1.6 hexagonit.recipe.download = 1.6
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# cns.recipe.symlink==0.2.3 # slapos.core==0.34
pyflakes = 0.6.0
# Required by:
# slapos.cookbook==0.71.2
# slapos.core==0.34
# supervisor==3.0b1 # supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010 # zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3 # zope.interface==4.0.3
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
supervisor = 3.0b1 supervisor = 3.0b1
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
unittest2 = 0.5.1
# Required by:
# slapos.core==0.34
zope.interface = 4.0.3 zope.interface = 4.0.3
...@@ -65,6 +65,38 @@ md5sum = 47f5a8cf4d134a35b7f36a7442e5798a ...@@ -65,6 +65,38 @@ md5sum = 47f5a8cf4d134a35b7f36a7442e5798a
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 640 mode = 640
[networkcache]
# signature certificates of the following uploaders.
# Cedric de Saint Martin
# Test Agent
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
......
...@@ -21,3 +21,10 @@ Example of parameter XML:: ...@@ -21,3 +21,10 @@ Example of parameter XML::
<instance> <instance>
<parameter id="authorized-key">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdNp7qZMVAzNc07opHshiIFDmJpYXQpetfcSgUj39a409d42PpsJElp7WsAE/x0nN6gUIoWIl7UiAlMzf6bKEJGJVSOZEPTmiJVlgK1Gp+kE0x9yNcncYg7p38Jny0daVA/NkkpAFyRsAm5kLGzyLtaCcktSvy0cJuy7WSSHU05pd1f8Y8thofE9g5t+/JA2VZvipxPkRfkFAG3aOAGLULlTImTSDFSDFGSDFG5F6mMnl7yvY2d6vEHVBu+K+aKmAwZVfCUwtSpa/tq3i2Lppjrw3UfrxbQSFHZCkzefr+u+l4YYe+tJrX7rYJYXD7LIfZfdSeFTlHFaN/yI1 user@host.local</parameter> <parameter id="authorized-key">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdNp7qZMVAzNc07opHshiIFDmJpYXQpetfcSgUj39a409d42PpsJElp7WsAE/x0nN6gUIoWIl7UiAlMzf6bKEJGJVSOZEPTmiJVlgK1Gp+kE0x9yNcncYg7p38Jny0daVA/NkkpAFyRsAm5kLGzyLtaCcktSvy0cJuy7WSSHU05pd1f8Y8thofE9g5t+/JA2VZvipxPkRfkFAG3aOAGLULlTImTSDFSDFGSDFG5F6mMnl7yvY2d6vEHVBu+K+aKmAwZVfCUwtSpa/tq3i2Lppjrw3UfrxbQSFHZCkzefr+u+l4YYe+tJrX7rYJYXD7LIfZfdSeFTlHFaN/yI1 user@host.local</parameter>
</instance> </instance>
instance-amount
~~~~~~~~~~~~~~~
Optional parameter.
Default: 10
...@@ -55,32 +55,32 @@ meld3 = 0.6.10 ...@@ -55,32 +55,32 @@ meld3 = 0.6.10
netaddr = 0.7.10 netaddr = 0.7.10
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.6 pycrypto = 2.6
pytz = 2012h pytz = 2012j
slapos.cookbook = 0.70 slapos.cookbook = 0.71.1
slapos.core = 0.33.1 slapos.core = 0.34
slapos.libnetworkcache = 0.13.3 slapos.libnetworkcache = 0.13.3
slapos.recipe.build = 0.11.5 slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
slapos.toolbox = 0.32 slapos.toolbox = 0.33.1
smmap = 0.8.2 smmap = 0.8.2
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
feedparser = 5.1.3 feedparser = 5.1.3
# Required by: # Required by:
...@@ -88,32 +88,40 @@ feedparser = 5.1.3 ...@@ -88,32 +88,40 @@ feedparser = 5.1.3
hexagonit.recipe.download = 1.6 hexagonit.recipe.download = 1.6
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
paramiko = 1.9.0 paramiko = 1.9.0
# Required by: # Required by:
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
psutil = 0.6.1 psutil = 0.6.1
# Required by:
# slapos.core==0.34
pyflakes = 0.5.0
# Required by: # Required by:
# cns.recipe.symlink==0.2.3 # cns.recipe.symlink==0.2.3
# slapos.cookbook==0.70 # slapos.cookbook==0.71.1
# slapos.core==0.33.1 # slapos.core==0.34
# slapos.libnetworkcache==0.13.3 # slapos.libnetworkcache==0.13.3
# slapos.toolbox==0.32 # slapos.toolbox==0.33.1
# supervisor==3.0b1 # supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010 # zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.2 # zope.interface==4.0.3
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
supervisor = 3.0b1 supervisor = 3.0b1
# Required by: # Required by:
# slapos.core==0.33.1 # slapos.core==0.34
zope.interface = 4.0.2 unittest2 = 0.5.1
# Required by:
# slapos.core==0.34
zope.interface = 4.0.3
...@@ -3,8 +3,8 @@ extends = ...@@ -3,8 +3,8 @@ extends =
../../stack/lamp/buildout.cfg ../../stack/lamp/buildout.cfg
[application] [application]
url = http://wordpress.org/wordpress-3.5.tar.gz url = http://wordpress.org/wordpress-3.5.1.tar.gz
md5sum = 105b5baff67344528bb5d8b71c050b0d md5sum = 409889c98b13cbdbb9fd121df859ae3e
[application-template] [application-template]
recipe = slapos.recipe.download recipe = slapos.recipe.download
......
...@@ -544,13 +544,12 @@ Products.CMFDefault = 2.2.2 ...@@ -544,13 +544,12 @@ Products.CMFDefault = 2.2.2
Products.CMFTopic = 2.2.1 Products.CMFTopic = 2.2.1
Products.CMFUid = 2.2.1 Products.CMFUid = 2.2.1
# Unpined locally developed egg
slapos.cookbook = slapos.cookbook =
# Pinned versions # Pinned versions
Flask = 0.9 Flask = 0.9
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
MySQL-python = 1.2.3 MySQL-python = 1.2.4
PIL = 1.1.7 PIL = 1.1.7
Paste = 1.7.5.1 Paste = 1.7.5.1
PasteDeploy = 1.5.0 PasteDeploy = 1.5.0
...@@ -558,76 +557,80 @@ PasteScript = 1.7.5 ...@@ -558,76 +557,80 @@ PasteScript = 1.7.5
Products.CMFActionIcons = 2.1.3 Products.CMFActionIcons = 2.1.3
Products.DCWorkflowGraph = 0.4.1 Products.DCWorkflowGraph = 0.4.1
Products.ExternalEditor = 1.1.0 Products.ExternalEditor = 1.1.0
Products.GenericSetup = 1.7.2 Products.GenericSetup = 1.7.3
Products.MimetypesRegistry = 2.0.3 Products.LongRequestLogger = 1.1.0
Products.PluggableAuthService = 1.8.0 Products.MimetypesRegistry = 2.0.4
Products.PluggableAuthService = 1.9.0
Products.PluginRegistry = 1.3 Products.PluginRegistry = 1.3
Products.TIDStorage = 5.4.8 Products.TIDStorage = 5.4.8
Products.Zelenium = 1.0.3 Products.Zelenium = 1.0.3
StructuredText = 2.11.1 StructuredText = 2.11.1
WSGIUtils = 0.7 WSGIUtils = 0.7
WebOb = 1.2.3
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.11.1 apache-libcloud = 0.11.4
argparse = 1.2.1 argparse = 1.2.1
async = 0.6.1 async = 0.6.1
atomize = 0.1.1 atomize = 0.1.1
buildout-versions = 1.7 buildout-versions = 1.7
cElementTree = 1.0.5-20051216 cElementTree = 1.0.5-20051216
chardet = 1.1 chardet = 2.1.1
coverage = 3.5.2 cloudooo = 1.2.5-dev
coverage = 3.6
csp-eventlet = 0.7.0 csp-eventlet = 0.7.0
elementtree = 1.2.7-20070827-preview elementtree = 1.2.7-20070827-preview
erp5.recipe.cmmiforcei686 = 0.1.3 erp5.recipe.cmmiforcei686 = 0.1.3
erp5.util = 0.4.22 erp5.util = 0.4.22
erp5diff = 0.8.1.5 erp5diff = 0.8.1.5
eventlet = 0.9.17 eventlet = 0.12.1
feedparser = 5.1.2 feedparser = 5.1.3
five.localsitemanager = 2.0.5 five.localsitemanager = 2.0.5
fpconst = 0.7.2 fpconst = 0.7.2
gitdb = 0.5.4 gitdb = 0.5.4
greenlet = 0.4.0 greenlet = 0.4.0
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
http-parser = 0.7.8 http-parser = 0.7.12
huBarcode = 0.63 huBarcode = 0.63
inotifyx = 0.2.0 inotifyx = 0.2.0
ipdb = 0.7 ipdb = 0.7
ipython = 0.13 ipython = 0.13.1
lxml = 2.3.6 lxml = 2.3.6
meld3 = 0.6.8 meld3 = 0.6.10
netaddr = 0.7.9 mr.developer = 1.21
netaddr = 0.7.10
netifaces = 0.8 netifaces = 0.8
nose = 1.2.1
ordereddict = 1.1 ordereddict = 1.1
paramiko = 1.7.7.2 paramiko = 1.9.0
plone.recipe.command = 1.1 plone.recipe.command = 1.1
ply = 3.4 ply = 3.4
polib = 1.0.0 polib = 1.0.2
psutil = 0.6.1 psutil = 0.6.1
pyflakes = 0.6.1
python-ldap = 2.4.10 python-ldap = 2.4.10
python-magic = 0.4.3 python-magic = 0.4.3
python-memcached = 1.47 python-memcached = 1.47-ipv6-1
qrcode = 2.4.2
requests = 1.1.0
restkit = 4.2.0 restkit = 4.2.0
rtjp-eventlet = 0.3.2 rtjp-eventlet = 0.3.2
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
slapos.core = 0.28 slapos.core = 0.34
slapos.libnetworkcache = 0.13.2 slapos.libnetworkcache = 0.13.2
slapos.recipe.build = 0.11.6 slapos.recipe.build = 0.11.6
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
slapos.toolbox = 0.29 slapos.toolbox = 0.33
smmap = 0.8.2 smmap = 0.8.2
socketpool = 0.5.2 socketpool = 0.5.2
supervisor = 3.0a12 spyne = 2.9.3
supervisor = 3.0b1
threadframe = 0.2 threadframe = 0.2
timerserver = 2.0.2 timerserver = 2.0.2
urlnorm = 1.1.2 urlnorm = 1.1.2
uuid = 1.30 uuid = 1.30
validictory = 0.8.3 validictory = 0.9.0
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
xupdate-processor = 0.4 xupdate-processor = 0.4
mr.developer = 1.21
qrcode = 2.4.1
spyne = 2.9.3
requests = 0.13.2
cloudooo = 1.2.5-dev
zope.app.testing = 3.8.1 ; BBB
zope.app.publication = 3.14.0
zope.app.appsetup = 3.16.0 zope.app.appsetup = 3.16.0
zope.app.publication = 3.14.0
zope.app.testing = 3.8.1 ; BBB
# This file is responsible of three things:
# 1/ Act as "Apache exporter"
# 2/ Act as "Mariadb backup infrastructure requester"
# 3/ Act as "Apache" instance
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
extends = {{templateapache}}
{{templatepbsreadyexport}}
parts +=
{{ parts.replicate("mariadb", "3") }}
# Repeating parts from instance-apache-php.
# XXX-Cedric: how to simplify this?
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
promise
slapmonitor
slapmonitor-xml
frontend-promise
content-promise
publish-connection-informations
{{ replicated.replicate("mariadb", "3", "mariadb-export", "mariadb-import") }}
# Nothing to do for the exporter. Just dummy part that does nothing.
# For httpd instance, PBS will directly pull data from srv/www.
# XXX-Cedric: write a real backup system.
[exporter]
wrapper = /bin/true
# State that we want to backup srv/www directory, not srv/backup.
# XXX-Cedric: works well, but doesn't work with big data.
[rdiff-backup-server]
path = ${directory:www}
# Add "exporter" parameters to list of published connection parameters
[publish-connection-informations]
# XXX-Cedric: Long term goal: could be a recipe that requests an instance and
# bubbles ALL
# parameters of the requested instance. Requirement: aggregated publish.
<= resilient-publish-connection-parameter
# XXX-Cedric: resilient overwrites what's returned from request-mariadb
# XXX-Cedric: change the request method to return everything from
# getConnectionParameterDict()
[request-mariadb]
return = ssh-public-key ssh-url notification-id ip url
[buildout]
extends = ${instance-apache-php:output}
${pbsready-export:output}
parts =
apache-proxy
logrotate
logrotate-entry-apache
cron
cron-entry-logrotate
sshkeys-authority
sshkeys-dropbear
dropbear-server
dropbear-server-pbs-authorized-key
[apache-proxy]
recipe = slapos.cookbook:apacheproxy
url = $${slap-parameter:proxy-url}
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
httpd-conf = $${rootdirectory:etc}/apache.conf
wrapper = $${basedirectory:services}/apache
promise = $${basedirectory:promises}/apache
httpd-binary = ${apache:location}/bin/httpd
#----------------
#--
#-- 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}/run
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise
[directory]
recipe = slapos.cookbook:mkdirectory
htdocs = $${rootdirectory:srv}/www
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
ssh = $${rootdirectory:etc}/ssh
sshkeys = $${rootdirectory:srv}/sshkeys
httpd-log = $${basedirectory:log}/apache
#----------------
#--
#-- 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
[logrotate-entry-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${apache-proxy:error-log} $${apache-proxy:access-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
#----------------
#--
#-- sshkeys
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests
keys = $${directory:sshkeys}/keys
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${basedirectory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[sshkeys-dropbear]
<= 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 = $${basedirectory:services}/sshd
#----------------
#--
#-- Dropbear.
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = $${rdiff-backup-server:wrapper}
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[dropbear-server-pbs-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
#----------------
#--
#-- rdiff
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
client = false
path = $${directory:htdocs}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
extends = ${pbsready-import:output}
[directory]
srv = $${buildout:directory}/srv
www = $${:srv}/www/
# Nothing to do for the import. Just dummy part that does nothing.
# For httpd instance, PBS will directly push data to srv/www.
# XXX-Cedric: write a real backup system.
[importer]
wrapper = /bin/true
# State that we want to push to srv/www directory, not srv/backup.
[rdiff-backup-server]
path = $${directory:www}
...@@ -55,6 +55,7 @@ logrotate-backup = $${basedirectory:backup}/logrotate ...@@ -55,6 +55,7 @@ logrotate-backup = $${basedirectory:backup}/logrotate
report = $${rootdirectory:etc}/report report = $${rootdirectory:etc}/report
stunnel-conf = $${rootdirectory:etc}/stunnel stunnel-conf = $${rootdirectory:etc}/stunnel
xml-report = $${rootdirectory:var}/xml_report xml-report = $${rootdirectory:var}/xml_report
www = $${rootdirectory:srv}/www/
[cadirectory] [cadirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -194,7 +195,7 @@ source = ${application:location} ...@@ -194,7 +195,7 @@ source = ${application:location}
template = ${application-template:location}/${application-template:filename} template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location} configuration = ${application-configuration:location}
htdocs = $${rootdirectory:srv}/www/ htdocs = $${directory:www}
pid-file = $${basedirectory:run}/apache.pid pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
......
...@@ -20,32 +20,35 @@ parts = ...@@ -20,32 +20,35 @@ parts =
instance-mariadb-import instance-mariadb-import
instance-mariadb-export instance-mariadb-export
instance-default-root #Contains the importer and exporter recipes for apache
instance-apache-import
instance-apache-export
extends = extends =
../resilient/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg ../../component/apache-php/buildout.cfg
../../component/apache/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
../../component/glib/buildout.cfg ../../component/glib/buildout.cfg
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
../../component/perl/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/zlib/buildout.cfg ../../component/mariadb/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/gzip/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/mydumper/buildout.cfg ../../component/mydumper/buildout.cfg
../../component/mysql-python/buildout.cfg ../../component/mysql-python/buildout.cfg
../../component/dropbear/buildout.cfg ../../component/perl/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/zlib/buildout.cfg
../resilient/buildout.cfg
../slapos.cfg ../slapos.cfg
../../component/dash/buildout.cfg
../../component/curl/buildout.cfg
[mariadb] [mariadb]
# Compile dir is for plugins, there's no plugin in LAMP # Compile dir is for plugins, there's no plugin in LAMP
...@@ -64,66 +67,71 @@ strip-top-level-dir = true ...@@ -64,66 +67,71 @@ strip-top-level-dir = true
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = 38bdcf0a8263d4a19bd6a35c0cd00340 md5sum = 650cd2527158734fd6ccd9ec374b5e69
mode = 0644 mode = 0644
[instance-apache-php] [instance-apache-php]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
output = ${buildout:directory}/instance-apache-php.cfg output = ${buildout:directory}/instance-apache-php.cfg
md5sum = bf3219cd7d318e02e39c462fbb530715 md5sum = 0538b05d27d8a64e89f898c09eb57716
mode = 0644 mode = 0644
[instance-apache-backup] [instance-apache-import]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-backup.cfg.in url = ${:_profile_base_location_}/apache/instance-apache-import.cfg.in
output = ${buildout:directory}/instance-apache-backup.cfg output = ${buildout:directory}/instance-apache-import.cfg
md5sum = 48f969d82319a9d145570f5f0fd27672 md5sum = f1dc2a71d362b5d2d36481ffefdd2293
mode = 0644 mode = 0644
[template-resilient-lamp] [instance-apache-export]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/template-resilient.cfg.in template = ${:_profile_base_location_}/apache/instance-apache-export.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg rendered = ${buildout:directory}/instance-apache-export.cfg
context = key templateapache instance-apache-php:output context = key templateapache instance-apache-php:output
key dropbear dropbear:location key templatepbsreadyexport pbsready-export:output
key buildout buildout:bin-directory
import-list = file parts template-parts:destination import-list = file parts template-parts:destination
file replicated template-replicated:destination file replicated template-replicated:destination
md5sum = 5605ad8896c2718854bf26148c4ae940 md5sum = 2dc6134621b8a12817d43a979b84089a
mode = 0644
[instance-resilient]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg
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
md5sum = f6dc9290194ad1fbe1ced553f5668922
mode = 0644 mode = 0644
[instance-mariadb] [instance-mariadb]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/instance-mariadb.cfg output = ${buildout:directory}/instance-mariadb.cfg
md5sum = fafb873323c0084c522360f94ebe1df7 md5sum = b214f56ede1a9d10f243c245c804d3a5
mode = 0644 mode = 0644
[instance-mariadb-import] [instance-mariadb-import]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg output = ${buildout:directory}/instance-mariadb-import.cfg
md5sum = 8009627bb669d1fee0df030daa8d3bdc md5sum = faf5826f4b27e362f34ad17db54b8c9a
mode = 0644 mode = 0644
[instance-mariadb-export] [instance-mariadb-export]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg output = ${buildout:directory}/instance-mariadb-export.cfg
md5sum = 0513bf25fbb20cccd57f285c40d96498 md5sum = 0352896921ca1766b64f0b54f0f8c27e
mode = 0644
[instance-default-root]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-default-root.cfg.in
output = ${buildout:directory}/instance-default-root.cfg
md5sum = 53c9020f7a0b5203f976e069e455787b
mode = 0644 mode = 0644
...@@ -279,6 +287,9 @@ signature-certificate-list = ...@@ -279,6 +287,9 @@ signature-certificate-list =
[versions] [versions]
# Fetch stable version of lxml, not beta
lxml = 3.0.2
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.11.4 apache-libcloud = 0.11.4
...@@ -287,32 +298,33 @@ buildout-versions = 1.7 ...@@ -287,32 +298,33 @@ buildout-versions = 1.7
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0 inotifyx = 0.2.0
lxml = 3.0.2
meld3 = 0.6.10 meld3 = 0.6.10
netaddr = 0.7.10 netaddr = 0.7.10
pycrypto = 2.6 pycrypto = 2.6
pytz = 2012h pytz = 2012j
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.cookbook = 0.73.1
slapos.recipe.build = 0.11.5 slapos.recipe.build = 0.11.5
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33
smmap = 0.8.2 smmap = 0.8.2
# Required by: # Required by:
# slapos.core==0.33.2-dev # slapos.core==0.35.1
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
feedparser = 5.1.3 feedparser = 5.1.3
# Required by: # Required by:
...@@ -320,39 +332,56 @@ feedparser = 5.1.3 ...@@ -320,39 +332,56 @@ feedparser = 5.1.3
hexagonit.recipe.download = 1.6 hexagonit.recipe.download = 1.6
# Required by: # Required by:
# slapos.core==0.33.2-dev # slapos.core==0.35.1
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
paramiko = 1.9.0 paramiko = 1.9.0
# Required by: # Required by:
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
psutil = 0.6.1 psutil = 0.6.1
# Required by: # Required by:
# slapos.core==0.33.2-dev # slapos.core==0.35.1
pyflakes = 0.5.0 pyflakes = 0.6.1
# Required by: # Required by:
# slapos.cookbook==0.70.1-dev # slapos.cookbook==0.73.1
# slapos.core==0.33.2-dev # slapos.core==0.35.1
# slapos.toolbox==0.32.1-dev # slapos.toolbox==0.33
# supervisor==3.0b1 # supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010 # zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.2 # zope.interface==4.0.3
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.33.2-dev # slapos.toolbox==0.33
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1 supervisor = 3.0b1
# Required by: # Required by:
# slapos.toolbox==0.32.1-dev # slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.toolbox==0.33
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.core==0.33.2-dev # slapos.core==0.35.1
zope.interface = 4.0.2 zope.interface = 4.0.3
cp.recipe.cmd = 0.4
# Required by:
# zope.testing==4.1.1
zope.exceptions = 4.0.5
# Required by:
# cp.recipe.cmd==0.4
zope.testing = 4.1.1
[buildout]
parts = request-apache
[request-apache]
<= slap-connection
recipe = slapos.cookbook:request
software-url = $${slap-connection:software-release-url}
software-type = apache
name = Apache
# 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("apache", "3") }}
publish-connection-informations
{{ replicated.replicate("apache", "3", "apache-export", "apache-import") }}
# Bubble up the parameters
[request-apache]
return = url ssh-public-key ssh-url notification-id ip url backend_url
# XXX: hardcoded values
config = domain number authorized-key notify ip-list namebase mariadb1-computer-guid pbs-mariadb1-computer-guid mariadb2-computer-guid pbs-mariadb2-computer-guid mariadb3-computer-guid pbs-mariadb3-computer-guid
config-mariadb1-computer-guid = ${slap-parameter:mariadb1-computer-guid}
config-pbs-mariadb1-computer-guid = ${slap-parameter:pbs-mariadb1-computer-guid}
config-mariadb2-computer-guid = ${slap-parameter:mariadb2-computer-guid}
config-pbs-mariadb2-computer-guid = ${slap-parameter:pbs-mariadb2-computer-guid}
config-mariadb3-computer-guid = ${slap-parameter:mariadb3-computer-guid}
config-pbs-mariadb3-computer-guid = ${slap-parameter:pbs-mariadb3-computer-guid}
config-domain = ${slap-parameter:domain}
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = ${request-apache:connection-backend_url}
url = ${request-apache:connection-url}
[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.
mariadb1-computer-guid =
pbs-mariadb1-computer-guid =
mariadb2-computer-guid =
pbs-mariadb2-computer-guid =
mariadb3-computer-guid =
pbs-mariadb3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
domain =
...@@ -10,15 +10,12 @@ offline = true ...@@ -10,15 +10,12 @@ offline = true
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${instance-apache-php:output} default = ${instance-apache-php:output}
resilient = ${template-resilient-lamp:rendered} resilient = ${instance-resilient:rendered}
mariadb = ${instance-mariadb:output} mariadb = ${instance-mariadb:output}
mariadb-import = ${instance-mariadb-import:output} mariadb-import = ${instance-mariadb-import:output}
mariadb-export = ${instance-mariadb-export:output} mariadb-export = ${instance-mariadb-export:output}
apache-backup = ${instance-apache-backup:output} apache-import = ${instance-apache-import:output}
apache-export = ${instance-apache-export:rendered}
# To prepend an empty root instance:
#default = ${instance-default-root:output}
#apache = ${instance-apache-php:output}
#frozen creates a syntax error, meaning it can keep its data. #frozen creates a syntax error, meaning it can keep its data.
#It's dirty as hell, it needs to be replaced. #It's dirty as hell, it needs to be replaced.
......
...@@ -2,14 +2,23 @@ ...@@ -2,14 +2,23 @@
extends = ${instance-mariadb:output} extends = ${instance-mariadb:output}
${pbsready-export:output} ${pbsready-export:output}
# Repeating parts from instance-mariadb.
parts += parts +=
mariadb urls
mariadb
# have to repeat the next one, as it's not inherited from pbsready-export stunnel
cron-entry-backup certificate-authority
ca-stunnel
logrotate
logrotate-entry-mariadb
logrotate-entry-stunnel
logrotate-entry-cron
cron
cron-entry-logrotate
slapmonitor
slapmonitor-xml
# Define exporter strategy
[exporter] [exporter]
recipe = slapos.cookbook:mydumper recipe = slapos.cookbook:mydumper
wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-exporter wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-exporter
...@@ -19,3 +28,7 @@ user = root ...@@ -19,3 +28,7 @@ user = root
mydumper-binary = ${mydumper:location}/bin/mydumper mydumper-binary = ${mydumper:location}/bin/mydumper
database = $${mariadb:database} database = $${mariadb:database}
import = false import = false
# Extends publish section with resilient parameters
[urls]
<= resilient-publish-connection-parameter
\ No newline at end of file
...@@ -2,13 +2,6 @@ ...@@ -2,13 +2,6 @@
extends = ${instance-mariadb:output} extends = ${instance-mariadb:output}
${pbsready-import:output} ${pbsready-import:output}
parts +=
mariadb
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer] [importer]
recipe = slapos.cookbook:mydumper recipe = slapos.cookbook:mydumper
wrapper = $${rootdirectory:bin}/myloader wrapper = $${rootdirectory:bin}/myloader
......
...@@ -14,8 +14,6 @@ parts = ...@@ -14,8 +14,6 @@ parts =
slapmonitor slapmonitor
slapmonitor-xml slapmonitor-xml
gzip-binary = ${gzip:location}/bin/gzip
# Define egg directories to be the one from Software Release # Define egg directories to be the one from Software Release
# (/opt/slapgrid/...) # (/opt/slapgrid/...)
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
...@@ -91,7 +89,7 @@ command = $${logrotate:wrapper} ...@@ -91,7 +89,7 @@ command = $${logrotate:wrapper}
recipe = slapos.cookbook:logrotate recipe = slapos.cookbook:logrotate
# Binaries # Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = $${buildout:gzip-binary} gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip gunzip-binary = ${gzip:location}/bin/gunzip
# Directories # Directories
wrapper = $${rootdirectory:bin}/logrotate wrapper = $${rootdirectory:bin}/logrotate
......
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
extends =
{{templateapache}}
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts +=
{{ parts.replicate("mariadb","3") }}
request-apache-backup-1
request-apache-backup-2
request-pull-backup-server-apache-1
request-pull-backup-server-apache-backup-1
request-pull-backup-server-apache-2
request-pull-backup-server-apache-backup-2
publish-connection-informations
apache-php
stunnel
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
dropbear-server
sshkeys-authority
dropbear-server-pbs-authorized-key
request-pull-backup-server
{{ replicated.replicate("mariadb", "3", "mariadb-export", "mariadb-import") }}
[request-pull-backup-server]
<= request-pbs-common
name = PBS (Pull Backup Server)
return = ssh-key notification-url feeds-url
slave = false
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = ${directory:sshkeys}/requests
keys = ${directory:sshkeys}/keys
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = ${sshkeys-directory:requests}
keys-directory = ${sshkeys-directory:keys}
wrapper = ${basedirectory:services}/sshkeys_authority
keygen-binary = {{dropbear}}/bin/dropbearkey
[sshkeys-dropbear]
<= 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 = ${basedirectory:services}/sshd
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = ${slap-network-information:global-ipv6}
port = 2222
home = ${directory:ssh}
wrapper = ${rootdirectory:bin}/raw_sshd
shell = ${rdiff-backup-server:wrapper}
rsa-keyfile = ${directory:ssh}/server_key.rsa
dropbear-binary = {{dropbear}}/sbin/dropbear
[dropbear-server-pbs-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = ${request-pull-backup-server:connection-ssh-key}
[rdiff-backup-server]
<= apache-php
recipe = slapos.cookbook:pbs
client = false
path = ${apache-php:htdocs}
wrapper = ${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = {{buildout}}/rdiff-backup
[request-apache-backup-1]
<= slap-connection
recipe = slapos.cookbook:request
name = Apache Backup 1
software-url = ${slap-connection:software-release-url}
software-type = apache-backup
return = url ssh-url ssh-public-key
config = authorized-key proxy-url
config-authorized-key = ${request-pull-backup-server:connection-ssh-key}
config-proxy-url = ${publish-connection-informations:url}
[request-apache-backup-2]
<= slap-connection
recipe = slapos.cookbook:request
name = Apache Backup 2
software-url = ${slap-connection:software-release-url}
software-type = apache-backup
return = url ssh-url ssh-public-key
config = authorized-key proxy-url
config-authorized-key = ${request-pull-backup-server:connection-ssh-key}
config-proxy-url = ${publish-connection-informations:url}
[request-pull-backup-server-apache-1]
<= request-pbs-common
name = PBS pulling from Apache 1
config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
config-type = pull
config-server-key = ${sshkeys-dropbear:public-key-value}
config-notify = ${request-pull-backup-server:connection-notification-url}
config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache-pull
config-frequency = 30 * * * *
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[request-pull-backup-server-apache-2]
<= request-pbs-common
name = PBS pulling from Apache 2
config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
config-type = pull
config-server-key = ${sshkeys-dropbear:public-key-value}
config-notify = ${request-pull-backup-server:connection-notification-url}
config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache-pull
config-frequency = 30 * * * *
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[request-pull-backup-server-apache-backup-1]
<= request-pbs-common
name = PBS pushing to ${request-apache-backup-1:name}
config = url name type server-key on-notification
config-url = ${request-apache-backup-1:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-1:config-name}
config-type = push
config-server-key = ${request-apache-backup-1:connection-ssh-public-key}
config-on-notification = ${request-pull-backup-server:connection-feeds-url}${request-pull-backup-server-apache-1:config-notification-id}
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[request-pull-backup-server-apache-backup-2]
<= request-pbs-common
name = PBS pushing to ${request-apache-backup-2:name}
config = url name type server-key on-notification
config-url = ${request-apache-backup-2:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-2:config-name}
config-type = push
config-server-key = ${request-apache-backup-2:connection-ssh-public-key}
config-on-notification = ${request-pull-backup-server:connection-feeds-url}${request-pull-backup-server-apache-2:config-notification-id}
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[directory]
ssh = ${rootdirectory:etc}/ssh
sshkeys = ${rootdirectory:srv}/sshkeys
...@@ -15,8 +15,6 @@ parts = ...@@ -15,8 +15,6 @@ parts =
instance-postgres-import instance-postgres-import
instance-postgres-export instance-postgres-export
instance-default-root
extends = extends =
../resilient/buildout.cfg ../resilient/buildout.cfg
...@@ -50,7 +48,7 @@ strip-top-level-dir = true ...@@ -50,7 +48,7 @@ strip-top-level-dir = true
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = 1aaf3ea7b14e09e66904bdb80e3cfe2f md5sum = a482fa0e72839b4bd75b169ac1460d64
mode = 0644 mode = 0644
[instance-apache-php] [instance-apache-php]
...@@ -67,9 +65,9 @@ output = ${buildout:directory}/instance-apache-backup.cfg ...@@ -67,9 +65,9 @@ output = ${buildout:directory}/instance-apache-backup.cfg
md5sum = db879141c0b6a77ef8b3b7e699f5583a md5sum = db879141c0b6a77ef8b3b7e699f5583a
mode = 0644 mode = 0644
[template-resilient-lapp] [instance-resilient]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/template-resilient.cfg.in template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg rendered = ${buildout:directory}/instance-resilient.cfg
context = key templateapache instance-apache-php:output context = key templateapache instance-apache-php:output
...@@ -79,7 +77,7 @@ context = key templateapache instance-apache-php:output ...@@ -79,7 +77,7 @@ context = key templateapache instance-apache-php:output
import-list = file parts template-parts:destination import-list = file parts template-parts:destination
file replicated template-replicated:destination file replicated template-replicated:destination
md5sum = 525f50e60d0a96557a552de6afa4ab88 md5sum = 46c7d8f691bd37d84e0bd03b83e51d14
mode = 0644 mode = 0644
...@@ -87,7 +85,7 @@ mode = 0644 ...@@ -87,7 +85,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg output = ${buildout:directory}/instance-postgres.cfg
md5sum = 6e9e587ddb52fb9a3817fda7d77e4cab md5sum = a2370d9a23e436166b20203f66412608
mode = 0644 mode = 0644
[instance-postgres-import] [instance-postgres-import]
...@@ -124,12 +122,6 @@ library-dirs = ...@@ -124,12 +122,6 @@ library-dirs =
rpath = rpath =
${postgresql:location}/lib ${postgresql:location}/lib
[instance-default-root]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-default-root.cfg.in
output = ${buildout:directory}/instance-default-root.cfg
md5sum = 53c9020f7a0b5203f976e069e455787b
mode = 0644
#---------------- #----------------
#-- #--
...@@ -164,6 +156,139 @@ eggs = ...@@ -164,6 +156,139 @@ eggs =
slapos.toolbox slapos.toolbox
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate
# List of signatures of uploaders we trust:
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent Signature
# Alain Takoudjou
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV
BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw
DgYDVQQDDAd0c3hkZXYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrPbh+
YGmo6mWmhVb1vTqX0BbeU0jCTB8TK3i6ep3tzSw2rkUGSx3niXn9LNTFNcIn3MZN
XHqbb4AS2Zxyk/2tr3939qqOrS4YRCtXBwTCuFY6r+a7pZsjiTNddPsEhuj4lEnR
L8Ax5mmzoi9nE+hiPSwqjRwWRU1+182rzXmN4QIDAQABo1AwTjAdBgNVHQ4EFgQU
/4XXREzqBbBNJvX5gU8tLWxZaeQwHwYDVR0jBBgwFoAU/4XXREzqBbBNJvX5gU8t
LWxZaeQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQA07q/rKoE7fAda
FED57/SR00OvY9wLlFEF2QJ5OLu+O33YUXDDbGpfUSF9R8l0g9dix1JbWK9nQ6Yd
R/KCo6D0sw0ZgeQv1aUXbl/xJ9k4jlTxmWbPeiiPZEqU1W9wN5lkGuLxV4CEGTKU
hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB7jCCAVegAwIBAgIJAJWA0jQ4o9DGMA0GCSqGSIb3DQEBBQUAMA8xDTALBgNV
BAMMBHg2MXMwIBcNMTExMTI0MTAyNDQzWhgPMjExMTEwMzExMDI0NDNaMA8xDTAL
BgNVBAMMBHg2MXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANdJNiFsRlkH
vq2kHP2zdxEyzPAWZH3CQ3Myb3F8hERXTIFSUqntPXDKXDb7Y/laqjMXdj+vptKk
3Q36J+8VnJbSwjGwmEG6tym9qMSGIPPNw1JXY1R29eF3o4aj21o7DHAkhuNc5Tso
67fUSKgvyVnyH4G6ShQUAtghPaAwS0KvAgMBAAGjUDBOMB0GA1UdDgQWBBSjxFUE
RfnTvABRLAa34Ytkhz5vPzAfBgNVHSMEGDAWgBSjxFUERfnTvABRLAa34Ytkhz5v
PzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAFLDS7zNhlrQYSQO5KIj
z2RJe3fj4rLPklo3TmP5KLvendG+LErE2cbKPqnhQ2oVoj6u9tWVwo/g03PMrrnL
KrDm39slYD/1KoE5kB4l/p6KVOdeJ4I6xcgu9rnkqqHzDwI4v7e8/D3WZbpiFUsY
vaZhjNYKWQf79l6zXfOvphzJ
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAIlBksrZVkK8MA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMzU3MCAXDTEyMDEyNjEwNTUyOFoYDzIxMTIwMTAyMTA1NTI4WjAT
MREwDwYDVQQDDAhDT01QLTM1NzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
ts+iGUwi44vtIfwXR8DCnLtHV4ydl0YTK2joJflj0/Ws7mz5BYkxIU4fea/6+VF3
i11nwBgYgxQyjNztgc9u9O71k1W5tU95yO7U7bFdYd5uxYA9/22fjObaTQoC4Nc9
mTu6r/VHyJ1yRsunBZXvnk/XaKp7gGE9vNEyJvPn2bkCAwEAAaNQME4wHQYDVR0O
BBYEFKuGIYu8+6aEkTVg62BRYaD11PILMB8GA1UdIwQYMBaAFKuGIYu8+6aEkTVg
62BRYaD11PILMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAMoTRpBxK
YLEZJbofF7gSrRIcrlUJYXfTfw1QUBOKkGFFDsiJpEg4y5pUk1s5Jq9K3SDzNq/W
it1oYjOhuGg3al8OOeKFrU6nvNTF1BAvJCl0tr3POai5yXyN5jlK/zPfypmQYxE+
TaqQSGBJPVXYt6lrq/PRD9ciZgKLOwEqK8w=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAPHoWu90gbsgMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
BAMMCXZpZmlibm9kZTAeFw0xMjAzMTkyMzIwNTVaFw0xMzAzMTkyMzIwNTVaMBQx
EjAQBgNVBAMMCXZpZmlibm9kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
ozBijpO8PS5RTeKTzA90vi9ezvv4vVjNaguqT4UwP9+O1+i6yq1Y2W5zZxw/Klbn
oudyNzie3/wqs9VfPmcyU9ajFzBv/Tobm3obmOqBN0GSYs5fyGw+O9G3//6ZEhf0
NinwdKmrRX+d0P5bHewadZWIvlmOupcnVJmkks852BECAwEAAaNQME4wHQYDVR0O
BBYEFF9EtgfZZs8L2ZxBJxSiY6eTsTEwMB8GA1UdIwQYMBaAFF9EtgfZZs8L2ZxB
JxSiY6eTsTEwMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAc43YTfc6
baSemaMAc/jz8LNLhRE5dLfLOcRSoHda8y0lOrfe4lHT6yP5l8uyWAzLW+g6s3DA
Yme/bhX0g51BmI6gjKJo5DoPtiXk/Y9lxwD3p7PWi+RhN+AZQ5rpo8UfwnnN059n
yDuimQfvJjBFMVrdn9iP6SfMjxKaGk6gVmI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAMNZBmoIOXPBMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMTMyMCAXDTEyMDUwMjEyMDQyNloYDzIxMTIwNDA4MTIwNDI2WjAT
MREwDwYDVQQDDAhDT01QLTEzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
6peZQt1sAmMAmSG9BVxxcXm8x15kE9iAplmANYNQ7z2YO57c10jDtlYlwVfi/rct
xNUOKQtc8UQtV/fJWP0QT0GITdRz5X/TkWiojiFgkopza9/b1hXs5rltYByUGLhg
7JZ9dZGBihzPfn6U8ESAKiJzQP8Hyz/o81FPfuHCftsCAwEAAaNQME4wHQYDVR0O
BBYEFNuxsc77Z6/JSKPoyloHNm9zF9yqMB8GA1UdIwQYMBaAFNuxsc77Z6/JSKPo
yloHNm9zF9yqMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAl4hBaJy1
cgiNV2+Z5oNTrHgmzWvSY4duECOTBxeuIOnhql3vLlaQmo0p8Z4c13kTZq2s3nhd
Loe5mIHsjRVKvzB6SvIaFUYq/EzmHnqNdpIGkT/Mj7r/iUs61btTcGUCLsUiUeci
Vd0Ozh79JSRpkrdI8R/NRQ2XPHAo+29TT70=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER
MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR
T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5
psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN
NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW
BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk
C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke
LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss
dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR
-----END CERTIFICATE-----
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
...@@ -180,6 +305,7 @@ psycopg2 = 2.4.6 ...@@ -180,6 +305,7 @@ psycopg2 = 2.4.6
pycrypto = 2.6 pycrypto = 2.6
pytz = 2012h pytz = 2012h
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.cookbook = 0.72.0
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
smmap = 0.8.2 smmap = 0.8.2
...@@ -242,3 +368,24 @@ xml-marshaller = 0.9.7 ...@@ -242,3 +368,24 @@ xml-marshaller = 0.9.7
# slapos.core==0.33.2-dev # slapos.core==0.33.2-dev
zope.interface = 4.0.2 zope.interface = 4.0.2
cp.recipe.cmd = 0.4
plone.recipe.command = 1.1
slapos.recipe.build = 0.11.5
slapos.toolbox = 0.33
# Required by:
# slapos.toolbox==0.33
slapos.core = 0.35
# Required by:
# slapos.core==0.35
unittest2 = 0.5.1
# Required by:
# zope.testing==4.1.1
zope.exceptions = 4.0.5
# Required by:
# cp.recipe.cmd==0.4
zope.testing = 4.1.1
[buildout]
parts = request-apache
[request-apache]
<= slap-connection
recipe = slapos.cookbook:request
software-url = $${slap-connection:software-release-url}
software-type = apache
name = Apache
# vim: set ft=cfg:
{% import 'parts' as parts %} {% import 'parts' as parts %}
{% import 'replicated' as replicated %} {% import 'replicated' as replicated %}
......
...@@ -9,9 +9,8 @@ offline = true ...@@ -9,9 +9,8 @@ offline = true
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${instance-default-root:output} default = ${instance-apache-php:output}
apache = ${instance-apache-php:output} resilient = ${instance-resilient:rendered}
resilient = ${template-resilient-lapp:rendered}
postgres = ${instance-postgres:output} postgres = ${instance-postgres:output}
postgres-import = ${instance-postgres-import:output} postgres-import = ${instance-postgres-import:output}
postgres-export = ${instance-postgres-export:output} postgres-export = ${instance-postgres-export:output}
......
...@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf ...@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid pid-file = $${basedirectory:run}/stunnel.pid
local-host = $${instance-parameters:ipv4_random} local-host = $${instance-parameters:ipv4-random}
local-port = $${postgres-instance:port} local-port = $${postgres-instance:port}
remote-host = $${instance-parameters:ipv6_random} remote-host = $${instance-parameters:ipv6-random}
remote-port = 6446 remote-port = 6446
client = false client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
...@@ -173,9 +173,14 @@ crl = $${directory:ca-dir}/crl/ ...@@ -173,9 +173,14 @@ crl = $${directory:ca-dir}/crl/
[postgres-instance] [postgres-instance]
recipe = slapos.cookbook:postgres recipe = slapos.cookbook:postgres
ipv6 = $${instance-parameters:ipv6} ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6-netmask-bits = 0
ipv4 = $${instance-parameters:ipv4} ipv4 = $${instance-parameters:ipv4}
ipv6_random = $${instance-parameters:ipv6_random} # listen to connections from anywhere
ipv4-netmask-bits = 0
ipv6-random = $${instance-parameters:ipv6-random}
superuser = postgres superuser = postgres
password = $${postgres-passwd:passwd}
port = 5432 port = 5432
dbname = db dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand. # pgdata_directory is created by initdb, and should not exist beforehand.
...@@ -193,6 +198,16 @@ key-file = $${stunnel:key-file} ...@@ -193,6 +198,16 @@ key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file} cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Generates a random password and stores it in the filesystem
[postgres-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:srv}/postgres_passwd
bytes = 16
#---------------- #----------------
#-- #--
#-- Deploy slapmonitor. #-- Deploy slapmonitor.
...@@ -218,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml ...@@ -218,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml
[postgres-promise] [postgres-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/postgres path = $${basedirectory:promises}/postgres
hostname = $${instance-parameters:ipv6_random} hostname = $${instance-parameters:ipv6-random}
port = $${postgres-instance:port} port = $${postgres-instance:port}
...@@ -229,7 +244,7 @@ port = $${postgres-instance:port} ...@@ -229,7 +244,7 @@ port = $${postgres-instance:port}
[urls] [urls]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
url = $${postgres-instance:url} url = $${postgres-instance:url}
ip = $${instance-parameters:ipv6_random} ip = $${instance-parameters:ipv6-random}
#---------------- #----------------
......
...@@ -22,7 +22,7 @@ parts = ...@@ -22,7 +22,7 @@ parts =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg output = ${buildout:directory}/pbsready.cfg
md5sum = e602f6746cbe5a1da82b90097719c4a1 md5sum = 9f4212a79f10bee8f6d75061943110e2
mode = 0644 mode = 0644
[pbsready-import] [pbsready-import]
...@@ -31,7 +31,7 @@ mode = 0644 ...@@ -31,7 +31,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg output = ${buildout:directory}/pbsready-import.cfg
md5sum = eda0c1574d8991f4f9e08e3707c2b04b md5sum = 1b1308fd39476d48b5ca13db48ea6dc9
mode = 0644 mode = 0644
[pbsready-export] [pbsready-export]
...@@ -40,7 +40,7 @@ mode = 0644 ...@@ -40,7 +40,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg output = ${buildout:directory}/pbsready-export.cfg
md5sum = dd56f9c74e580475a17a9afb1d220390 md5sum = 5d9e20c436fd307e8e4ab224a9a65792
mode = 0644 mode = 0644
[template-pull-backup] [template-pull-backup]
...@@ -53,7 +53,7 @@ mode = 0644 ...@@ -53,7 +53,7 @@ mode = 0644
[template-replicated] [template-replicated]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum = 63b5649f3cf1c9a77315382793d9593f md5sum = 9e20f283bf709c63c9c6692d5e1f8972
mode = 0644 mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in destination = ${buildout:directory}/template-replicated.cfg.in
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
extends = ${pbsready:output} extends = ${pbsready:output}
parts += cron-entry-backup parts +=
cron-entry-backup
[urls] [resilient-publish-connection-parameter]
notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-exporter:name} notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-exporter:name}
[notifier-exporter] [notifier-exporter]
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
extends = ${pbsready:output} extends = ${pbsready:output}
parts += import-on-notification parts +=
import-on-notification
resilient-publish-connection-parameter
[urls] [resilient-publish-connection-parameter]
notification-url = http://[$${notifier:host}]:$${notifier:port}/notify notification-url = http://[$${notifier:host}]:$${notifier:port}/notify
[import-on-notification] [import-on-notification]
......
[buildout] [buildout]
parts += parts =
resiliency resiliency
urls
stunnel
certificate-authority
ca-stunnel
logrotate logrotate
logrotate-entry-stunnel
logrotate-entry-cron logrotate-entry-cron
logrotate-entry-equeue logrotate-entry-equeue
cron cron
...@@ -23,17 +18,110 @@ parts += ...@@ -23,17 +18,110 @@ parts +=
#-- #--
#-- Creation of all needed directories. #-- 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
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run
script = $${rootdirectory:etc}/script
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise
services = $${rootdirectory:etc}/service services = $${rootdirectory:etc}/service
cache = $${rootdirectory:var}/cache cache = $${rootdirectory:var}/cache
notifier = $${rootdirectory:etc}/notifier notifier = $${rootdirectory:etc}/notifier
[directory] [directory]
recipe = slapos.cookbook:mkdirectory
backup = $${basedirectory:backup}/$${slap-parameter:namebase} backup = $${basedirectory:backup}/$${slap-parameter:namebase}
ssh = $${rootdirectory:etc}/ssh/ ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys sshkeys = $${rootdirectory:srv}/sshkeys
notifier-feeds = $${basedirectory:notifier}/feeds notifier-feeds = $${basedirectory:notifier}/feeds
notifier-callbacks = $${basedirectory:notifier}/callbacks notifier-callbacks = $${basedirectory:notifier}/callbacks
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
#----------------
#--
#-- 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
[logrotate-entry-mariadb]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = mariadb
log = $${mariadb:error-log}
frequency = daily
rotate-num = 30
post = $${mariadb:logrotate-post}
sharedscripts = true
notifempty = true
create = true
[logrotate-entry-cron]
<= logrotate
recipe =slapos.cookbook:logrotate.d
name = crond
log = $${cron-simplelogger:log}
frequency = daily
rotate-num = 30
notifempty = true
create = true
[logrotate-entry-equeue]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30
#---------------- #----------------
...@@ -56,10 +144,6 @@ etc = $${rootdirectory:etc} ...@@ -56,10 +144,6 @@ etc = $${rootdirectory:etc}
#-- #--
#-- Sets up an rdiff-backup server (with a dropbear server for ssh) #-- Sets up an rdiff-backup server (with a dropbear server for ssh)
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
[rdiff-backup-server] [rdiff-backup-server]
recipe = slapos.cookbook:pbs recipe = slapos.cookbook:pbs
client = false client = false
...@@ -89,19 +173,11 @@ callbacks = $${directory:notifier-callbacks} ...@@ -89,19 +173,11 @@ callbacks = $${directory:notifier-callbacks}
id-file = $${rootdirectory:etc}/notifier.id id-file = $${rootdirectory:etc}/notifier.id
equeue-socket = $${equeue:socket} equeue-socket = $${equeue:socket}
host = $${slap-network-information:global-ipv6} host = $${slap-network-information:global-ipv6}
port = 8080 port = 65534
wrapper = $${basedirectory:services}/notifier wrapper = $${basedirectory:services}/notifier
server-binary = ${buildout:bin-directory}/pubsubserver server-binary = ${buildout:bin-directory}/pubsubserver
notifier-binary = ${buildout:bin-directory}/pubsubnotifier notifier-binary = ${buildout:bin-directory}/pubsubnotifier
[logrotate-entry-equeue]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30
#---------------- #----------------
#-- #--
...@@ -150,4 +226,12 @@ recipe = slapos.cookbook:dropbear.add_authorized_key ...@@ -150,4 +226,12 @@ recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key} key = $${slap-parameter:authorized-key}
#----------------
#--
#-- Conncetion informations to re-use.
# XXX-Cedric: when "aggregation" system is done in libslap, directly publish.
[resilient-publish-connection-parameter]
recipe = slapos.cookbook:publish
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
ip = $${slap-network-information:global-ipv6}
This diff is collapsed.
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