Commit 970aedc0 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'master' into slaprunner

parents 4938f31c 029c69e9
Changes Changes
======= =======
0.71.1 (2013-01-04)
-------------------
* Frontend: Sort instances by reference to avoid attacks. [Cedric de Saint
Martin]
* Frontend: Add public_ipv4 parameter support to ease deployment of slave
frontend. [Cedric de Saint Martin]
* Frontend: Move apache_frontend wrappers to watched directory (etc/service).
[Cedric de Saint Martin]
* Frontend: Add native path to varnish environment. [Cedric de Saint Martin]
0.71 (2012-12-20)
-----------------
* frontend: Add "path" parameter for Zope instances. [Cedric de Saint Martin]
0.70 (2012-11-05) 0.70 (2012-11-05)
----------------- -----------------
......
...@@ -87,7 +87,7 @@ configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_na ...@@ -87,7 +87,7 @@ configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_na
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS =-I${libuuid:location}/include CPPFLAGS =-I${libuuid:location}/include -I${openssl:location}/include
LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib
[mod_antiloris-apache-2.4.patch] [mod_antiloris-apache-2.4.patch]
......
...@@ -5,7 +5,7 @@ parts = busybox ...@@ -5,7 +5,7 @@ parts = busybox
[busybox] [busybox]
recipe = slapos.recipe.build recipe = slapos.recipe.build
url = http://git.busybox.net/busybox/snapshot/busybox-1_20_1.tar.gz url = http://git.busybox.net/busybox/snapshot/busybox-1_20_1.tar.gz
md5sum = 15758fc37ae8051d6def1b8afb691821 md5sum = 2dcfee8add6b9c52d6a91e97ba705b66
script = script =
extract_dir = self.extract(self.download(%(url)r, %(md5sum)r)) extract_dir = self.extract(self.download(%(url)r, %(md5sum)r))
workdir = guessworkdir(extract_dir) workdir = guessworkdir(extract_dir)
......
...@@ -10,10 +10,10 @@ parts = ...@@ -10,10 +10,10 @@ parts =
cclient cclient
[cclient-patch] [cclient-patch]
recipe = slapos.recipe.download recipe = hexagonit.recipe.download
download-only = true
url = ${:_profile_base_location_}/imap-2007f.patch url = ${:_profile_base_location_}/imap-2007f.patch
md5sum = 42c77fdd5d7a976fc302b93aadb3da98 md5sum = 42c77fdd5d7a976fc302b93aadb3da98
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = imap-2007f.patch filename = imap-2007f.patch
[cclient] [cclient]
......
...@@ -3,6 +3,7 @@ parts = ...@@ -3,6 +3,7 @@ parts =
liberation-fonts liberation-fonts
ipaex-fonts ipaex-fonts
ipa-fonts ipa-fonts
ocrb-fonts
[fonts] [fonts]
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
...@@ -32,3 +33,10 @@ strip-top-level-dir = true ...@@ -32,3 +33,10 @@ strip-top-level-dir = true
url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip
md5sum = 39a828acf27790adbe4944dfb4d94bb1 md5sum = 39a828acf27790adbe4944dfb4d94bb1
destination = ${fonts:location}/${:_buildout_section_name_} destination = ${fonts:location}/${:_buildout_section_name_}
[ocrb-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Ftsukurimashou%2F56948%2Focr-0.2.zip
md5sum = 9f2acd83291a31dbe053912f4115db75
destination = ${fonts:location}/${:_buildout_section_name_}
...@@ -28,9 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch ...@@ -28,9 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch
[imagemagick] [imagemagick]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
#url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.8-8.tar.bz2 url = http://ftp.vim.org/ImageMagick/ImageMagick-6.8.1-9.tar.bz2
url = http://ftp.vim.org/ImageMagick/ImageMagick-6.7.8-8.tar.bz2 md5sum = cde56988f9d2208d9d61815cc23665b4
md5sum = 4e5c8f102f3e7401587c924f5b4bca15
depends = depends =
${libtiff:version} ${libtiff:version}
${librsvg:version} ${librsvg:version}
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
[buildout] [buildout]
extends = extends =
../bzip2/buildout.cfg
../imagemagick/buildout.cfg ../imagemagick/buildout.cfg
../jbigkit/buildout.cfg ../jbigkit/buildout.cfg
../zlib/buildout.cfg
parts = parts =
libdmtx libdmtx
dmtx-utils dmtx-utils
...@@ -26,4 +28,4 @@ environment = ...@@ -26,4 +28,4 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${imagemagick:location}/lib/pkgconfig:${libdmtx:location}/lib/pkgconfig PKG_CONFIG_PATH=${imagemagick:location}/lib/pkgconfig:${libdmtx:location}/lib/pkgconfig
CPPFLAGS=-I${libdmtx:location}/include CPPFLAGS=-I${libdmtx:location}/include
LDFLAGS=-Wl,-rpath=${jbigkit:location}/lib LDFLAGS=-Wl,-rpath=${jbigkit:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -46,4 +46,4 @@ script = ...@@ -46,4 +46,4 @@ script =
# helper binaries # helper binaries
cpio = ${cpio:location}/bin/cpio cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target} rpm2cpio = ${rpm2cpio:destination}
...@@ -14,7 +14,8 @@ url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.3.tar.bz2 ...@@ -14,7 +14,8 @@ url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.3.tar.bz2
md5sum = e1e93eeff4367c896f3959af34ba20eb md5sum = e1e93eeff4367c896f3959af34ba20eb
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
LDFLAGS=-Wl,-rpath=${zlib:location}/lib
[librsvg] [librsvg]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
...@@ -36,4 +37,4 @@ configure-options = ...@@ -36,4 +37,4 @@ configure-options =
environment = environment =
PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:%(PATH)s PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${cairo:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig PKG_CONFIG_PATH=${cairo:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -9,11 +9,9 @@ parts = ...@@ -9,11 +9,9 @@ parts =
[libtiff] [libtiff]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 4.0.2 version = 4.0.3
url = http://download.osgeo.org/libtiff/tiff-${:version}.tar.gz url = http://download.osgeo.org/libtiff/tiff-${:version}.tar.gz
# server is down - circumvent md5sum = 051c1068e6a0627f461948c365290410
#url = http://www.imagemagick.org/download/delegates/tiff-${:version}.tar.gz
md5sum = 04a08fa1e07e696e820a0c3f32465a13
configure-options = configure-options =
--disable-static --disable-static
--without-x --without-x
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
extends = extends =
../cmake/buildout.cfg ../cmake/buildout.cfg
../glib/buildout.cfg ../glib/buildout.cfg
../pkgconfig/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../pcre/buildout.cfg ../pcre/buildout.cfg
../mariadb/buildout.cfg ../mariadb/buildout.cfg
...@@ -22,6 +23,7 @@ buildout-bin-dir = ${buildout:bin-directory} ...@@ -22,6 +23,7 @@ buildout-bin-dir = ${buildout:bin-directory}
cmake-command = ${cmake:location}/bin/cmake cmake-command = ${cmake:location}/bin/cmake
mysql-config = ${mariadb:location}/bin/mysql_config mysql-config = ${mariadb:location}/bin/mysql_config
mysqllib = ${mariadb:location}/lib mysqllib = ${mariadb:location}/lib
path = ${pkgconfig:location}/bin
pkg-config-path = ${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/:${openssl:location}/lib/pkgconfig/ pkg-config-path = ${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/:${openssl:location}/lib/pkgconfig/
libraries = ${zlib:location}/lib/:${glib:location}/lib/:${pcre:location}/lib/:${mariadb:location}/lib/:${openssl:location}/lib/ libraries = ${zlib:location}/lib/:${glib:location}/lib/:${pcre:location}/lib/:${mariadb:location}/lib/:${openssl:location}/lib/
includes = ${zlib:location}/include/:${glib:location}/include/:${pcre:location}/include/:${mariadb:location}/include:${openssl:location}/include/ includes = ${zlib:location}/include/:${glib:location}/include/:${pcre:location}/include/:${mariadb:location}/include:${openssl:location}/include/
...@@ -39,7 +41,7 @@ script = ...@@ -39,7 +41,7 @@ script =
extract_dir = self.extract(url) extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir) workdir = guessworkdir(extract_dir)
self.applyPatchList(self.options['mydumper-patches'], cwd=workdir) self.applyPatchList(self.options['mydumper-patches'], cwd=workdir)
env['PATH'] = self.options['buildout-bin-dir'] + ':' + env.get('PATH', '') env['PATH'] = self.options['path'] + ':' + self.options['buildout-bin-dir'] + ':' + env.get('PATH', '')
env['PKG_CONFIG_PATH'] = self.options['pkg-config-path'] + ':' + \ env['PKG_CONFIG_PATH'] = self.options['pkg-config-path'] + ':' + \
env.get('PKG_CONFIG_PATH', '') env.get('PKG_CONFIG_PATH', '')
env['CMAKE_INCLUDE_PATH'] = self.options['includes'] env['CMAKE_INCLUDE_PATH'] = self.options['includes']
......
...@@ -3,7 +3,7 @@ parts = ...@@ -3,7 +3,7 @@ parts =
noVNC noVNC
[noVNC] [noVNC]
recipe = slapos.recipe.build:download-unpacked recipe = hexagonit.recipe.download
url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.4.tar.gz url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.4.tar.gz
md5sum = 5703d5d46022d8723796dcbbf821ee7f md5sum = 5703d5d46022d8723796dcbbf821ee7f
strip-top-level-dir = true strip-top-level-dir = true
...@@ -9,6 +9,9 @@ extends = ...@@ -9,6 +9,9 @@ extends =
../glib/buildout.cfg ../glib/buildout.cfg
../popt/buildout.cfg ../popt/buildout.cfg
[pkg-config]
<= pkgconfig
[pkgconfig] [pkgconfig]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz
......
...@@ -6,11 +6,27 @@ extends = ...@@ -6,11 +6,27 @@ extends =
../ncurses/buildout.cfg ../ncurses/buildout.cfg
parts = postgresql parts = postgresql
[postgresql] [postgresql]
<= postgresql92
[postgresql91]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.1.6/postgresql-9.1.6.tar.bz2 url = http://ftp.postgresql.org/pub/source/v9.1.7/postgresql-9.1.7.tar.bz2
md5sum = 000755f66c0de58bbd4cd2b89b45b8e2 md5sum = eaf7b67493d59d1a60767ffdfbd65ce9
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
[postgresql92]
recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.bz2
md5sum = 1cc388988e69bf75c6b55d59070100f6
configure-options = --with-openssl
environment =
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
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
parts = python-setuptools parts = python-setuptools
[setuptools-download] [setuptools-download]
recipe = slapos.recipe.build:download recipe = hexagonit.recipe.download
download-only = true
filename = setuptools-0.6c11-py2.7.egg filename = setuptools-0.6c11-py2.7.egg
url = http://pypi.python.org/packages/2.7/s/setuptools/${:filename} url = http://pypi.python.org/packages/2.7/s/setuptools/${:filename}
md5sum = fe1f997bc722265116870bc7919059ea md5sum = fe1f997bc722265116870bc7919059ea
......
...@@ -3,6 +3,7 @@ parts = ...@@ -3,6 +3,7 @@ parts =
rpm2cpio rpm2cpio
[rpm2cpio] [rpm2cpio]
recipe = slapos.recipe.build:download recipe = hexagonit.recipe.download
download-only = true
url = https://raw.github.com/ruda/rpm2cpio/e196173f1f6b746463b7398e381b94a42edfa345/rpm2cpio.py url = https://raw.github.com/ruda/rpm2cpio/e196173f1f6b746463b7398e381b94a42edfa345/rpm2cpio.py
md5sum = c5bb6227d99e1ff5df880f997cbed2e3 md5sum = c5bb6227d99e1ff5df880f997cbed2e3
##############################################################################
#
# Copyright (c) 2010-2013 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from setuptools import setup, find_packages from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.70.1-dev' version = '0.71.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"
...@@ -111,8 +137,8 @@ setup(name=name, ...@@ -111,8 +137,8 @@ setup(name=name,
'onetimeupload = slapos.recipe.onetimeupload:Recipe', 'onetimeupload = slapos.recipe.onetimeupload:Recipe',
'pbs = slapos.recipe.pbs:Recipe', 'pbs = slapos.recipe.pbs:Recipe',
'postgres = slapos.recipe.postgres:Recipe', 'postgres = slapos.recipe.postgres:Recipe',
'postgres.export = slapos.recipe.postgres:ExportRecipe', 'postgres.export = slapos.recipe.postgres.backup:ExportRecipe',
'postgres.import = slapos.recipe.postgres:ImportRecipe', 'postgres.import = slapos.recipe.postgres.backup:ImportRecipe',
'proactive = slapos.recipe.proactive:Recipe', 'proactive = slapos.recipe.proactive:Recipe',
'publish = slapos.recipe.publish:Recipe', 'publish = slapos.recipe.publish:Recipe',
'publishurl = slapos.recipe.publishurl:Recipe', 'publishurl = slapos.recipe.publishurl:Recipe',
......
...@@ -25,65 +25,42 @@ ...@@ -25,65 +25,42 @@
# #
############################################################################# #############################################################################
import os
import sys
import zc.buildout import zc.buildout
import slapos.slap from slapos.recipe.librecipe import GenericBaseRecipe
from slapos.recipe.librecipe import BaseSlapRecipe import sys
from slapos.recipe.librecipe import GenericSlapRecipe
import json
import ConfigParser
# XXX: BaseSlapRecipe and GenericSlapRecipe are deprecated, use class Recipe(GenericBaseRecipe):
# GenericBaseRecipe and move partition parameter fetching to software release.
class Recipe(BaseSlapRecipe, GenericSlapRecipe):
def install(self): def install(self):
self.path_list = [] path_list = []
crond = self.installCrond()
configuration_path = self.options["config"]
header = """[DEFAULT]
master_url = %s
key = %s
slap = slapos.slap.slap() cert = %s
slap.initializeConnection(self.server_url, self.key_file, self.cert_file)
parameter_dict = slap.registerComputerPartition( max_install_duration = %s
self.computer_id, max_uninstall_duration = %s
self.computer_partition_id, max_request_duration = %s
).getInstanceParameterDict() max_destroy_duration = %s
""" % (self.options["master-url"],
"\n ".join(self.options["key"].split("\n")),
"\n ".join(self.options["cert"].split("\n")),
self.options["default_max_install_duration"],
self.options["default_max_uninstall_duration"],
self.options["default_max_request_duration"],
self.options["default_max_destroy_duration"])
# XXX: should probably expect one more (SR-originating) parameter instead
# of using self.work_directory .
configuration_path = os.path.join(self.work_directory, "agent.cfg")
with open(configuration_path, "w") as configuration: with open(configuration_path, "w") as configuration:
configuration.write(parameter_dict["configuration"]) configuration.write(header + self.options["configuration"])
agent_crond_path = os.path.join(crond, "agent")
with open(agent_crond_path, "w") as agent_crond: path_list.append(self.createPythonScript(
agent_crond.write("*/5 * * * * %s -S %s --pidfile=%s --log=%s " self.options['wrapper'],
"%s 2>&1 > /dev/null\n" % ( 'slapos.recipe.librecipe.execute.execute',
self.options["python_binary"], [self.options["agent_binary"], '--pidfile=%s' % self.options["pidfile"],
self.options["agent_binary"], "--log=%s" % self.options["log"], configuration_path]))
self.options["pidfile"],
self.options["log"],
configuration_path,
))
return self.path_list + [configuration_path, agent_crond_path] path_list.append(configuration_path)
def installCrond(self): return path_list
_, ws = self.egg.working_set()
timestamps = self.createDataDirectory('cronstamps')
cron_output = os.path.join(self.log_directory, 'cron-output')
self._createDirectory(cron_output)
catcher = zc.buildout.easy_install.scripts([('catchcron',
__name__ + '.catdatefile', 'catdatefile')], ws, sys.executable,
self.bin_directory, arguments=[cron_output])[0]
self.path_list.append(catcher)
cron_d = os.path.join(self.etc_directory, 'cron.d')
crontabs = os.path.join(self.etc_directory, 'crontabs')
self._createDirectory(cron_d)
self._createDirectory(crontabs)
wrapper = zc.buildout.easy_install.scripts([('crond',
'slapos.recipe.librecipe.execute', 'execute')], ws, sys.executable,
self.wrapper_directory, arguments=[
self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs,
'-t', timestamps, '-f', '-l', '5', '-M', catcher]
)[0]
self.path_list.append(wrapper)
return cron_d
...@@ -28,6 +28,7 @@ from slapos.recipe.librecipe import BaseSlapRecipe ...@@ -28,6 +28,7 @@ from slapos.recipe.librecipe import BaseSlapRecipe
import os import os
import pkg_resources import pkg_resources
import hashlib import hashlib
import operator
import sys import sys
import zc.buildout import zc.buildout
import zc.recipe.egg import zc.recipe.egg
...@@ -43,6 +44,9 @@ class Recipe(BaseSlapRecipe): ...@@ -43,6 +44,9 @@ class Recipe(BaseSlapRecipe):
'template/%s' % template_name) 'template/%s' % template_name)
def _install(self): def _install(self):
# Define directory not defined in deprecated lib
self.service_directory = os.path.join(self.etc_directory, 'service')
# Check for mandatory arguments # Check for mandatory arguments
frontend_domain_name = self.parameter_dict.get("domain") frontend_domain_name = self.parameter_dict.get("domain")
if frontend_domain_name is None: if frontend_domain_name is None:
...@@ -69,9 +73,17 @@ class Recipe(BaseSlapRecipe): ...@@ -69,9 +73,17 @@ class Recipe(BaseSlapRecipe):
rewrite_rule_list = [] rewrite_rule_list = []
rewrite_rule_zope_list = [] rewrite_rule_zope_list = []
rewrite_rule_zope_path_list = []
slave_dict = {} slave_dict = {}
service_dict = {} service_dict = {}
# Sort slave instance by reference to avoid most security issues
slave_instance_list = sorted(slave_instance_list,
key=operator.itemgetter('slave_reference'))
# dict of used domains, only used to track duplicates
domain_dict = {}
for slave_instance in slave_instance_list: for slave_instance in slave_instance_list:
backend_url = slave_instance.get("url", None) backend_url = slave_instance.get("url", None)
reference = slave_instance.get("slave_reference") reference = slave_instance.get("slave_reference")
...@@ -97,6 +109,12 @@ class Recipe(BaseSlapRecipe): ...@@ -97,6 +109,12 @@ class Recipe(BaseSlapRecipe):
domain = "%s.%s" % (reference.replace("-", "").lower(), domain = "%s.%s" % (reference.replace("-", "").lower(),
frontend_domain_name) frontend_domain_name)
if domain_dict.get(domain):
# This domain already has been processed, skip this new one
continue
else:
domain_dict[domain] = True
# Define the URL where the instance will be available # Define the URL where the instance will be available
# WARNING: we use default ports (443, 80) here. # WARNING: we use default ports (443, 80) here.
slave_dict[reference] = "%s%s/" % (scheme, domain) slave_dict[reference] = "%s%s/" % (scheme, domain)
...@@ -118,6 +136,9 @@ class Recipe(BaseSlapRecipe): ...@@ -118,6 +136,9 @@ class Recipe(BaseSlapRecipe):
# RewriteMap for Zope Virtual Host Monster websites. # RewriteMap for Zope Virtual Host Monster websites.
if slave_instance.get("type", "").lower() in ['zope']: if slave_instance.get("type", "").lower() in ['zope']:
rewrite_rule_zope_list.append(rewrite_rule) rewrite_rule_zope_list.append(rewrite_rule)
# For Zope, we have another dict containing the path e.g '/erp5/...
rewrite_rule_path = "%s %s" % (domain, slave_instance.get('path', ''))
rewrite_rule_zope_path_list.append(rewrite_rule_path)
else: else:
rewrite_rule_list.append(rewrite_rule) rewrite_rule_list.append(rewrite_rule)
...@@ -152,6 +173,7 @@ class Recipe(BaseSlapRecipe): ...@@ -152,6 +173,7 @@ class Recipe(BaseSlapRecipe):
name=frontend_domain_name, name=frontend_domain_name,
rewrite_rule_list=rewrite_rule_list, rewrite_rule_list=rewrite_rule_list,
rewrite_rule_zope_list=rewrite_rule_zope_list, rewrite_rule_zope_list=rewrite_rule_zope_list,
rewrite_rule_zope_path_list=rewrite_rule_zope_path_list,
key=key, certificate=certificate) key=key, certificate=certificate)
# Send connection informations about each slave # Send connection informations about each slave
...@@ -160,9 +182,12 @@ class Recipe(BaseSlapRecipe): ...@@ -160,9 +182,12 @@ class Recipe(BaseSlapRecipe):
"instance: %s" % reference) "instance: %s" % reference)
try: try:
connection_dict = { connection_dict = {
# Send the public IPs (if possible) so that user knows what IP
# to bind to its domain name
'frontend_ipv6_address': self.getGlobalIPv6Address(), 'frontend_ipv6_address': self.getGlobalIPv6Address(),
'frontend_ipv4_address': self.getLocalIPv4Address(), 'frontend_ipv4_address': self.parameter_dict.get("public-ipv4",
'site_url': url self.getLocalIPv4Address()),
'site_url': url,
} }
self.setConnectionDict(connection_dict, reference) self.setConnectionDict(connection_dict, reference)
except: except:
...@@ -289,7 +314,7 @@ class Recipe(BaseSlapRecipe): ...@@ -289,7 +314,7 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(crontabs) self._createDirectory(crontabs)
wrapper = zc.buildout.easy_install.scripts([('crond', wrapper = zc.buildout.easy_install.scripts([('crond',
'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.service_directory, arguments=[
self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs,
'-t', timestamps, '-f', '-l', '5', '-M', catcher] '-t', timestamps, '-f', '-l', '5', '-M', catcher]
)[0] )[0]
...@@ -346,10 +371,13 @@ class Recipe(BaseSlapRecipe): ...@@ -346,10 +371,13 @@ class Recipe(BaseSlapRecipe):
) )
self._writeFile(openssl_configuration, pkg_resources.resource_string( self._writeFile(openssl_configuration, pkg_resources.resource_string(
__name__, 'template/openssl.cnf.ca.in') % config) __name__, 'template/openssl.cnf.ca.in') % config)
# XXX-Cedric: Don't use this, but use slapos.recipe.certificate_authority
# from the instance profile.
self.path_list.extend(zc.buildout.easy_install.scripts([ self.path_list.extend(zc.buildout.easy_install.scripts([
('certificate_authority', __name__ + '.certificate_authority', ('certificate_authority', __name__ + '.certificate_authority',
'runCertificateAuthority')], 'runCertificateAuthority')],
self.ws, sys.executable, self.wrapper_directory, arguments=[dict( self.ws, sys.executable, self.service_directory, arguments=[dict(
openssl_configuration=openssl_configuration, openssl_configuration=openssl_configuration,
openssl_binary=self.options['openssl_binary'], openssl_binary=self.options['openssl_binary'],
certificate=os.path.join(self.ca_dir, 'cacert.pem'), certificate=os.path.join(self.ca_dir, 'cacert.pem'),
...@@ -382,6 +410,8 @@ class Recipe(BaseSlapRecipe): ...@@ -382,6 +410,8 @@ class Recipe(BaseSlapRecipe):
name + '.lock') name + '.lock')
apache_conf['document_root'] = os.path.join(self.data_root_directory, apache_conf['document_root'] = os.path.join(self.data_root_directory,
'htdocs') 'htdocs')
apache_conf['instance_home'] = os.path.join(self.work_directory)
apache_conf['httpd_home'] = self.options['httpd_home']
apache_conf['ip_list'] = ip_list apache_conf['ip_list'] = ip_list
apache_conf['port'] = port apache_conf['port'] = port
apache_conf['server_admin'] = 'admin@' apache_conf['server_admin'] = 'admin@'
...@@ -419,10 +449,11 @@ class Recipe(BaseSlapRecipe): ...@@ -419,10 +449,11 @@ class Recipe(BaseSlapRecipe):
"-f", config_file, "-f", config_file,
"-a", varnish_config["port"], "-T", varnish_config["control_port"], "-a", varnish_config["port"], "-T", varnish_config["control_port"],
"-s", varnish_config["storage"]] "-s", varnish_config["storage"]]
environment = dict(PATH=self.options["binutils_directory"]) environment = dict(PATH="%s:%s" % (self.options["binutils_directory"],
os.environ.get('PATH')))
wrapper = zc.buildout.easy_install.scripts([(name, wrapper = zc.buildout.easy_install.scripts([(name,
'slapos.recipe.librecipe.execute', 'executee')], self.ws, 'slapos.recipe.librecipe.execute', 'executee')], self.ws,
sys.executable, self.wrapper_directory, arguments=[varnish_argument_list, sys.executable, self.service_directory, arguments=[varnish_argument_list,
environment])[0] environment])[0]
self.path_list.append(wrapper) self.path_list.append(wrapper)
...@@ -461,7 +492,7 @@ class Recipe(BaseSlapRecipe): ...@@ -461,7 +492,7 @@ class Recipe(BaseSlapRecipe):
stunnel_conf)) stunnel_conf))
wrapper = zc.buildout.easy_install.scripts([('stunnel', wrapper = zc.buildout.easy_install.scripts([('stunnel',
'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws, 'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws,
sys.executable, self.wrapper_directory, arguments=[ sys.executable, self.service_directory, arguments=[
[self.options['stunnel_binary'].strip(), stunnel_conf_path], [self.options['stunnel_binary'].strip(), stunnel_conf_path],
[certificate, key]] [certificate, key]]
)[0] )[0]
...@@ -470,8 +501,17 @@ class Recipe(BaseSlapRecipe): ...@@ -470,8 +501,17 @@ class Recipe(BaseSlapRecipe):
def installFrontendApache(self, ip_list, key, certificate, name, def installFrontendApache(self, ip_list, key, certificate, name,
port=4443, plain_http_port=8080, port=4443, plain_http_port=8080,
rewrite_rule_list=[], rewrite_rule_zope_list=[], rewrite_rule_list=None,
rewrite_rule_zope_list=None,
rewrite_rule_zope_path_list=None,
access_control_string=None): access_control_string=None):
if rewrite_rule_list is None:
rewrite_rule_list = []
if rewrite_rule_zope_list is None:
rewrite_rule_zope_list = []
if rewrite_rule_zope_path_list is None:
rewrite_rule_zope_path_list = []
# Create htdocs, populate it with default 404 document # Create htdocs, populate it with default 404 document
htdocs_location = os.path.join(self.data_root_directory, 'htdocs') htdocs_location = os.path.join(self.data_root_directory, 'htdocs')
self._createDirectory(htdocs_location) self._createDirectory(htdocs_location)
...@@ -488,16 +528,21 @@ class Recipe(BaseSlapRecipe): ...@@ -488,16 +528,21 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(cache_directory_location) self._createDirectory(cache_directory_location)
self._createDirectory(mod_ssl_cache_location) self._createDirectory(mod_ssl_cache_location)
# Create "custom" apache configuration file if it does not exist. # Create "custom" apache configuration files if it does not exist.
# Note : This file won't be erased or changed when slapgrid is ran. # Note : Those files won't be erased or changed when slapgrid is ran.
# It can be freely customized by node admin. # It can be freely customized by node admin.
custom_apache_configuration_directory = os.path.join( custom_apache_configuration_directory = os.path.join(
self.data_root_directory, 'apache-conf.d') self.data_root_directory, 'apache-conf.d')
self._createDirectory(custom_apache_configuration_directory) self._createDirectory(custom_apache_configuration_directory)
# First one is included in the end of the apache configuration file
custom_apache_configuration_file_location = os.path.join( custom_apache_configuration_file_location = os.path.join(
custom_apache_configuration_directory, 'apache_frontend.custom.conf') custom_apache_configuration_directory, 'apache_frontend.custom.conf')
f = open(custom_apache_configuration_file_location, 'a') open(custom_apache_configuration_file_location, 'a')
f.close() # Second one is included in the virtualhost of apache configuration file
custom_apache_virtual_configuration_file_location = os.path.join(
custom_apache_configuration_directory,
'apache_frontend.virtualhost.custom.conf')
open(custom_apache_virtual_configuration_file_location, 'a')
# Create backup of custom apache configuration # Create backup of custom apache configuration
backup_path = self.createBackupDirectory('custom_apache_conf_backup') backup_path = self.createBackupDirectory('custom_apache_conf_backup')
...@@ -512,9 +557,14 @@ class Recipe(BaseSlapRecipe): ...@@ -512,9 +557,14 @@ class Recipe(BaseSlapRecipe):
# Create configuration file and rewritemaps # Create configuration file and rewritemaps
apachemap_name = "apachemap.txt" apachemap_name = "apachemap.txt"
apachemapzope_name = "apachemapzope.txt" apachemapzope_name = "apachemapzope.txt"
apachemapzopepath_name = "apachemapzopepath.txt"
self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list)) self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list))
self.createConfigurationFile(apachemapzope_name, self.createConfigurationFile(apachemapzope_name,
"\n".join(rewrite_rule_zope_list)) "\n".join(rewrite_rule_zope_list))
self.createConfigurationFile(apachemapzopepath_name,
"\n".join(rewrite_rule_zope_path_list))
apache_conf = self._getApacheConfigurationDict(name, ip_list, port) apache_conf = self._getApacheConfigurationDict(name, ip_list, port)
apache_conf['ssl_snippet'] = self.substituteTemplate( apache_conf['ssl_snippet'] = self.substituteTemplate(
self.getTemplateFilename('apache.ssl-snippet.conf.in'), self.getTemplateFilename('apache.ssl-snippet.conf.in'),
...@@ -532,16 +582,22 @@ class Recipe(BaseSlapRecipe): ...@@ -532,16 +582,22 @@ class Recipe(BaseSlapRecipe):
path = self.substituteTemplate( path = self.substituteTemplate(
self.getTemplateFilename('apache.conf.path-protected.in'), self.getTemplateFilename('apache.conf.path-protected.in'),
dict(path='/', access_control_string='none')) dict(path='/',
access_control_string='none',
document_root=apache_conf['document_root'],
)
)
apache_conf.update(**dict( apache_conf.update(**dict(
path_enable=path, path_enable=path,
apachemap_path=os.path.join(self.etc_directory, apachemap_name), apachemap_path=os.path.join(self.etc_directory, apachemap_name),
apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name), apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name),
apachemapzopepath_path=os.path.join(self.etc_directory, apachemapzopepath_name),
apache_domain=name, apache_domain=name,
https_port=port, https_port=port,
plain_http_port=plain_http_port, plain_http_port=plain_http_port,
custom_apache_conf=custom_apache_configuration_file_location, custom_apache_conf=custom_apache_configuration_file_location,
custom_apache_virtualhost_conf=custom_apache_virtual_configuration_file_location,
)) ))
apache_conf_string = self.substituteTemplate( apache_conf_string = self.substituteTemplate(
...@@ -553,7 +609,7 @@ class Recipe(BaseSlapRecipe): ...@@ -553,7 +609,7 @@ class Recipe(BaseSlapRecipe):
self.path_list.extend(zc.buildout.easy_install.scripts([( self.path_list.extend(zc.buildout.easy_install.scripts([(
'frontend_apache', 'slapos.recipe.erp5.apache', 'runApache')], self.ws, 'frontend_apache', 'slapos.recipe.erp5.apache', 'runApache')], self.ws,
sys.executable, self.wrapper_directory, arguments=[ sys.executable, self.service_directory, arguments=[
dict( dict(
required_path_list=[key, certificate], required_path_list=[key, certificate],
binary=self.options['httpd_binary'], binary=self.options['httpd_binary'],
......
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
PidFile "%(pid_file)s" PidFile "%(pid_file)s"
ServerName %(server_name)s ServerName %(server_name)s
DocumentRoot %(document_root)s DocumentRoot %(document_root)s
ServerRoot %(instance_home)s
%(listen)s %(listen)s
ServerAdmin %(server_admin)s ServerAdmin %(server_admin)s
DefaultType text/plain DefaultType text/plain
TypesConfig conf/mime.types TypesConfig %(httpd_home)s/conf/mime.types
AddType application/x-compress .Z AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz AddType application/x-gzip .gz .tgz
...@@ -22,8 +23,8 @@ ServerTokens Prod ...@@ -22,8 +23,8 @@ ServerTokens Prod
# Log configuration # Log configuration
ErrorLog "%(error_log)s" ErrorLog "%(error_log)s"
LogLevel warn LogLevel warn
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined LogFormat "%%h %%{REMOTE_USER}i %%{Host}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 LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common CustomLog "%(access_log)s" common
%(path_enable)s %(path_enable)s
...@@ -32,23 +33,23 @@ CustomLog "%(access_log)s" common ...@@ -32,23 +33,23 @@ CustomLog "%(access_log)s" common
#LoadModule unixd_module modules/mod_unixd.so #LoadModule unixd_module modules/mod_unixd.so
#LoadModule access_compat_module modules/mod_access_compat.so #LoadModule access_compat_module modules/mod_access_compat.so
#LoadModule authz_core_module modules/mod_authz_core.so #LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_host_module %(httpd_home)s/modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so LoadModule log_config_module %(httpd_home)s/modules/mod_log_config.so
LoadModule deflate_module modules/mod_deflate.so LoadModule deflate_module %(httpd_home)s/modules/mod_deflate.so
LoadModule setenvif_module modules/mod_setenvif.so LoadModule setenvif_module %(httpd_home)s/modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so LoadModule version_module %(httpd_home)s/modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_module %(httpd_home)s/modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_http_module %(httpd_home)s/modules/mod_proxy_http.so
LoadModule ssl_module modules/mod_ssl.so LoadModule ssl_module %(httpd_home)s/modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so LoadModule mime_module %(httpd_home)s/modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so LoadModule dav_module %(httpd_home)s/modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule dav_fs_module %(httpd_home)s/modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so LoadModule negotiation_module %(httpd_home)s/modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so LoadModule rewrite_module %(httpd_home)s/modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so LoadModule headers_module %(httpd_home)s/modules/mod_headers.so
LoadModule cache_module modules/mod_cache.so LoadModule cache_module %(httpd_home)s/modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule mem_cache_module %(httpd_home)s/modules/mod_mem_cache.so
LoadModule antiloris_module modules/mod_antiloris.so LoadModule antiloris_module %(httpd_home)s/modules/mod_antiloris.so
# The following directives modify normal HTTP response behavior to # The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations. # handle known problems with browser implementations.
...@@ -99,17 +100,28 @@ Header append Vary User-Agent ...@@ -99,17 +100,28 @@ Header append Vary User-Agent
ProxyTimeout 600 ProxyTimeout 600
RewriteEngine On RewriteEngine On
# Define the two rewritemaps : one for zope, one generic # Include configuration file not operated by slapos. This file won't be erased
# or changed when slapgrid is ran. It can be freely customized by node admin.
Include %(custom_apache_virtualhost_conf)s
# Define the two RewriteMaps (key -> value store): one for Zope, one generic
# containing: rewritten URL -> original URL (a.k.a VirtualHostBase in Zope)
RewriteMap apachemapzope txt:%(apachemapzope_path)s RewriteMap apachemapzope txt:%(apachemapzope_path)s
RewriteMap apachemapgeneric txt:%(apachemap_path)s RewriteMap apachemapgeneric txt:%(apachemap_path)s
# Define another RewriteMap for Zope, containing:
# rewritten URL -> VirtualHostRoot
RewriteMap apachemapzopepath txt:%(apachemapzopepath_path)s
# First, we check if we have a zope backend server # First, we check if we have a zope backend server
# If so, let's use Virtual Host Daemon rewrite # If so, let's use Virtual Host Daemon rewrite
RewriteCond ${apachemapzope:%%{SERVER_NAME}} >"" RewriteCond ${apachemapzope:%%{SERVER_NAME}} >""
RewriteRule ^/(.*)$ ${apachemapzope:%%{SERVER_NAME}}/VirtualHostBase/https/%%{SERVER_NAME}:%%{SERVER_PORT}/VirtualHostRoot/$1 [L,P] # We suppose that Apache listens to 443 (even indirectly thanks to things like iptables)
RewriteRule ^/(.*)$ ${apachemapzope:%%{SERVER_NAME}}/VirtualHostBase/https/%%{SERVER_NAME}:443/${apachemapzopepath:%%{SERVER_NAME}}/VirtualHostRoot/$1 [L,P]
# If we have generic backend server, let's rewrite without virtual host daemon # If we have generic backend server, let's rewrite without virtual host daemon
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
# We suppose that Apache listens to 443 (even indirectly thanks to things like iptables)
RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P] RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P]
# If nothing exist : put a nice error # If nothing exist : put a nice error
...@@ -120,6 +132,10 @@ Header append Vary User-Agent ...@@ -120,6 +132,10 @@ Header append Vary User-Agent
RewriteEngine On RewriteEngine On
ProxyPreserveHost On ProxyPreserveHost On
# Include configuration file not operated by slapos. This file won't be erased
# or changed when slapgrid is ran. It can be freely customized by node admin.
Include %(custom_apache_virtualhost_conf)s
# We accept generic (i.e not lamp) backends on http # We accept generic (i.e not lamp) backends on http
RewriteMap apachemapgeneric txt:%(apachemap_path)s RewriteMap apachemapgeneric txt:%(apachemap_path)s
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
......
# Path protected <Directory %(path)s>
<Location %(path)s>
Order Deny,Allow Order Deny,Allow
Allow from %(access_control_string)s Allow from %(access_control_string)s
</Location> </Directory>
<Directory %(document_root)s>
Order Allow,Deny
Allow from All
</Directory>
...@@ -24,13 +24,17 @@ ...@@ -24,13 +24,17 @@
# 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):
...@@ -66,11 +70,13 @@ class Recipe(GenericBaseRecipe): ...@@ -66,11 +70,13 @@ class Recipe(GenericBaseRecipe):
) )
path_list.append(httpd_conf) path_list.append(httpd_conf)
wrapper = self.createPythonScript(self.options['wrapper'], wrapper = self.createWrapper(name=self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute', command=self.options['httpd-binary'],
[self.options['httpd-binary'], '-f', self.options['httpd-conf'], parameters=[
'-DFOREGROUND'] '-f',
) self.options['httpd-conf'],
'-DFOREGROUND'
])
path_list.append(wrapper) path_list.append(wrapper)
secret_key_filename = os.path.join(self.buildout['buildout']['directory'], secret_key_filename = os.path.join(self.buildout['buildout']['directory'],
...@@ -110,12 +116,16 @@ class Recipe(GenericBaseRecipe): ...@@ -110,12 +116,16 @@ 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)
if os.path.exists(self.options['pid-file']): # Reload apache configuration.
# Reload apache configuration # notez-bien: a graceful restart or a SIGUSR1 can somehow hang the apache threads.
with open(self.options['pid-file']) as pid_file:
pid = int(pid_file.read().strip(), 10) subprocess.call([
try: self.options['httpd-binary'],
os.kill(pid, signal.SIGUSR1) # Graceful restart '-f',
except OSError: self.options['httpd-conf'],
pass '-k',
'graceful'
])
return path_list return path_list
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
# 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 os import subprocess
import signal
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
...@@ -50,17 +49,23 @@ class Recipe(GenericBaseRecipe): ...@@ -50,17 +49,23 @@ class Recipe(GenericBaseRecipe):
) )
path_list.append(httpd_conf) path_list.append(httpd_conf)
wrapper = self.createPythonScript(self.options['wrapper'], wrapper = self.createWrapper(name=self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute', command=self.options['httpd-binary'],
[self.options['httpd-binary'], '-f', self.options['httpd-conf'], parameters=[
'-DFOREGROUND'] '-f',
) self.options['httpd-conf'],
'-DFOREGROUND',
])
path_list.append(wrapper) path_list.append(wrapper)
if os.path.exists(self.options['pid-file']): subprocess.call([
# Reload apache configuration self.options['httpd-binary'],
with open(self.options['pid-file']) as pid_file: '-f',
pid = int(pid_file.read().strip(), 10) self.options['httpd-conf'],
os.kill(pid, signal.SIGUSR1) # Graceful restart '-k',
'graceful',
])
return path_list return path_list
# vim: set et sts=2:
############################################################################## ##############################################################################
# #
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved. # Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
......
...@@ -7,15 +7,10 @@ import sys ...@@ -7,15 +7,10 @@ import sys
hostname = "%(hostname)s" hostname = "%(hostname)s"
port = %(port)s port = %(port)s
connection_okay = False
try: try:
s = socket.create_connection((hostname, port)) s = socket.create_connection((hostname, port))
connection_okay = True
s.close() s.close()
except (socket.error, socket.timeout): except (socket.error, socket.timeout):
connection_okay = False sys.stderr.write("%(port)s on %(hostname)s isn't listening\n")
if not connection_okay:
print >> sys.stderr, "%(port)s on %(hostname)s isn't listening"
sys.exit(127) sys.exit(127)
...@@ -40,47 +40,58 @@ class Recipe(GenericBaseRecipe): ...@@ -40,47 +40,58 @@ class Recipe(GenericBaseRecipe):
This recipe creates: This recipe creates:
- a Postgres cluster - a Postgres cluster
- configuration to allow connections from IPV6 only (or unix socket) - configuration to allow connections from IPv4, IPv6 or unix socket.
- a superuser with provided name and generated password - a superuser with provided name and generated password
- a database with provided name - a database with provided name
- a foreground start script in the services directory - a start script in the services directory
then adds the connection URL to the options. Required options:
The URL can be used as-is (ie. in sqlalchemy) or by the _urlparse.py recipe. bin
""" path to the 'initdb' and 'postgres' binaries.
dbname
def fetch_ipv6_host(self, options): name of the database to be used by the application.
""" ipv4
Returns a string represtation of ipv6_host. set of ipv4 to listen on.
May receive a regular string, a set or a string serialized by buildout. ipv6
set of ipv6 to listen on.
pgdata-directory
path to postgres configuration and data.
services
must be ${buildout:directory}/etc/service.
superuser
name of the superuser to create.
Exposed options:
password
generated password for the superuser.
url
generated DBAPI connection string.
it can be used as-is (ie. in sqlalchemy) or by the _urlparse.py recipe.
""" """
ipv6_host = options['ipv6_host']
if isinstance(ipv6_host, set):
return ipv6_host.pop()
else:
return ipv6_host
def _options(self, options): def _options(self, options):
options['password'] = self.generatePassword() options['password'] = self.generatePassword()
options['url'] = 'postgresql://%(user)s:%(password)s@[%(ipv4_host)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):
pgdata = self.options['pgdata-directory'] pgdata = self.options['pgdata-directory']
# if the pgdata already exists, skip all steps, we don't need to do anything.
if not os.path.exists(pgdata): if not os.path.exists(pgdata):
self.createCluster() self.createCluster()
self.createConfig() self.createConfig()
self.createDatabase() self.createDatabase()
self.createSuperuser() self.updateSuperuser()
self.createRunScript() self.createRunScript()
return [ # install() methods usually return the pathnames of managed files.
# XXX should we really return something here? # If they are missing, they will be rebuilt.
# os.path.join(pgdata, 'postgresql.conf') # In this case, we already check for the existence of pgdata,
] # so we don't need to return anything here.
return []
def check_exists(self, path): def check_exists(self, path):
...@@ -89,6 +100,12 @@ class Recipe(GenericBaseRecipe): ...@@ -89,6 +100,12 @@ class Recipe(GenericBaseRecipe):
def createCluster(self): def createCluster(self):
"""\
A Postgres cluster is "a collection of databases that is managed
by a single instance of a running database server".
Here we create an empty cluster.
"""
initdb_binary = os.path.join(self.options['bin'], 'initdb') initdb_binary = os.path.join(self.options['bin'], 'initdb')
self.check_exists(initdb_binary) self.check_exists(initdb_binary)
...@@ -99,6 +116,7 @@ class Recipe(GenericBaseRecipe): ...@@ -99,6 +116,7 @@ class Recipe(GenericBaseRecipe):
'-D', pgdata, '-D', pgdata,
'-A', 'ident', '-A', 'ident',
'-E', 'UTF8', '-E', 'UTF8',
'-U', self.options['superuser'],
]) ])
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
raise UserError('Could not create cluster directory in %s' % pgdata) raise UserError('Could not create cluster directory in %s' % pgdata)
...@@ -106,10 +124,12 @@ class Recipe(GenericBaseRecipe): ...@@ -106,10 +124,12 @@ class Recipe(GenericBaseRecipe):
def createConfig(self): def createConfig(self):
pgdata = self.options['pgdata-directory'] pgdata = self.options['pgdata-directory']
ipv4 = self.options['ipv4']
ipv6 = self.options['ipv6']
with open(os.path.join(pgdata, 'postgresql.conf'), 'wb') as cfg: with open(os.path.join(pgdata, 'postgresql.conf'), 'wb') as cfg:
cfg.write(textwrap.dedent("""\ cfg.write(textwrap.dedent("""\
listen_addresses = '%s,%s' listen_addresses = '%s'
logging_collector = on logging_collector = on
log_rotation_size = 50MB log_rotation_size = 50MB
max_connections = 100 max_connections = 100
...@@ -124,49 +144,54 @@ class Recipe(GenericBaseRecipe): ...@@ -124,49 +144,54 @@ class Recipe(GenericBaseRecipe):
unix_socket_directory = '%s' unix_socket_directory = '%s'
unix_socket_permissions = 0700 unix_socket_permissions = 0700
""" % ( """ % (
self.options['ipv4_host'], ','.join(ipv4.union(ipv6)),
self.fetch_ipv6_host(self.options),
pgdata, pgdata,
))) )))
with open(os.path.join(pgdata, 'pg_hba.conf'), 'wb') as cfg: with open(os.path.join(pgdata, 'pg_hba.conf'), 'wb') as cfg:
# see http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html # see http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html
cfg_lines = [
'# TYPE DATABASE USER ADDRESS METHOD',
'',
'# "local" is for Unix domain socket connections only (check unix_socket_permissions!)',
'local all all ident',
'host all all 127.0.0.1/32 md5',
'host all all ::1/128 md5',
]
cfg.write(textwrap.dedent("""\ for ip in ipv4:
# TYPE DATABASE USER ADDRESS METHOD cfg_lines.append('host all all %s/32 md5' % ip)
for ip in ipv6:
cfg_lines.append('host all all %s/128 md5' % ip)
# "local" is for Unix domain socket connections only (check unix_socket_permissions!) cfg.write('\n'.join(cfg_lines))
local all all ident
host all all 127.0.0.1/32 md5
host all all %s/32 md5
host all all ::1/128 md5
host all all %s/128 md5
""" % (self.options['ipv4_host'], self.fetch_ipv6_host(self.options))))
def createDatabase(self): def createDatabase(self):
self.runPostgresCommand(cmd='CREATE DATABASE "%s"' % self.options['dbname']) self.runPostgresCommand(cmd='CREATE DATABASE "%s"' % self.options['dbname'])
def createSuperuser(self): def updateSuperuser(self):
""" """\
Creates a Postgres superuser - other than "slapuser#" for use by the application. Set a password for the cluster administrator.
The application will also use it for its connections.
""" """
# http://postgresql.1045698.n5.nabble.com/Algorithm-for-generating-md5-encrypted-password-not-found-in-documentation-td4919082.html # http://postgresql.1045698.n5.nabble.com/Algorithm-for-generating-md5-encrypted-password-not-found-in-documentation-td4919082.html
user = self.options['user'] user = self.options['superuser']
password = self.options['password'] password = self.options['password']
# encrypt the password to avoid storing in the logs # encrypt the password to avoid storing in the logs
enc_password = 'md5' + md5.md5(password+user).hexdigest() enc_password = 'md5' + md5.md5(password+user).hexdigest()
self.runPostgresCommand(cmd="""CREATE USER "%s" ENCRYPTED PASSWORD '%s' SUPERUSER""" % (user, enc_password)) self.runPostgresCommand(cmd="""ALTER USER "%s" ENCRYPTED PASSWORD '%s'""" % (user, enc_password))
def runPostgresCommand(self, cmd): def runPostgresCommand(self, cmd):
""" """\
Executes a command in single-user mode, with no daemon running. Executes a command in single-user mode, with no daemon running.
Multiple commands can be executed by providing newlines, Multiple commands can be executed by providing newlines,
...@@ -190,7 +215,7 @@ class Recipe(GenericBaseRecipe): ...@@ -190,7 +215,7 @@ class Recipe(GenericBaseRecipe):
def createRunScript(self): def createRunScript(self):
""" """\
Creates a script that runs postgres in the foreground. Creates a script that runs postgres in the foreground.
'exec' is used to allow easy control by supervisor. 'exec' is used to allow easy control by supervisor.
""" """
...@@ -203,58 +228,3 @@ class Recipe(GenericBaseRecipe): ...@@ -203,58 +228,3 @@ class Recipe(GenericBaseRecipe):
self.createExecutable(name, content=content) self.createExecutable(name, content=content)
class ExportRecipe(GenericBaseRecipe):
def install(self):
pgdata = self.options['pgdata-directory']
wrapper = self.options['wrapper']
self.createBackupScript(wrapper)
return [wrapper]
def createBackupScript(self, wrapper):
"""
Create a script to backup the database in 'custom' format.
"""
content = textwrap.dedent("""\
#!/bin/sh
umask 077
%(bin)s/pg_dump \\
--host=%(pgdata-directory)s \\
--format=custom \\
--file=%(backup-directory)s/database.dump \\
%(dbname)s
""" % self.options)
self.createExecutable(wrapper, content=content)
class ImportRecipe(GenericBaseRecipe):
def install(self):
pgdata = self.options['pgdata-directory']
wrapper = self.options['wrapper']
self.createRestoreScript(wrapper)
return [wrapper]
def createRestoreScript(self, wrapper):
"""
Create a script to restore the database from 'custom' format.
"""
content = textwrap.dedent("""\
#!/bin/sh
%(bin)s/pg_restore \\
--host=%(pgdata-directory)s \\
--dbname=%(dbname)s \\
--clean \\
--no-owner \\
--no-acl \\
%(backup-directory)s/database.dump
""" % self.options)
self.createExecutable(wrapper, content=content)
##############################################################################
#
# 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 textwrap
from slapos.recipe.librecipe import GenericBaseRecipe
class ExportRecipe(GenericBaseRecipe):
"""\
This recipe creates an exporter script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
bin
path to the 'pg_dump' binary.
dbname
name of the database to dump.
pgdata-directory
path to postgres configuration and data.
wrapper
full path of the exporter script to create.
"""
def install(self):
wrapper = self.options['wrapper']
self.createBackupScript(wrapper)
return [wrapper]
def createBackupScript(self, wrapper):
"""\
Create a script to backup the database in 'custom' format.
"""
content = textwrap.dedent("""\
#!/bin/sh
umask 077
%(bin)s/pg_dump \\
--host=%(pgdata-directory)s \\
--format=custom \\
--file=%(backup-directory)s/database.dump \\
%(dbname)s
""" % self.options)
self.createExecutable(wrapper, content=content)
class ImportRecipe(GenericBaseRecipe):
"""\
This recipe creates an importer script for using with the resilient stack.
Required options:
backup-directory
folder that contains the dump file.
bin
path to the 'pg_restore' binary.
dbname
name of the database to restore.
pgdata-directory
path to postgres configuration and data.
wrapper
full path of the importer script to create.
"""
def install(self):
wrapper = self.options['wrapper']
self.createRestoreScript(wrapper)
return [wrapper]
def createRestoreScript(self, wrapper):
"""\
Create a script to restore the database from 'custom' format.
"""
content = textwrap.dedent("""\
#!/bin/sh
%(bin)s/pg_restore \\
--host=%(pgdata-directory)s \\
--dbname=%(dbname)s \\
--clean \\
--no-owner \\
--no-acl \\
%(backup-directory)s/database.dump
""" % self.options)
self.createExecutable(wrapper, content=content)
...@@ -179,7 +179,9 @@ class RequestOptional(Recipe): ...@@ -179,7 +179,9 @@ class RequestOptional(Recipe):
""" """
def install(self): def install(self):
if self._raise_request_exception_formatted: if self._raise_request_exception_formatted:
self.logger.warning('Optional request failed:') self.logger.warning('Optional request failed.')
if not isinstance(self._raise_request_exception, slapmodule.NotFoundError):
# full traceback for optional 'not found' is too verbose and confusing
self.logger.warning(self._raise_request_exception_formatted) self.logger.warning(self._raise_request_exception_formatted)
elif self.failed is not None: elif self.failed is not None:
# Check instance status to know if instance has been deployed # Check instance status to know if instance has been deployed
......
...@@ -64,6 +64,10 @@ class Recipe(object): ...@@ -64,6 +64,10 @@ class Recipe(object):
Set of IPv4 addresses. Set of IPv4 addresses.
ipv6 ipv6
Set of IPv6 addresses. Set of IPv6 addresses.
ipv4_random
One of the IPv4 addresses.
ipv6_random
One of the IPv6 addresses.
tap tap
Set of TAP interfaces. Set of TAP interfaces.
configuration configuration
...@@ -109,6 +113,13 @@ class Recipe(object): ...@@ -109,6 +113,13 @@ class Recipe(object):
# XXX: emit warning on unknown address type ? # XXX: emit warning on unknown address type ?
options['ipv4'] = ipv4_set options['ipv4'] = ipv4_set
options['ipv6'] = ipv6_set options['ipv6'] = ipv6_set
# also export single ip values for those recipes that don't support sets.
if ipv4_set:
options['ipv4_random'] = list(ipv4_set)[0]
if ipv6_set:
options['ipv6_random'] = list(ipv6_set)[0]
options['tap'] = tap_set options['tap'] = tap_set
options['configuration'] = parameter_dict options['configuration'] = parameter_dict
match = self.OPTCRE_match match = self.OPTCRE_match
......
[buildout]
parts =
instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
agent_binary = ${buildout:directory}/bin/agent
pidfile = $${directory:srv}/agent.pid
log = $${directory:agentlog}/agent.log
wrapper = $${directory:run}/agent
config = $${directory:etc}/agent.cfg
master-url = $${slap-parameter:master-url}
key = $${slap-parameter:userkey}
cert = $${slap-parameter:usercertificate}
configuration = $${slap-parameter:configuration}
default_max_install_duration = $${slap-parameter:default_max_install_duration}
default_max_uninstall_duration = $${slap-parameter:default_max_uninstall_duration}
default_max_request_duration = $${slap-parameter:default_max_request_duration}
default_max_destroy_duration = $${slap-parameter:default_max_destroy_duration}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
run = $${:etc}/run
agentlog = $${buildout:directory}/var/log/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
[buildout] [buildout]
parts = parts =
instance 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
[instance] [switch_softwaretype]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = slapos.cookbook:softwaretype
agent_binary = ${buildout:directory}/bin/agent default = ${template-agent:output}
report_start = ${buildout:directory}/bin/report_start
report_stop = ${buildout:directory}/bin/report_stop
dcrond_binary = ${dcron:location}/sbin/crond
python_binary = ${python2.7:location}/bin/python
pidfile = $${rootdirectory:run}/agent.pid
log = $${rootdirectory:agentlog}/agent.log
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
run = $${buildout:directory}/etc/run
agentlog = $${buildout:directory}/var/log/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
[buildout] [buildout]
extends = extends =
../../component/dcron/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/git/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
parts = parts =
template template
eggs template-agent
slapos.cookbook-repository
check-recipe
slapos.toolbox-repository
check-recipe-toolbox
instance-recipe-egg instance-recipe-egg
dcron
python2.7
script script
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = agent
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slapos.toolbox-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = agent
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.toolbox.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
[check-recipe-toolbox]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[instance-recipe] [instance-recipe]
# XXX-Cedric: it can use newest slapos.cfg to not have duplication
egg = slapos.cookbook egg = slapos.cookbook
module = agent module = agent
[instance-recipe-egg] [instance-recipe-egg]
# XXX-Cedric: it can use newest slapos.cfg to not have duplication
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.7 eggs =
eggs = ${instance-recipe:egg} ${lxml-python:egg}
${instance-recipe:egg}
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
md5sum = c7cb98594f394d05baedabe424643f6f md5sum = bcd3b3cb8a305c83bb048d5ac1c583fe
mode = 0644 mode = 0644
[eggs] [template-agent]
python = python2.7 recipe = slapos.recipe.template
recipe = zc.recipe.egg url = ${:_profile_base_location_}/instance-agent.cfg
eggs = output = ${buildout:directory}/template-agent.cfg
${lxml-python:egg} md5sum = fd9670d8473be402b10990398b553b00
slapos.cookbook mode = 0644
slapos.toolbox
erp5.util
[lxml-python]
python = python2.7
[script] [script]
recipe = z3c.recipe.scripts recipe = z3c.recipe.scripts
python = python2.7
eggs = eggs =
zc.buildout zc.buildout
${lxml-python:egg}
slapos.core slapos.core
slapos.cookbook
slapos.toolbox[agent] slapos.toolbox[agent]
erp5.util
[networkcache] [networkcache]
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
# Romain Courteaud # Romain Courteaud
# Cedric de Saint Martin
# Rafael Monnerat
# Test agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
...@@ -68,3 +101,42 @@ signature-certificate-list = ...@@ -68,3 +101,42 @@ signature-certificate-list =
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ== QUUGLQ==
-----END CERTIFICATE----- -----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+gAwIBAgIJAOcKrOH/2Da6MA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjk3MCAXDTEyMDYyNjAzMDU1MVoYDzIxMTIwNjAyMDMwNTUxWjAT
MREwDwYDVQQDDAhDT01QLTI5NzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
xzbOGlcoin2q+Mtp52r26Njliz2aoxIXbnOBUyDc/OGtk9nWA5uBtTc2zwR17um6
KV0bGyvuBA78XcvU+AIV/5s0ohBAX7yjRKmEhAYcFvov3EyWSdjOrqqo4qFSzOrK
sVQBlxIDpjQBH4F3lf6dBv6/M+tCT3iSv3aOZbsG0E8CAwEAAaNQME4wHQYDVR0O
BBYEFLqtrfTu+BIVt+TFiRUkIoiWIYrxMB8GA1UdIwQYMBaAFLqtrfTu+BIVt+TF
iRUkIoiWIYrxMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAc8N5P5gW
Jrdk9gF/3Cpp6THDiy93+WcuAm7zFwXPFNttJtFKMNObP2YRZvsQkvjezfrZoRBF
j8LgKB3tZCbBj+HDj+AeD+q9V+cqMFLKc6LezvQYUuum6bZdfUNnPv1K1ULYSPjq
/jsRBbabCWSXqxR6gYEM6ooauj3udBMXhHE=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = utilisateur
constraint = `id_utilisateur`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.agora-project.net/agora-project.zip
md5sum = 3fecb27ca5d3bb6c263dbd87113f3cce
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
...@@ -9,15 +9,22 @@ It means that a single main instance of Apache will be used to act as frontend ...@@ -9,15 +9,22 @@ It means that a single main instance of Apache will be used to act as frontend
for many slaves. for many slaves.
How to use How to deploy a frontend server
========== ===============================
First, you will need to request a "master" instance of Apache Frontend with This is to deploy an entire frontend server with a public IPv4.
"domain" parameter, like:: If you want to use an already deployed frontend to make your service available
via ipv4, switch to the "Example" parts.
First, you will need to request a "master" instance of Apache Frontend with:
* A "domain" parameter where the frontend will be available
* A "public-ipv4" parameter to state which public IPv4 will be used
like::
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<instance> <instance>
<parameter id="domain">moulefrite.org</parameter> <parameter id="domain">moulefrite.org</parameter>
<parameter id="port">443</parameter> <parameter id="public-ipv4">xxx.xxx.xxx.xxx</parameter>
</instance> </instance>
Then, it is possible to request many slave instances Then, it is possible to request many slave instances
...@@ -69,11 +76,11 @@ url of backend to use. ...@@ -69,11 +76,11 @@ url of backend to use.
"url" is a mandatory parameter. "url" is a mandatory parameter.
Example: http://mybackend.com/myresource Example: http://mybackend.com/myresource
cache enable_cache
~~~~~ ~~~~~
Specify if slave instance should use a varnish / stunnel to connect to backend. Specify if slave instance should use a varnish / stunnel to connect to backend.
Possible values: "true", "false". Possible values: "true", "false".
"cache" is an optional parameter. Defaults to "false". "enable_cache" is an optional parameter. Defaults to "false".
Example: true Example: true
type type
...@@ -91,20 +98,73 @@ Domain name to use as frontend. The frontend will be accessible from this domain ...@@ -91,20 +98,73 @@ Domain name to use as frontend. The frontend will be accessible from this domain
[instancereference].[masterdomain]. [instancereference].[masterdomain].
Example: www.mycustomdomain.com Example: www.mycustomdomain.com
path
~~~~
Only used if type is "zope".
Will append the specified path to the "VirtualHostRoot" of the zope's
VirtualHostMonster.
"path" is an optional parameter, ignored if not specified.
Example of value: "/erp5/web_site_module/hosting/"
Examples
========
Here are some example of how to make your SlapOS service available through
an already deployed frontend.
Simple Example
--------------
Request slave frontend instance so that https://[1:2:3:4:5:6:7:8]:1234 will be
redirected and accessible from the proxy::
instance = request(
software_release=apache_frontend,
software_type="RootSoftwareInstance",
partition_reference='my frontend',
shared=True,
partition_parameter_kw={
"url":"https://[1:2:3:4:5:6:7:8]:1234",
}
)
Zope Example
------------
Request slave frontend instance using a Zope backend so that
https://[1:2:3:4:5:6:7:8]:1234 will be redirected and accessible from the
proxy::
instance = request(
software_release=apache_frontend,
software_type="RootSoftwareInstance",
partition_reference='my frontend',
shared=True,
partition_parameter_kw={
"url":"https://[1:2:3:4:5:6:7:8]:1234",
"type":"zope",
}
)
Advanced example Advanced example
================ ----------------
Request slave frontend instance using a Zope backend, with Varnish activated, Request slave frontend instance using a Zope backend, with Varnish activated,
listening to a custom domain:: listening to a custom domain and redirecting to /erp5/ so that
https://[1:2:3:4:5:6:7:8]:1234/erp5/ will be redirected and accessible from
the proxy::
instance = request( instance = request(
software_release=apache_frontend, software_release=apache_frontend,
partition_reference='frontend2', software_type="RootSoftwareInstance",
partition_reference='my frontend',
shared=True, shared=True,
partition_parameter_kw={ partition_parameter_kw={
"url":"https://[1:2:3:4]:1234/someresource", "url":"https://[1:2:3:4:5:6:7:8]:1234",
"cache":"true", "enable_cache":"true",
"type":"zope", "type":"zope",
"path":"/erp5",
"custom_domain":"mycustomdomain.com", "custom_domain":"mycustomdomain.com",
} }
) )
...@@ -115,8 +175,9 @@ Notes ...@@ -115,8 +175,9 @@ Notes
It is not possible with slapos to listen to port <= 1024, because process are It is not possible with slapos to listen to port <= 1024, because process are
not run as root. It is a good idea then to go on the node where the instance is not run as root. It is a good idea then to go on the node where the instance is
and set some iptables rules like (if using default ports):: and set some iptables rules like (if using default ports)::
iptables -t nat -A PREROUTING -p tcp -d {public ip} --dport 443 -j DNAT --to-destination {listening ip}:4443
iptables -t nat -A PREROUTING -p tcp -d {public_ip} --dport 80 -j DNAT --to-destination {listening ip}:8080 iptables -t nat -A PREROUTING -p tcp -d {public_ipv4} --dport 443 -j DNAT --to-destination {listening_ipv4}:4443
iptables -t nat -A PREROUTING -p tcp -d {public_ipv4} --dport 80 -j DNAT --to-destination {listening_ipv4}:8080
Where {public ip} is the public IP of your server, or at least the LAN IP to where your NAT will forward to. Where {public ip} is the public IP of your server, or at least the LAN IP to where your NAT will forward to.
{listening ip} is the private ipv4 (like 10.0.34.123) that the instance is using and sending as connection parameter. {listening ip} is the private ipv4 (like 10.0.34.123) that the instance is using and sending as connection parameter.
[buildout]
extends =
../../component/binutils/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/apache/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/varnish/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../stack/slapos.cfg
parts =
template
binutils
apache-2.2
apache-antiloris-apache-2.2
stunnel
varnish-2.1
dcron
logrotate
rdiff-backup
# Buildoutish
eggs
instance-recipe-egg
[instance-recipe]
# Note: In case if specific instantiation recipe is used this is the place to
# put its name
egg = slapos.cookbook
module = apache.frontend
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
[template]
# Default template for apache instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = fea902a2b9dbf8c80ff201bcf73f9396
output = ${buildout:directory}/template.cfg
mode = 0644
\ No newline at end of file
# Development profile of apache-frontend.
# Exactly the same as software.cfg, but fetch the slapos.cookbook
# from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
# You'll need to run buildout twice for this profile.
[buildout]
extends =
# Extend in this order, otherwise "parts" will be taken from git profile
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
develop =
${:parts-directory}/slapos.cookbook-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = frontend
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
[buildout] [buildout]
parts = parts =
directory
instance instance
configtest
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
# Create all needed directories
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
service = $${:etc}/service
# Deploy Apache (old way, with monolithic recipe)
[instance] [instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = ${instance-recipe:egg}:${instance-recipe:module}
httpd_home = ${apache-2.2:location}
httpd_binary = ${apache-2.2:location}/bin/httpd httpd_binary = ${apache-2.2:location}/bin/httpd
logrotate_binary = ${logrotate:location}/usr/sbin/logrotate logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
openssl_binary = ${openssl:location}/bin/openssl openssl_binary = ${openssl:location}/bin/openssl
...@@ -14,5 +28,12 @@ dcrond_binary = ${dcron:location}/sbin/crond ...@@ -14,5 +28,12 @@ dcrond_binary = ${dcron:location}/sbin/crond
varnishd_binary = ${varnish-2.1:location}/sbin/varnishd varnishd_binary = ${varnish-2.1:location}/sbin/varnishd
stunnel_binary = ${stunnel:location}/bin/stunnel stunnel_binary = ${stunnel:location}/bin/stunnel
rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup
gcc_binary = ${gcc-java-minimal:location}/bin/gcc gcc_binary = gcc
binutils_directory = ${binutils:location}/bin/ binutils_directory = ${binutils:location}/bin/
# Create wrapper for "apachectl conftest" in bin
[configtest]
recipe = slapos.cookbook:wrapper
command-line = $${instance:httpd_binary} -f $${directory:etc}/apache_frontend.conf -t
output = $${directory:bin}/apache-configtest
[buildout] [buildout]
versions = versions extends = common.cfg
extends =
../../component/binutils/buildout.cfg
../../component/gcc/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/apache/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/varnish/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../stack/slapos.cfg
parts =
template
binutils
gcc-java-minimal
apache-2.2
apache-antiloris-apache-2.2
stunnel
varnish-2.1
dcron
logrotate
rdiff-backup
# Buildoutish
eggs
instance-recipe-egg
[instance-recipe]
# Note: In case if specific instantiation recipe is used this is the place to
# put its name
egg = slapos.cookbook
module = apache.frontend
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
[template]
# Default template for apache instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 74c0f41246d167c020854a212e919ce4
output = ${buildout:directory}/template.cfg
mode = 0644
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.6
meld3 = 0.6.8 meld3 = 0.6.10
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.cookbook = 0.52 slapos.cookbook = 0.71.1
slapos.recipe.template = 2.3 slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.33.1
Flask = 0.8 Flask = 0.9
# Required by: # Required by:
# slapos.cookbook==0.52 # hexagonit.recipe.cmmi==1.6
PyXML = 0.8.4 hexagonit.recipe.download = 1.6
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.71.1
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.71.1
# slapos.core==0.24 # slapos.core==0.33.1
# xml-marshaller==0.9.7 # xml-marshaller==0.9.7
lxml = 2.3.4 lxml = 3.0.2
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.71.1
netaddr = 0.7.6 netaddr = 0.7.10
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.33.1
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.71.1
# slapos.core==0.24 pytz = 2012j
# zc.buildout==1.6.0-dev-SlapOS-004
# Required by:
# slapos.cookbook==0.71.1
# slapos.core==0.33.1
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.71.1
slapos.core = 0.24 slapos.core = 0.33.1
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.33.1
supervisor = 3.0a12 supervisor = 3.0b1
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.71.1
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.core==0.33.1
zc.recipe.egg = 1.3.2 zope.interface = 4.0.3
# Required by:
# slapos.core==0.24
zope.interface = 4.0.0
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # signature certificates of the following uploaders.
# Cedric de Saint Martin
# Romain Courteaud
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -133,3 +85,29 @@ signature-certificate-list = ...@@ -133,3 +85,29 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = users
constraint = `userId`>0
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://script.arfooo.com/telecharger/arfooo-2.0.2.zip
md5sum = 51ca32fa2c66d8ad810f15a45edbf5a7
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://chamilo.googlecode.com/files/chamilo-1.8.8.4.zip
md5sum = 38ea9bc58e1ef5baa334a9b103dda98c
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = claroline/install
table_name = category
constraint = `id`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://garr.dl.sourceforge.net/project/claroline/Claroline/Claroline%201.10.6/claroline1106.tar.gz
md5sum = 28b198c90a12fda0eabbbea1dc9ef042
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2011-05-25a.tgz
md5sum = 6452eff54afa35e031e15fec9a737dd1
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
...@@ -16,7 +16,7 @@ extends = ...@@ -16,7 +16,7 @@ extends =
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://download.dotclear.net/latest-2.0.tar.gz url = http://download.dotclear.net/latest-2.0.tar.gz
md5sum = 98263b4734f93b7c54d3ab436bf344e3 md5sum = 4ca12cbd12228ceee0b7c0f697e1ff09
[application-template] [application-template]
recipe = slapos.recipe.download recipe = slapos.recipe.download
......
[buildout]
parts =
test-runner
sh-environment
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[create-directory]
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
services = $${:etc}/run
srv = $${buildout:directory}/srv
source-code = $${:srv}/eggs-source-code
[download-source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
# Local development
[erp5-util]
<= download-source
repository = ${erp5-util-repository:location}
[test-runner]
recipe = slapos.cookbook:egg_test
run-test-suite = $${create-directory:bin}/runTestSuite
run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
# The list of executables should be defined here and a combination
# of tests should dynamically generated.
#python-list = $${}
test-list =
$${erp5-util:location}
prepend-path = ${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
environment = environment
[environment]
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib
PYTHONPATH = ${python-setuptools:location}
LD_LIBRARY_PATH = ${libxslt:location}/lib
[sh-environment]
# Section exposes testing default environment as sh file. It is thus easy
# to directly develop and test the egg inside of this instance.
recipe = collective.recipe.template
input = inline:
export PATH="$${test-runner:prepend-path}:$PATH"
export CPPFLAGS="$${environment:CPPFLAGS}"
export LDFLAGS="$${environment:LDFLAGS}"
export PYTHONPATH="$${environment:PYTHONPATH}"
export PS1="[slapos-testing env Active] $PS1"
output = $${create-directory:bin}/environment.sh
mode = 755
[buildout]
extends =
../../component/git/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/libxml2/buildout.cfg
../../component/libxslt/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/python-setuptools/buildout.cfg
../../component/zlib/buildout.cfg
../../stack/slapos.cfg
parts =
slapos.cookbook-repository
erp5-util-repository
eggs
template
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
erp5.util
slapos.cookbook
collective.recipe.template
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
scripts =
runTestSuite
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/slapos.git
branch = master
[erp5-util-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/erp5.git
branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 0cdfaa1df03885bd6004755d285e69b5
output = ${buildout:directory}/template.cfg
mode = 640
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
erp5.util = 0.4.7
hexagonit.recipe.cmmi = 1.6
lxml = 2.3.6
meld3 = 0.6.8
plone.recipe.command = 1.1
slapos.cookbook = 0.65
slapos.libnetworkcache = 0.13.2
slapos.recipe.build = 0.11.2
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
# Required by:
# slapos.core==0.28.5
Flask = 0.9
# Required by:
# slapos.cookbook==0.65
PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.cookbook==0.65
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.65
netaddr = 0.7.10
# Required by:
# slapos.core==0.28.5
netifaces = 0.8
# Required by:
# erp5.util==0.4.7
# slapos.cookbook==0.65
# slapos.core==0.28.5
# zc.buildout==1.6.0-dev-SlapOS-006
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.65
slapos.core = 0.28.5
# Required by:
# slapos.core==0.28.5
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.65
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.65
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.28.5
zope.interface = 4.0.1
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://freefr.dl.sourceforge.net/project/opengoo/fengoffice/fengoffice_2.0.0/fengoffice_2.0.0.zip
md5sum = 2f673962ac377da7942ba8a09429ddbf
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
\ No newline at end of file
# -*- coding: utf-8 -*-
import sys
import os
def setup(args):
base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args
os.rename(os.path.join(htdocs, "config.inc.php"), os.path.join(htdocs, "config.php"))
config_php = os.path.join(htdocs, "config.php")
os.chmod(config_php, 0444)
if __name__ == '__main__':
setup(sys.argv[1:])
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = users
constraint = `id`>1
script = ${configure-script:location}/${configure-script:filename}
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
configure-script
extends =
../../stack/lamp.cfg
[application]
recipe = hexagonit.recipe.download:download-unpacked
url = http://fluxbb.org/download/releases/1.4.7/fluxbb-1.4.7.tar.bz2
md5sum = bc2168205d404421729cc3b040d6fe15
[configure-script]
recipe = hexagonit.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-fluxbb.py
filename = configure-fluxbb.py
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/config.inc.php.in
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = config.inc.php
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
<?php
$db_type = 'mysql';
$db_host = '%(mysql_host)s';
$db_name = '%(mysql_database)s';
$db_username = '%(mysql_user)s';
$db_password = '%(mysql_password)s';
$db_prefix = 'fbb_';
$p_connect = false;
$cookie_name = 'pun_cookie_357edd';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;
$cookie_seed = 'aba88f605e01bfe2';
define('PUN', 1);
# -*- coding: utf-8 -*-
import sys
import os
def setup(args):
'''
Freeglobes doesn't put the good url of the application
this script ensure the url is the good one
'''
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
config_file = os.path.join(htdocs, "conf/config.php")
new_config_file = os.path.join(htdocs, "conf/config_new.php")
install_dir = os.path.join(htdocs, "install")
software_url = "$CONFIG['site_url'] = '%s'; " % base_url
f = open(config_file, 'r')
f1 = open(new_config_file, 'w+')
for line in f.readlines():
if "$CONFIG['site_url']" not in line:
f1.write(line)
else:
f1.write(software_url)
f.close()
f1.close()
os.remove(config_file)
os.rename(new_config_file, config_file)
os.rename(install_dir, '%s_done' % install_dir)
if __name__ == '__main__':
setup(sys.argv[1:])
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = user
constraint = `id`=1
script = ${configure-script:location}/${configure-script:filename}
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
configure-script
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.freeglobes.net/freeglobes-03.01.2009.zip
md5sum = 80e373c4a23fab7506d6e00a3ec11473
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[configure-script]
recipe = hexagonit.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-freeglobes.py
md5sum = 30d9bbcd410f35afc58c7b9ad101b1ec
filename = configure-freeglobes.py
download-only = True
mode = 0744
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = shipping_weight
constraint = `id`=2
delete = install.php
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = slapos.recipe.build
url = http://www.chaozz.nl/binaries/freewebshop/FreeWebshop.org2.2.9_R2.zip
md5sum = 9a32bfa3feb47e33c4eb81a9e00271e6
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "${buildout:parts-directory}/${:_buildout_section_name_}")
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://garr.dl.sourceforge.net/project/frontaccounting/FrontAccounting-2.3/2.3.7/frontaccounting-2.3.7.tgz
md5sum = d16899327dd316becd0d1abe0b19ff3e
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
file_token = install.lock
delete = install.php
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = slapos.recipe.build
url = http://downloads.sourceforge.net/project/fnews/fnews/3.9.6-p1/fusionnews-3.9.6-p1.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ffnews%2Ffiles%2F&ts=1320325550&use_mirror=freefr
md5sum = dc4c00be8f4abab11fbab178e016c581
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir + "/upload", "${buildout:parts-directory}/${:_buildout_section_name_}")
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = texts
constraint = `tid`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://download.tuxfamily.org/galette/galette-0.7.0.tar.bz2
md5sum = 7aadd2f8c4922f7e168d29d595b75702
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = https://forge.indepnet.net/attachments/download/1151/glpi-0.83.1.tar.gz
md5sum = 3f9cfb11c09c457a0f0a8fa1563b45a7
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://www.freeguppy.org/file/guppy4619.zip
md5sum = 5d993b0818e195385a775880ce5d4be7
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = false
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
...@@ -163,6 +163,7 @@ hexagonit.recipe.download = 1.5.1 ...@@ -163,6 +163,7 @@ hexagonit.recipe.download = 1.5.1
[networkcache] [networkcache]
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
# Łukasz Nowak # Łukasz Nowak
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJANLesB1hoQIEMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJANLesB1hoQIEMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -177,3 +178,16 @@ signature-certificate-list = ...@@ -177,3 +178,16 @@ signature-certificate-list =
9LnVeCSkC4Ct8kvkT/WdRFF/nqprbZ6bUrhx2yAKTH6CMhIjDJ8F7fAkH48fLD7M 9LnVeCSkC4Ct8kvkT/WdRFF/nqprbZ6bUrhx2yAKTH6CMhIjDJ8F7fAkH48fLD7M
HPuwnRO7OewFpzT/gfQgFKpmVBNUYq7YddE= HPuwnRO7OewFpzT/gfQgFKpmVBNUYq7YddE=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = users
constraint = (`user_id`>0) and (`user_password`<>'0000000000000000000000000000000000000000')
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.igalerie.org/igalerie-2.1.5.zip
md5sum = de7279fb1dc4cf4318218d35b0776f95
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.kubelabs.com/files/kubeblog%201.1.2.zip
md5sum = 21aa12d766dca6ed632ae1806206c7cf
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
\ No newline at end of file
...@@ -18,6 +18,8 @@ parts = ...@@ -18,6 +18,8 @@ parts =
eggs eggs
instance-recipe-egg instance-recipe-egg
find-links += http://www.nexedi.org/static/packages/source/
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
module = kumofs module = kumofs
...@@ -41,6 +43,7 @@ mode = 0644 ...@@ -41,6 +43,7 @@ mode = 0644
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -55,3 +58,80 @@ signature-certificate-list = ...@@ -55,3 +58,80 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
erp5.recipe.cmmiforcei686 = 0.1.3
hexagonit.recipe.cmmi = 1.6
meld3 = 0.6.10
rdiff-backup = 1.0.5
slapos.cookbook = 0.71.1
slapos.recipe.template = 2.4.2
# Required by:
# slapos.core==0.33.1
Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# Required by:
# slapos.cookbook==0.71.1
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.71.1
# slapos.core==0.33.1
# xml-marshaller==0.9.7
lxml = 3.1beta1
# Required by:
# slapos.cookbook==0.71.1
netaddr = 0.7.10
# Required by:
# slapos.core==0.33.1
netifaces = 0.8
# Required by:
# slapos.cookbook==0.71.1
pytz = 2012j
# Required by:
# slapos.cookbook==0.71.1
# slapos.core==0.33.1
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.71.1
slapos.core = 0.33.1
# Required by:
# slapos.core==0.33.1
supervisor = 3.0b1
# Required by:
# slapos.cookbook==0.71.1
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.33.1
zope.interface = 4.0.3
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = wizard.php
table_name = blogs
constraint = `id`>0
\ No newline at end of file
*** lifetype/install/dbschemas.properties.php 2006-12-25 14:30:00.000000000 +0000
--- lifetype_formysql5/install/dbschemas.properties.php 2012-04-04 16:36:54.000000000 +0000
***************
*** 2,9 ****
$Tables["articles"]["schema"] = "
id I(10) UNSIGNED NOTNULL AUTOINCREMENT PRIMARY,
! date T(14) NOTNULL,
! modification_date T(14) NOTNULL,
user_id I(10) UNSIGNED NOTNULL DEFAULT '0',
blog_id I(10) UNSIGNED NOTNULL DEFAULT '0',
status I(5) NOTNULL DEFAULT 1,
--- 2,9 ----
$Tables["articles"]["schema"] = "
id I(10) UNSIGNED NOTNULL AUTOINCREMENT PRIMARY,
! date T(6) NOTNULL,
! modification_date T(6) NOTNULL,
user_id I(10) UNSIGNED NOTNULL DEFAULT '0',
blog_id I(10) UNSIGNED NOTNULL DEFAULT '0',
status I(5) NOTNULL DEFAULT 1,
***************
*** 30,36 ****
name C(255) NOTNULL DEFAULT '',
url C(255) NOTNULL DEFAULT '',
blog_id I(10) UNSIGNED NOTNULL DEFAULT '0',
! last_modification T(14) NOTNULL,
in_main_page I1(1) NOTNULL DEFAULT '1',
parent_id I(10) NOTNULL DEFAULT '0',
description TEXT NOTNULL DEFAULT '',
--- 30,36 ----
name C(255) NOTNULL DEFAULT '',
url C(255) NOTNULL DEFAULT '',
blog_id I(10) UNSIGNED NOTNULL DEFAULT '0',
! last_modification T(6) NOTNULL,
in_main_page I1(1) NOTNULL DEFAULT '1',
parent_id I(10) NOTNULL DEFAULT '0',
description TEXT NOTNULL DEFAULT '',
***************
*** 51,57 ****
blog_id I(10) UNSIGNED NOTNULL DEFAULT 0,
topic TEXT NOTNULL,
text X,
! date T(14) NOTNULL,
user_id I(10) DEFAULT '0',
user_email C(255) DEFAULT '',
user_url C(255) DEFAULT '',
--- 51,57 ----
blog_id I(10) UNSIGNED NOTNULL DEFAULT 0,
topic TEXT NOTNULL,
text X,
! date T(6) NOTNULL,
user_id I(10) DEFAULT '0',
user_email C(255) DEFAULT '',
user_url C(255) DEFAULT '',
***************
*** 96,103 ****
mangled_blog varchar(50) NOTNULL DEFAULT '',
status I(4) NOTNULL DEFAULT '1',
show_in_summary I(4) NOTNULL DEFAULT '1',
! create_date T(14) NOTNULL,
! last_update_date T(14) NOTNULL,
num_posts I(10) NOTNULL DEFAULT '0',
num_comments I(10) NOTNULL DEFAULT '0',
num_trackbacks I(10) NOTNULL DEFAULT '0',
--- 96,103 ----
mangled_blog varchar(50) NOTNULL DEFAULT '',
status I(4) NOTNULL DEFAULT '1',
show_in_summary I(4) NOTNULL DEFAULT '1',
! create_date T(6) NOTNULL,
! last_update_date T(6) NOTNULL,
num_posts I(10) NOTNULL DEFAULT '0',
num_comments I(10) NOTNULL DEFAULT '0',
num_trackbacks I(10) NOTNULL DEFAULT '0',
***************
*** 118,124 ****
description TEXT NOTNULL,
blog_id I(10) UNSIGNED NOTNULL DEFAULT '0',
rss_feed C(255) NOTNULL DEFAULT '',
! date T(14) NOTNULL,
properties TEXT NOTNULL DEFAULT '',
INDEX blog_id (blog_id),
INDEX category_id (category_id)
--- 118,124 ----
description TEXT NOTNULL,
blog_id I(10) UNSIGNED NOTNULL DEFAULT '0',
rss_feed C(255) NOTNULL DEFAULT '',
! date T(6) NOTNULL,
properties TEXT NOTNULL DEFAULT '',
INDEX blog_id (blog_id),
INDEX category_id (category_id)
***************
*** 129,135 ****
id I(10) NOTNULL AUTOINCREMENT PRIMARY,
name varchar(100) NOTNULL DEFAULT '',
blog_id I(10) NOTNULL DEFAULT '0',
! last_modification T(14) NOTNULL,
properties TEXT NOTNULL DEFAULT '',
num_links I(10) NOTNULL DEFAULT '0',
INDEX blog_id (blog_id)
--- 129,135 ----
id I(10) NOTNULL AUTOINCREMENT PRIMARY,
name varchar(100) NOTNULL DEFAULT '',
blog_id I(10) NOTNULL DEFAULT '0',
! last_modification T(6) NOTNULL,
properties TEXT NOTNULL DEFAULT '',
num_links I(10) NOTNULL DEFAULT '0',
INDEX blog_id (blog_id)
***************
*** 151,157 ****
article_id I(10) NOTNULL DEFAULT '0',
blog_id I(10) NOTNULL DEFAULT '0',
hits I(10) DEFAULT '1',
! last_date T(14),
INDEX article_id (article_id),
INDEX blog_id_article_id (blog_id, article_id)
";
--- 151,157 ----
article_id I(10) NOTNULL DEFAULT '0',
blog_id I(10) NOTNULL DEFAULT '0',
hits I(10) DEFAULT '1',
! last_date T(6),
INDEX article_id (article_id),
INDEX blog_id_article_id (blog_id, article_id)
";
***************
*** 168,174 ****
status I(4) NOTNULL DEFAULT 1,
resource_picture_id I(10) NOTNULL DEFAULT 0,
site_admin I(10) NOTNULL DEFAULT '0',
! last_login T(14),
UNIQUE user (user)
";
$Tables["users"]["options"] = "TYPE=MyISAM";
--- 168,174 ----
status I(4) NOTNULL DEFAULT 1,
resource_picture_id I(10) NOTNULL DEFAULT 0,
site_admin I(10) NOTNULL DEFAULT '0',
! last_login T(6),
UNIQUE user (user)
";
$Tables["users"]["options"] = "TYPE=MyISAM";
***************
*** 208,214 ****
reg_exp X,
blog_id I(10) NOTNULL DEFAULT '0',
reason X,
! date T(14) NOTNULL,
INDEX blog_id (blog_id)
";
$Tables["filtered_content"]["options"] = "TYPE=MyISAM";
--- 208,214 ----
reg_exp X,
blog_id I(10) NOTNULL DEFAULT '0',
reason X,
! date T(6) NOTNULL,
INDEX blog_id (blog_id)
";
$Tables["filtered_content"]["options"] = "TYPE=MyISAM";
***************
*** 216,222 ****
$Tables["host_blocking_rules"]["schema"] = "
id I(10) NOTNULL AUTOINCREMENT PRIMARY,
reason X,
! date T(14) NOTNULL,
blog_id I(10) NOTNULL DEFAULT '0',
block_type I(1) DEFAULT '1',
list_type I(1) DEFAULT '1',
--- 216,222 ----
$Tables["host_blocking_rules"]["schema"] = "
id I(10) NOTNULL AUTOINCREMENT PRIMARY,
reason X,
! date T(6) NOTNULL,
blog_id I(10) NOTNULL DEFAULT '0',
block_type I(1) DEFAULT '1',
list_type I(1) DEFAULT '1',
***************
*** 232,238 ****
owner_id I(10) NOTNULL DEFAULT '0',
album_id I(10) NOTNULL DEFAULT '0',
description X,
! date T(14) NOTNULL,
flags I(10) DEFAULT '0',
resource_type I(3) DEFAULT NULL,
file_path C(255) DEFAULT '',
--- 232,238 ----
owner_id I(10) NOTNULL DEFAULT '0',
album_id I(10) NOTNULL DEFAULT '0',
description X,
! date T(6) NOTNULL,
flags I(10) DEFAULT '0',
resource_type I(3) DEFAULT NULL,
file_path C(255) DEFAULT '',
***************
*** 257,263 ****
name C(255) NOTNULL DEFAULT '',
flags I(10) NOTNULL DEFAULT '0',
parent_id I(10) NOTNULL DEFAULT '0',
! date T(14) NOTNULL,
properties TEXT NOTNULL DEFAULT '',
show_album I1(1) DEFAULT 1,
normalized_description TEXT NOTNULL DEFAULT '',
--- 257,263 ----
name C(255) NOTNULL DEFAULT '',
flags I(10) NOTNULL DEFAULT '0',
parent_id I(10) NOTNULL DEFAULT '0',
! date T(6) NOTNULL,
properties TEXT NOTNULL DEFAULT '',
show_album I1(1) DEFAULT 1,
normalized_description TEXT NOTNULL DEFAULT '',
***************
*** 308,314 ****
field_type I(2) NOTNULL DEFAULT '1',
field_values TEXT NOTNULL DEFAULT '',
blog_id I(10) NOTNULL DEFAULT '0',
! date T(14),
searchable I1(1) DEFAULT 1,
hidden I1(1) DEFAULT 1,
INDEX blog_id (blog_id)
--- 308,314 ----
field_type I(2) NOTNULL DEFAULT '1',
field_values TEXT NOTNULL DEFAULT '',
blog_id I(10) NOTNULL DEFAULT '0',
! date T(6),
searchable I1(1) DEFAULT 1,
hidden I1(1) DEFAULT 1,
INDEX blog_id (blog_id)
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
lifetype-patch
patch
extends =
../../stack/lamp.cfg
[lifetype-patch]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/lifetype_for_mysql5.patch
md5sum = c52bea61ea452b9f3caa82426a5819e5
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = lifetype_for_mysql5.patch
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://garr.dl.sourceforge.net/project/lifetype/lifetype/lifetype-1.2.11/lifetype-1.2.11.tar.bz2
md5sum = 50e329dfdb6c5876c0600abe30a379fb
strip-top-level-dir = true
[patch]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds= patch -d ${application:location} -p1 < ${lifetype-patch:location}/${lifetype-patch:filename}
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
# Exactly the same as software.cfg, but fetch the slapos.cookbook and
# slapos.toolbox from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
# You'll need to run buildout twice for this profile.
[buildout]
extends =
../../component/git/buildout.cfg
software.cfg
parts +=
# Development parts
slapos.cookbook-repository
slapos.core-repository
slapos.toolbox-repository
slapos.recipe.maarch-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.core-repository
${:parts-directory}/slapos.toolbox-repository
${:parts-directory}/slapos.recipe.maarch-repository
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[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
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
git-executable = ${git:location}/bin/git
[slapos.recipe.maarch-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.recipe.maarch.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link
# Unpin versions, in case they have been pinned in software.cfg
[versions]
slapos.cookbook =
slapos.toolbox =
slapos.core =
slapos.recipe.maarch =
...@@ -9,7 +9,7 @@ db_dbname = $${postgres-urlparse:path} ...@@ -9,7 +9,7 @@ db_dbname = $${postgres-urlparse:path}
db_username = $${postgres-urlparse:username} db_username = $${postgres-urlparse:username}
db_password = $${postgres-urlparse:password} db_password = $${postgres-urlparse:password}
language = en language = en
php_ini_dir = $${directory:php-ini-dir} 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}
[buildout] [buildout]
extends = extends =
../../component/git/buildout.cfg
../../stack/lapp/buildout.cfg ../../stack/lapp/buildout.cfg
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.recipe.maarch-repository
# += since we need rdiff-backup and friends # += since we need rdiff-backup and friends
parts += parts +=
slapos-cookbook slapos-cookbook
...@@ -11,34 +18,45 @@ parts += ...@@ -11,34 +18,45 @@ parts +=
eggs eggs
instance instance
instance-apache-php instance-apache-php
slapos.cookbook-repository
slapos.recipe.maarch-repository
check-recipe
#----------------
#--
#-- Main application part
#-- XXX provide a better URL
[application] [versions]
url = http://downloads.sourceforge.net/project/maarch/Maarch%20Entreprise/MaarchEntreprise-1.3.zip?r=http%3A%2F%2Fwww.maarch.org%2Ftelecharger&ts=1347961624&use_mirror=ignum slapos.cookbook =
md5sum = 5c2c859dee9d0dde3ba959474fd5fc86 slapos.recipe.maarch =
[slapos.recipe.maarch-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.recipe.maarch.git
branch = master
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]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link
#---------------- #----------------
#-- #--
#-- We don't need this static configuration file. #-- Main application part
#-- An empty file is provided because it is required by the lapp stack.
#-- #--
[application-template] [application]
recipe = slapos.recipe.download url = http://downloads.sourceforge.net/project/maarch/Maarch%20Entreprise/MaarchEntreprise-1.3.zip
url = ${:_profile_base_location_}/config.php.in md5sum = 5c2c859dee9d0dde3ba959474fd5fc86
md5sum = d41d8cd98f00b204e9800998ecf8427e
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = config.php
#---------------- #----------------
...@@ -54,7 +72,7 @@ part-list = maarch-configuration ...@@ -54,7 +72,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 = 28f6ad42b73806901ac2cd4ec563d73b md5sum = 22d8e4d8bb1a5b1c42c6cfb42ee490a0
mode = 0644 mode = 0644
...@@ -71,6 +89,6 @@ install_cmd = ...@@ -71,6 +89,6 @@ install_cmd =
${:pear} info maarch/CLITools-0.3.1 >/dev/null || ${:pear} install maarch/CLITools-0.3.1 ${:pear} info maarch/CLITools-0.3.1 >/dev/null || ${:pear} install maarch/CLITools-0.3.1
${:pear} info MIME_Type >/dev/null || ${:pear} install MIME_Type ${:pear} info MIME_Type >/dev/null || ${:pear} install MIME_Type
#----------------
#----------------
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
file_token = config_inc.php
delete = admin
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://downloads.sourceforge.net/project/mantisbt/mantis-stable/1.2.10/mantisbt-1.2.10.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmantisbt%2F&ts=1334735181&use_mirror=freefr
md5sum = f653408a24f76723929567cba606861c
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
...@@ -66,3 +66,20 @@ url = ${:_profile_base_location_}/instance-recover.cfg ...@@ -66,3 +66,20 @@ url = ${:_profile_base_location_}/instance-recover.cfg
md5sum = a8df936b6abf82d0d798b83ddfebdc8a md5sum = a8df936b6abf82d0d798b83ddfebdc8a
output = ${buildout:directory}/template-recover.cfg output = ${buildout:directory}/template-recover.cfg
mode = 0644 mode = 0644
[networkcache]
# Test agent
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
\ No newline at end of file
...@@ -86,6 +86,7 @@ zope.interface = 3.8.0 ...@@ -86,6 +86,7 @@ zope.interface = 3.8.0
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -100,3 +101,16 @@ signature-certificate-list = ...@@ -100,3 +101,16 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
...@@ -6,6 +6,7 @@ extends = ...@@ -6,6 +6,7 @@ extends =
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
# Test agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -20,3 +21,16 @@ signature-certificate-list = ...@@ -20,3 +21,16 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://freefr.dl.sourceforge.net/project/moodle/Moodle/stable22/moodle-2.2.tgz
md5sum = abf0cb8c0c4c482e9881173d1e501bb3
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
file_token = install.log
delete = setup
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://downloads.sourceforge.net/project/moregroupware/moregroupware/0.7.4/moregroupware-core-0.7.4.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmoregroupware%2F&ts=1319116756&use_mirror=sunet
md5sum = b30523ab7dd2bf5003cb897be07201b7
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = user
constraint = `id`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://freefr.dl.sourceforge.net/project/mybloggie/mybloggie/myBloggie%202.1.4/mybloggie214.zip
md5sum = 0159c00829d2b20f32ce661d996870bb
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
...@@ -108,6 +108,7 @@ zope.interface = 3.8.0 ...@@ -108,6 +108,7 @@ zope.interface = 3.8.0
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
# Test agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -122,3 +123,16 @@ signature-certificate-list = ...@@ -122,3 +123,16 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = setup.php
table_name = lists
constraint = `id`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://mytinytodo.googlecode.com/files/mytinytodo-v1.4.2.zip
md5sum = 562bcd9f04079f8ca16f767e029d22bd
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install.php
table_name = user
constraint = `userid`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.phpevolution.net/download/ne/ne-3-0-2.tar.gz
md5sum = 5f1477669eb94df4094badbf3f0e4aa1
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
# -*- coding: utf-8 -*-
import sys
import os
def setup(args):
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
config_php = os.path.join(htdocs, "config.php")
install_php = os.path.join(htdocs, "install.php")
install_sql = os.path.join(htdocs, "install.sql")
os.chmod(config_php, 0444)
os.remove(install_php)
os.remove(install_sql)
if __name__ == '__main__':
setup(sys.argv[1:])
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
#delete = install.sql, install.php
#chmod = config.php
#mode = 0444
table_name = member
constraint = `mnumber`=1
script = ${configure-script:location}/${configure-script:filename}
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
configure-script
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://downloads.sourceforge.net/project/nucleuscms/1.%20Nucleus%20Core/Nucleus%20v3.64/nucleus3.64.zip?r=&ts=1319307841&use_mirror=freefr
md5sum = f38d23cba814e6aa05e5d82ea43cb3fd
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[configure-script]
recipe = hexagonit.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-nucleus.py
md5sum = c052f761180a6ee55af1e531e4c38b4b
filename = configure-nucleus.py
download-only = True
mode = 0744
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
# -*- coding: utf-8 -*-
import sys
import os
def setup(args):
'''
Freeglobes doesn't put the good url of the application
this script ensure the url is the good one
'''
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
htpasswd_file = os.path.join(htdocs, "sites/default/.htpasswd")
document_htaccess = os.path.join(htdocs, "sites/default/documents/.htaccess")
edi_htaccess = os.path.join(htdocs, "sites/default/edi/.htaccess")
era_htaccess = os.path.join(htdocs, "sites/default/era/.htaccess")
f1 = open(htpasswd_file, 'w+')
f1.write("admin:OA9zt069mtqn6") #admin/admin
f1.close()
os.chmod(htpasswd_file, 0644)
htaccess_content = "AuthUserFile %ssites/default/.htpasswd\nAuthName “OpenEMR Protected Page”\nAuthType Basic\nRequire valid-user" % htdocs
for f in [document_htaccess, edi_htaccess, era_htaccess]:
file = open(f, 'w+')
file.write(htaccess_content)
file.close()
os.chmod(f, 0644)
if __name__ == '__main__':
setup(sys.argv[1:])
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
configure-script
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://downloads.sourceforge.net/project/openemr/OpenEMR%20Current/4.1.0/openemr-4.1.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopenemr%2F&ts=1319625464&use_mirror=freefr
md5sum = 4311688c25e991825584ad529b553396
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[configure-script]
recipe = hexagonit.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-openemr.py
md5sum = cfb305e0fd2b996f8bfe4302dd6b6288
filename = configure-openemr.py
download-only = True
mode = 0744
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = utilisateur
constraint = `id`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.ouapi.org/downloads/current_version.zip
md5sum = adc5d29910450fbd75427cd720e3291c
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://c702355.r55.cf3.rackcdn.com/releases/owncloud-3.0.0.tar.bz2
md5sum = 0a48bf2b1ac10c11c4b7f6fd1de9a5d9
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = admin
constraint = (`admin_login`='admin' AND `admin_passwd`<>'21232f297a57a5a743894a0e4a801fc3') OR (`admin_id`>1)
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.phenix.gapi.fr/download/phenix_501.zip
md5sum = 0538d2146f2cb01b24ae692928d8e92e
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install, modules/api/install, modules/bms/install, modules/mailchimp/install, modules/recurringinvoices/install, module/sample/install
table_name = modules
constraint = `id`>=5
diff -crB phpbms/install/createtables.sql phpbms_timestamp/install/createtables.sql
*** phpbms/install/createtables.sql 2009-12-31 20:36:45.000000000 +0000
--- phpbms_timestamp/install/createtables.sql 2011-11-03 12:47:29.000000000 +0000
***************
*** 36,42 ****
createdby int(11) NOT NULL default '0',
modifiedby int(11) default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
! modifieddate timestamp(14) NOT NULL,
`roleid` VARCHAR(64),
PRIMARY KEY (id),
UNIQUE KEY (`uuid`)
--- 36,42 ----
createdby int(11) NOT NULL default '0',
modifiedby int(11) default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
! modifieddate timestamp NOT NULL,
`roleid` VARCHAR(64),
PRIMARY KEY (id),
UNIQUE KEY (`uuid`)
***************
*** 116,122 ****
createdby int(11) NOT NULL default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
modifiedby int(11) default '0',
! modifieddate timestamp(14) NOT NULL,
inherint tinyint(1) NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY (`uuid`),
--- 116,122 ----
createdby int(11) NOT NULL default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
modifiedby int(11) default '0',
! modifieddate timestamp NOT NULL,
inherint tinyint(1) NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY (`uuid`),
***************
*** 267,273 ****
createdby int(11) NOT NULL default '0',
modifiedby int(11) default '0',
lastlogin datetime default NULL,
! modifieddate timestamp(14) NOT NULL,
email varchar(128) default '',
phone varchar(32) default '',
department varchar(128) default '',
--- 267,273 ----
createdby int(11) NOT NULL default '0',
modifiedby int(11) default '0',
lastlogin datetime default NULL,
! modifieddate timestamp NOT NULL,
email varchar(128) default '',
phone varchar(32) default '',
department varchar(128) default '',
***************
*** 318,324 ****
`createdby` int(11) default '0',
`creationdate` datetime default '0000-00-00 00:00:00',
`modifiedby` int(11) default '0',
! `modifieddate` timestamp(14) NOT NULL,
`roleid` VARCHAR(64),
`custom1` DOUBLE,
`custom2` DOUBLE,
--- 318,324 ----
`createdby` int(11) default '0',
`creationdate` datetime default '0000-00-00 00:00:00',
`modifiedby` int(11) default '0',
! `modifieddate` timestamp NOT NULL,
`roleid` VARCHAR(64),
`custom1` DOUBLE,
`custom2` DOUBLE,
***************
*** 340,346 ****
`createdby` int(11) default '0',
`creationdate` datetime default '0000-00-00 00:00:00',
`modifiedby` int(11) default '0',
! `modifieddate` timestamp(14) NOT NULL,
PRIMARY KEY (`id`),
KEY `therecord` (`recordid`),
KEY `thetable` (`tabledefid`),
--- 340,346 ----
`createdby` int(11) default '0',
`creationdate` datetime default '0000-00-00 00:00:00',
`modifiedby` int(11) default '0',
! `modifieddate` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `therecord` (`recordid`),
KEY `thetable` (`tabledefid`),
diff -crB phpbms/modules/bms/install/createtables.sql phpbms_timestamp/modules/bms/install/createtables.sql
*** phpbms/modules/bms/install/createtables.sql 2010-01-06 00:06:44.000000000 +0000
--- phpbms_timestamp/modules/bms/install/createtables.sql 2011-11-03 17:26:20.000000000 +0000
***************
*** 66,72 ****
description text,
createdby int(11) default NULL,
modifiedby int(11) default NULL,
! modifieddate timestamp(14) NOT NULL,
creationdate datetime default NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
--- 66,72 ----
description text,
createdby int(11) default NULL,
modifiedby int(11) default NULL,
! modifieddate timestamp NOT NULL,
creationdate datetime default NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
***************
*** 171,177 ****
createdby int(11) NOT NULL default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
modifiedby int(11) default NULL,
! modifieddate timestamp(14) NOT NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
`custom3` DATETIME,
--- 171,177 ----
createdby int(11) NOT NULL default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
modifiedby int(11) default NULL,
! modifieddate timestamp NOT NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
`custom3` DATETIME,
***************
*** 216,222 ****
`createdby` int(11) NOT NULL default 0,
`creationdate` datetime NOT NULL default '0000-00-00 00:00:00',
`modifiedby` int(11) default NULL,
! `modifieddate` timestamp(14) NOT NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
`custom3` DATETIME,
--- 216,222 ----
`createdby` int(11) NOT NULL default 0,
`creationdate` datetime NOT NULL default '0000-00-00 00:00:00',
`modifiedby` int(11) default NULL,
! `modifieddate` timestamp NOT NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
`custom3` DATETIME,
***************
*** 240,246 ****
isprepackaged tinyint(4) NOT NULL default '0',
packagesperitem double default NULL,
modifiedby int(11) default NULL,
! modifieddate timestamp(14) NOT NULL,
partname varchar(128) default NULL,
partnumber varchar(32) NOT NULL default '',
status varchar(32) NOT NULL default 'In Stock',
--- 240,246 ----
isprepackaged tinyint(4) NOT NULL default '0',
packagesperitem double default NULL,
modifiedby int(11) default NULL,
! modifieddate timestamp NOT NULL,
partname varchar(128) default NULL,
partnumber varchar(32) NOT NULL default '',
status varchar(32) NOT NULL default 'In Stock',
***************
*** 283,289 ****
createdby int(11) NOT NULL default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
modifiedby int(11) default NULL,
! modifieddate timestamp(14) NOT NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
`custom3` DATETIME,
--- 283,289 ----
createdby int(11) NOT NULL default '0',
creationdate datetime NOT NULL default '0000-00-00 00:00:00',
modifiedby int(11) default NULL,
! modifieddate timestamp NOT NULL,
`custom1` DOUBLE,
`custom2` DOUBLE,
`custom3` DATETIME,
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
phpbms-patch
patch
extends =
../../stack/lamp.cfg
[phpbms-patch]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/phpbms_for_mysql5.patch
md5sum = ddf323ac00e9e486cea8b8cc4277e065
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = phpbms_for_mysql5.patch
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.phpbms.org/files/phpbms/phpbms-0.98.tar.gz
md5sum = 3907c5115cf9acaab7cb5d22ce0534b7
[patch]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds= patch -d ${application:location} -p1 < ${phpbms-patch:location}/${phpbms-patch:filename}
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/settings.php.in
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = settings.php
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
<?php [
mysql_server = "%(mysql_host)s"
mysql_database = "%(mysql_database)s"
mysql_user = "%(mysql_user)s"
mysql_userpass = "%(mysql_password)s"
mysql_pconnect = "true"
end] ?>
# -*- coding: utf-8 -*-
import sys
import os
import MySQLdb
def setup(args):
renamed, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
#base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args
sql_file = os.path.join(htdocs, "scripts/phpfin.sql")
try:
conn = MySQLdb.connect (host = mysql_host,
user = mysql_user,
passwd = mysql_password,
db = mysql_database)
cursor = conn.cursor ()
with open(sql_file, 'r') as f:
sql_script = f.read()
cursor.execute(sql_script)
conn.close()
except:
return
if __name__ == '__main__':
setup(sys.argv[1:])
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = **
constraint = 1
script = ${configure-script:location}/${configure-script:filename}
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
configure-script
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://garr.dl.sourceforge.net/project/phpfin/phpfin/phpfinV1.00%20Free/phpfinfree1_0.zip
md5sum = 06f5ef5205c492e38ecbb6159f5417e4
[configure-script]
recipe = hexagonit.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-phpfin.py
filename = configure-phpfin.py
download-only = True
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/connection.inc.in
#md5sum = Student may put here md5sum of this file, this is good idea
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = connection.inc
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
<?php
$databaseinfo = mysql_connect("%(mysql_host)s", "%(mysql_user)s", "%(mysql_password)s") or die ("Could not connect to server");
mysql_select_db("%(mysql_database)s");
//Make sure that superglobals are loaded for PHP5 compatibility
include('superglobals.inc.php');
?>
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install.php
table_name = users
constraint = `uid`>0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://flomoto.free.fr/phpip/phpip_11-05-11.tar.gz
md5sum = 94fe615f61fbb5ef0fcbf60a44ac5093
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/database.php.in
#md5sum = Student may put here md5sum of this file, this is good idea
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = includes/database.php
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2006 Michael Earls |
| |
| 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 2 |
| 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. |
+-------------------------------------------------------------------------+
| - phpIP - http://www.phpip.net/ |
+-------------------------------------------------------------------------+
*/
// Create database connection and select database
mysql_select_db('%(mysql_database)s', mysql_pconnect('%(mysql_host)s','%(mysql_user)s','%(mysql_password)s')) or die (mysql_error());
?>
...@@ -22,7 +22,7 @@ mode = 0644 ...@@ -22,7 +22,7 @@ mode = 0644
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.bz2?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1300959842&use_mirror=sunet url = http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.bz2
md5sum = cb7a632fb4f10a180ead15f7f90087f1 md5sum = cb7a632fb4f10a180ead15f7f90087f1
[application-template] [application-template]
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = slapos.recipe.build
url = http://downloads.sourceforge.net/project/phpmybackup/phpMyBackupPro/phpMyBackupPro%202.2/phpMyBackupPro-2.2.zip?r=&ts=1319486570&use_mirror=freefr
md5sum = 577d9189195f358017e5910f3699b88e
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir + "/phpMyBackupPro", "${buildout:parts-directory}/${:_buildout_section_name_}")
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install/update.php
table_name = faquserlogin
constraint = `login`='anonymous'
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.phpmyfaq.de/download/phpmyfaq-2.7.0.zip
md5sum = 2a19da49afe32c92f207339ff66d673a
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
...@@ -16,7 +16,7 @@ extends = ...@@ -16,7 +16,7 @@ extends =
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://phpnuke.org/modules/Release/files/phpnuke-release-8.2.4.tar.gz url = http://phpnuke.org/modules/Release/files/phpnuke-release-8.2.4.tar.gz
md5sum = 0f31895b141f50a5f2e6f083b0222fe2 md5sum = d448586c651c811a137280b435c4e05c
extract-directory = html extract-directory = html
[application-template] [application-template]
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = slapos.recipe.build
url = http://downloads.sourceforge.net/project/phprojekt/PHProjekt%206.0/6.0.6/phprojekt-6.0.6.zip?r=http%3A%2F%2Fwww.google.fr%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3Ddownload%2520phprojekt%26source%3Dweb%26cd%3D4%26ved%3D0CD4QFjAD%26url%3Dhttp%253A%252F%252Fsourceforge.net%252Fprojects%252Fphprojekt%252Ffiles%252Flatest%252Fdownload%26ei%3DeWuyToW3HMWEOqubkYQC%26usg%3DAFQjCNG0ZO1Bp-VS5t4X2pI9QKAmlovXpg&ts=1320315780&use_mirror=freefr
md5sum = d139b3d9b791a39460e9a780dece7779
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "${buildout:parts-directory}/${:_buildout_section_name_}")
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
*** pixelpost1.7.3/includes/create_tables.php 2012-04-07 11:57:49.000000000 +0000
--- pixelpost_for_mysql5/includes/create_tables.php 2012-04-07 12:01:30.000000000 +0000
***************
*** 123,129 ****
// Make future upgrade scripts easier by adding a version table
mysql_query("CREATE TABLE IF NOT EXISTS `{$prefix}version` (
`id` INT(10) unsigned NOT NULL auto_increment,
! `upgrade_date` TIMESTAMP(14) NOT NULL,
`version` FLOAT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `version` (`version`))")or die("MySQL Error: ". mysql_error());
--- 123,129 ----
// Make future upgrade scripts easier by adding a version table
mysql_query("CREATE TABLE IF NOT EXISTS `{$prefix}version` (
`id` INT(10) unsigned NOT NULL auto_increment,
! `upgrade_date` TIMESTAMP NOT NULL,
`version` FLOAT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `version` (`version`))")or die("MySQL Error: ". mysql_error());
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
pixelpost-patch
patch
extends =
../../stack/lamp.cfg
[pixelpost-patch]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/pixelpost_for_mysql5.patch
md5sum = 100883ebbe4973883a710996b91f5d23
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = pixelpost_for_mysql5.patch
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.pixelpost.org/releases/pixelpost_v1.7.3.zip
md5sum = 457f50312ca6dc682065ce3dbfda1a4f
[patch]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds= patch -d ${application:location} -p1 < ${pixelpost-patch:location}/${pixelpost-patch:filename}
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[buildout] [buildout]
parts = parts =
symlinks
publish publish
postgres-instance postgres-instance
postgres-promise
# Define egg directories to be the one from Software Release # Define egg directories to be the one from Software Release
...@@ -12,58 +12,64 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -12,58 +12,64 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true 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}
[directories] [directories]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc etc = $${buildout:directory}/etc
services = $${directories:etc}/run/ services = $${directories:etc}/service
promises = $${directories:etc}/promise/ promises = $${directories:etc}/promise
var = $${buildout:directory}/var var = $${buildout:directory}/var
[symlinks] #----------------
recipe = cns.recipe.symlink #--
symlink_target = $${directories:bin} #-- Creates a Postgres cluster, configuration files, and a database.
symlink_base = ${postgresql:location}/bin
[postgres-instance] [postgres-instance]
# create cluster, configuration files and a database
recipe = slapos.cookbook:postgres recipe = slapos.cookbook:postgres
# Options # Options
ipv6_host = $${instance-parameters:ipv6} ipv6 = $${instance-parameters:ipv6}
ipv4_host = $${slap-network-information:local-ipv4} ipv4 = $${instance-parameters:ipv4}
user = user ipv6_random = $${instance-parameters:ipv6_random}
superuser = postgres
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.
pgdata-directory = $${directories:var}/data pgdata-directory = $${directories:var}/data
bin = ${postgresql:location}/bin
services = $${directories:services} services = $${directories:services}
bin = $${directories:bin}
#----------------
#--
#-- Deploy promise scripts.
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/postgres
hostname = $${instance-parameters:ipv6_random}
port = $${postgres-instance:port}
#----------------
#--
#-- Publish instance parameters.
[publish] [publish]
recipe = slapos.cookbook:publishurl recipe = slapos.cookbook:publish
url = $${postgres-instance:url} url = $${postgres-instance:url}
[slap-connection] #----------------
# part to migrate to new - separated words #--
computer-id = $${slap_connection:computer_id} #-- Fetches parameters defined in SlapOS Master for this instance
partition-id = $${slap_connection:partition_id}
server-url = $${slap_connection:server_url} [instance-parameters]
software-release-url = $${slap_connection:software_release_url} recipe = slapos.cookbook:slapconfiguration
key-file = $${slap_connection:key_file} computer = $${slap-connection:computer-id}
cert-file = $${slap_connection:cert_file} partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
...@@ -5,21 +5,60 @@ extends = ...@@ -5,21 +5,60 @@ extends =
../../component/postgresql/buildout.cfg ../../component/postgresql/buildout.cfg
parts = parts =
eggs
slapos-cookbook slapos-cookbook
instance-template instance
postgresql postgresql92
[instance-template]
#----------------
#-- Instance-level buildout profiles.
[instance]
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}/template.cfg output = ${buildout:directory}/instance.cfg
#md5sum = md5sum = dfba09a7cccefc5d92d455aaed2c1835
mode = 0644 mode = 0644
[eggs] [versions]
recipe = zc.recipe.egg Jinja2 = 2.6
eggs = Werkzeug = 0.8.3
cns.recipe.symlink buildout-versions = 1.7
cns.recipe.symlink = 0.2.3
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
lxml = 3.1beta1
meld3 = 0.6.10
netaddr = 0.7.10
pytz = 2012j
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.33.1
Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# Required by:
# slapos.core==0.33.1
netifaces = 0.8
# Required by:
# cns.recipe.symlink==0.2.3
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.33.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.33.1
zope.interface = 4.0.3
...@@ -16,7 +16,7 @@ extends = ...@@ -16,7 +16,7 @@ extends =
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://www.prestashop.com/download/prestashop_1.4.5.1.zip url = http://www.prestashop.com/download/prestashop_1.4.5.1.zip
md5sum = 49197c04bcf9523ef9deb6d691615d84 md5sum = 6c0dcd301abe992a19dea1737d0adbe9
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install
table_name = pmsusers
constraint = `user_id`>0
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.projelead.com/downloads/Package%20installation/ProjeLead2_0.zip
md5sum = ec06dfa8f016ecc60a59e4c4a36efd94
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
\ No newline at end of file
...@@ -16,7 +16,7 @@ extends = ...@@ -16,7 +16,7 @@ extends =
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://punbb.informer.com/download/punbb-1.3.6.tar.gz url = http://punbb.informer.com/download/punbb-1.3.6.tar.gz
md5sum = 9454ef78101028fd5acf2731f77545c2 md5sum = 7bb3f570cb6a61f8c3e3e25e750fd29d
[application-template] [application-template]
recipe = slapos.recipe.download recipe = slapos.recipe.download
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://opensolution.org/download,en,18.html?sFile=Quick.Cart/Quick.Cart_v5.1.zip
md5sum = c710d772b9b253c9cbba78dc4d619865
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = false
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://opensolution.org/download,en,18.html?sFile=Quick.Cms/Quick.Cms_v4.1.zip
md5sum = b21ad5aaf0a367a0e7edf19f714e893a
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = false
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install.php
table_name = Member
constraint = `ID`>0
...@@ -11,12 +11,11 @@ parts = ...@@ -11,12 +11,11 @@ parts =
extends = extends =
../../stack/lamp.cfg ../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.5.tar.gz url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.6.tar.gz
md5sum = de6ab0146c27bbc72287670e0697e2ba md5sum = 6490d9fe5b72911ba5bda314cfc2d9dc
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
...@@ -32,89 +31,16 @@ mode = 0644 ...@@ -32,89 +31,16 @@ mode = 0644
[instance-recipe-egg] [instance-recipe-egg]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = ${instance-recipe:egg} python = python2.7
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions] [versions]
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010 zc.buildout = 1.5.3-dev-SlapOS-010
slapos.cookbook = 0.32
Jinja2 = 2.6
MySQL-python = 1.2.3
Werkzeug = 0.8.1
apache-libcloud = 0.5.2
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.7
plone.recipe.command = 1.1
slapos.cookbook = 0.34
slapos.recipe.build = 0.7
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.2
slapos.toolbox = 0.10
# Required by:
# slapos.core==0.18
# slapos.toolbox==0.10
Flask = 0.8
# Required by:
# slapos.cookbook==0.34
PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.cookbook==0.34
# slapos.core==0.18
# slapos.toolbox==0.10
# xml-marshaller==0.9.7
lxml = 2.3.1
# Required by:
# slapos.cookbook==0.34
netaddr = 0.7.6
# Required by:
# slapos.core==0.18
netifaces = 0.5
# Required by:
# slapos.toolbox==0.10
paramiko = 1.7.7.1
# Required by:
# slapos.toolbox==0.10
psutil = 0.3.0
# Required by:
# slapos.cookbook==0.34
# slapos.core==0.18
# slapos.toolbox==0.10
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.34
# slapos.toolbox==0.10
slapos.core = 0.18
# Required by:
# slapos.core==0.18
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.34
# slapos.toolbox==0.10
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.34
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.18
zope.interface = 3.8.0
[downloadcache-workaround] [downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically # workaround irritating problem of hexagonit.recipe.cmmi which automatically
...@@ -127,4 +53,3 @@ download-cache = ${buildout:directory}/downloads ...@@ -127,4 +53,3 @@ download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command} update-command = ${:command}
stop-on-error = True stop-on-error = True
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
\ No newline at end of file
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
[application]
recipe = hexagonit.recipe.download
url = http://bigprof.com/appgini/sites/default/files/invoicing.zip
md5sum = b3fbc5c818e22363582f954bc04aa046
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
...@@ -10,6 +10,7 @@ extends = common.cfg ...@@ -10,6 +10,7 @@ extends = common.cfg
[networkcache] [networkcache]
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
# Cedric de Saint Martin # Cedric de Saint Martin
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -24,7 +25,19 @@ signature-certificate-list = ...@@ -24,7 +25,19 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions] [versions]
Flask-Auth = 0.85 Flask-Auth = 0.85
......
...@@ -16,7 +16,7 @@ extends = ...@@ -16,7 +16,7 @@ extends =
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://www.sugarforge.org/frs/download.php/8558/SugarCE-6.3.0RC3.zip url = http://www.sugarforge.org/frs/download.php/8558/SugarCE-6.3.0RC3.zip
md5sum = ff4cf7c6f673f9f3f6e082c62736f628 md5sum = 40bcc6ff38ef31194d46864a9f3548f3
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
......
# A simple software release to test if tesseract building works
[buildout]
extends =
../../stack/slapos.cfg
../../component/tesseract/buildout.cfg
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = lang
constraint = `defaut`=1 AND `url`<>''
delete = install
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://thelia.net/fichiers/thelia_1.5.1.zip
md5sum = 7be32154c75e450b39bdb4478658848b
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
#eggs = ${instance-recipe:egg}
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
[application]
recipe = hexagonit.recipe.download
url = http://downloads.sourceforge.net/project/textmb/UPB/UPB%202.2.7/upb2.2.7.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ftextmb%2Ffiles%2FUPB%2FUPB%25202.2.7%2F&ts=1320403647&use_mirror=freefr
md5sum = b50e2c8d222789beb399d07d3eba2206
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://freefr.dl.sourceforge.net/project/web2project/web2Project/v2.3%20Release/web2project-2.3.1.tar.gz
md5sum = 570e079775817ddda3c99eb302511e5a
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://garr.dl.sourceforge.net/project/wikyblog/WikyBlog/1.7.3RC2/WikyBlog-1.7.3rc2.tar.gz
md5sum = 1d2adbb8e19f4168205f5a5b3e5c6a84
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
# Exactly the same as software.cfg, but fetch the slapos.cookbook and
# slapos.toolbox from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
# You'll need to run buildout twice for this profile.
[buildout]
extends =
../../component/git/buildout.cfg
software.cfg
parts +=
# Development parts
slapos.cookbook-repository
slapos.core-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.core-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[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
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
...@@ -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.4.2.tar.gz url = http://wordpress.org/wordpress-3.5.tar.gz
md5sum = dfc56cee27eec8fb79070f033ecd4b25 md5sum = 105b5baff67344528bb5d8b71c050b0d
[application-template] [application-template]
recipe = slapos.recipe.download recipe = slapos.recipe.download
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = *_rolemembers
constraint = `xar_uid`=6
delete = xaraya-1.2.3/html/install.php
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://freefr.dl.sourceforge.net/project/xaraya/Core%20plus%20Modules/Xaraya%201.2.3%20Core%20Plus/xaraya-1.2.3-full.tar.gz
md5sum = c2fd2daa5335d262b4288e456c233434
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir + "/html", "${buildout:parts-directory}/${:_buildout_section_name_}")
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
delete = install.php
table_name = sheets
constraint = `sheet_id`>=0
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = hexagonit.recipe.download:download-unpacked
url = http://sunet.dl.sourceforge.net/project/xellplan/xellplan/xellplan-1.3/xellplan-1.3.tar.bz2
md5sum = 37880217917367eb2d4a0a33c4a7fb65
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/sfx.php.in
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = inc/sfx.php
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
<?php
#----------------------------------------------------------------------
# config begin
$SITE_TITLE = "XellPlan";
# default language, ("de","en" are valid choices for now)
$LANGUAGE = "en";
$DB_NAME = "%(mysql_database)s";
$DB_HOST = "%(mysql_host)s";
$DB_USER = "%(mysql_user)s";
$DB_PASS = "%(mysql_password)s";
$DB_PREFIX = "xp_";
$CREATE_PASSWORD = "genesis"; # you need this one to create new plans
$MASTER_PASSWORD = "god"; # universal user and admin password
# config end - don't modify anything below this line
#----------------------------------------------------------------------
include("lang/".$LANGUAGE.".php");
function db_connect() {
global $DB_LINK, $DB_HOST, $DB_USER, $DB_PASS, $DB_NAME, $CLUBS, $PLAN;
$DB_LINK = mysql_pconnect( $DB_HOST, $DB_USER, $DB_PASS );
mysql_select_db( $DB_NAME );
}
function SfxRedirectPage($url,$Message,$time=2) {
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="std.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" content="Christoph Luehr">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="content-language" content="de">
<meta http-equiv="refresh" content="<?php echo $time; ?>;URL=<?php echo $url; ?>">
<title>XCell-Plan: <?php echo $Message; ?></title>
</head>
<body>
<br/>
<h1><?php echo $Message; ?></h1>
<br></br>
</body>
</html>
<?php
exit; // finish after a redirect
}
function SfxDateSel($varname, $default="today") {
if ( $default == "today" ) $default= date('Y-m-d');
echo '<input type="text" name="'.$varname.
'" id="'.$varname.'" value="'.$default.
'" size="10" maxlength="10" readonly="true" />';
echo '<input type="button" '.
'onClick="showCalendar(this,document.getElementById(\''.
$varname.'\'),\'yyyy-mm-dd\',\''.$GLOBALS['LANGUAGE'].'\',1)" value="..." />&nbsp;';
}
function SfxTimeSel($varname,$default="12:00:00") {
echo '<select name="'.$varname.'">';
for ($h=0; $h<24;$h++) {
if (strlen($h)<2 ) $h="0".$h; # evil
foreach( array('00','30') as $m ) {
$sel="";
if ( $default == $h.":".$m.":00") $sel=" selected";
echo '<option value="'.$h.':'.$m.':00"'.$sel.'>'.$h.':'.$m.'</option>';
}
}
echo '</select>'."\n";
}
function SfxBegin() {
db_connect();
}
function filterVar($value) {
// recursive treatment for arrays
if (is_array($value)) {
$ret = array();
foreach ($value as $k => $v) {
$ret[filterVar($k)] = filterVar($v);
}
return $ret;
}
// filter ascii control chars
$value = preg_replace('/[\x00-\x1f]+/', '', $value);
$value = str_replace('\\', '\\\\', $value);
$value = str_replace('\'', '\\\'', $value);
return $value;
}
function getInputVar($name) {
if (isset($GLOBALS[$name])) {
return $GLOBALS[$name];
}
if (isset($_GET[$name])) {
return filterVar($_GET[$name]);
}
if (isset($_POST[$name])) {
return filterVar($_POST[$name]);
}
return '';
}
SfxBegin(); // start DB connection
// get often used vars
$ID = getInputVar('ID');
[buildout] [buildout]
extends = extends =
../../stack/tomcat.cfg ../../stack/tomcat.cfg
../../stack/slapos.cfg
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
...@@ -23,6 +24,40 @@ recipe = hexagonit.recipe.download ...@@ -23,6 +24,40 @@ recipe = hexagonit.recipe.download
url = http://download.forge.objectweb.org/xwiki/xwiki-enterprise-web-2.7.war url = http://download.forge.objectweb.org/xwiki/xwiki-enterprise-web-2.7.war
md5sum = c56e2cde96d28c5899a16a8270b6ff88 md5sum = c56e2cde96d28c5899a16a8270b6ff88
[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]
slapos.cookbook = 0.18 slapos.cookbook = 0.18
......
...@@ -21,6 +21,7 @@ mode = 0644 ...@@ -21,6 +21,7 @@ mode = 0644
[networkcache] [networkcache]
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
# Cedric de Saint Martin # Cedric de Saint Martin
# Test Agent
signature-certificate-list = signature-certificate-list =
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
...@@ -35,6 +36,19 @@ signature-certificate-list = ...@@ -35,6 +36,19 @@ signature-certificate-list =
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions] [versions]
Jinja2 = 2.6 Jinja2 = 2.6
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
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
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://zenphoto.googlecode.com/files/zenphoto-1.4.2.2.tar.gz
md5sum = 1f4fff7294ffdd017d5ffc5207ec7011
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
# -*- coding: utf-8 -*-
import sys
import os
import shutil
def setup(args):
mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
config_php = os.path.join(htdocs, "config/config.php")
install_php = os.path.join(htdocs, "install.php")
install_folder = os.path.join(htdocs, "install")
upgrade_php = os.path.join(htdocs, "upgrade.php")
os.chmod(config_php, 0444)
os.remove(install_php)
os.remove(upgrade_php)
shutil.rmtree(install_folder)
if __name__ == '__main__':
setup(sys.argv[1:])
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
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
table_name = themes
constraint = `pn_id`>0
script = ${configure-script:location}/${configure-script:filename}
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
configure-script
extends =
../../stack/lamp.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://ci.zikula.org/job/Zikula-1.2.8/17/artifact/build/archive/Zikula-1.2.8.build17.zip
md5sum = bc453d665605f954f1497586ccd6d267
[configure-script]
recipe = slapos.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-zikula.py
md5sum = c4d5f87d8f02cad3f20e679160195f48
filename = configure-zikula.py
mode = 0744
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
...@@ -69,6 +69,7 @@ parts = ...@@ -69,6 +69,7 @@ parts =
# fonts # fonts
liberation-fonts liberation-fonts
ipaex-fonts ipaex-fonts
ocrb-fonts
# Dependencies # Dependencies
libpng12 libpng12
......
...@@ -117,6 +117,7 @@ parts = ...@@ -117,6 +117,7 @@ parts =
# fonts # fonts
liberation-fonts liberation-fonts
ipaex-fonts ipaex-fonts
ocrb-fonts
# Cloudooo specific part # Cloudooo specific part
cloudooo cloudooo
...@@ -489,6 +490,7 @@ eggs = ...@@ -489,6 +490,7 @@ eggs =
Products.MimetypesRegistry Products.MimetypesRegistry
Products.ExternalEditor Products.ExternalEditor
Products.TIDStorage Products.TIDStorage
Products.LongRequestLogger
# Currently forked in our repository # Currently forked in our repository
# Products.PortalTransforms # Products.PortalTransforms
......
...@@ -36,7 +36,7 @@ tmp = $${buildout:directory}/tmp ...@@ -36,7 +36,7 @@ tmp = $${buildout:directory}/tmp
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise promises = $${rootdirectory:etc}/promise
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
ignore-existing = true ignore-existing = true
parts = parts =
slapos-cookbook
apache-php apache-php
mariadb mariadb
mydumper mydumper
...@@ -52,7 +53,7 @@ keep-compile-dir = false ...@@ -52,7 +53,7 @@ keep-compile-dir = false
[application] [application]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
#If provided tarball does not containt top directory this option shall be changed to false # If the provided tarball does not contain top directory, this option should be changed to false
strip-top-level-dir = true strip-top-level-dir = true
...@@ -70,7 +71,7 @@ mode = 0644 ...@@ -70,7 +71,7 @@ mode = 0644
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 = fc29d853dcd0802dd61c60b09e898c11 md5sum = bf3219cd7d318e02e39c462fbb530715
mode = 0644 mode = 0644
[instance-apache-backup] [instance-apache-backup]
...@@ -100,21 +101,21 @@ mode = 0644 ...@@ -100,21 +101,21 @@ mode = 0644
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 = ba8dd08dfd5e6a9dc614693d066eb21d md5sum = fafb873323c0084c522360f94ebe1df7
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 = ea43b8ed38a55a11b027fc283c0e718a md5sum = 8009627bb669d1fee0df030daa8d3bdc
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 = 685c8abf0f487c72273846002ec631a0 md5sum = 0513bf25fbb20cccd57f285c40d96498
mode = 0644 mode = 0644
...@@ -276,108 +277,82 @@ signature-certificate-list = ...@@ -276,108 +277,82 @@ signature-certificate-list =
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions]
# 1.2.4b doesn't download
MySQL-python = 1.2.3
[versions]
Jinja2 = 2.6 Jinja2 = 2.6
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.11.3 apache-libcloud = 0.11.4
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
meld3 = 0.6.9 inotifyx = 0.2.0
lxml = 3.0.2
meld3 = 0.6.10
netaddr = 0.7.10
pycrypto = 2.6 pycrypto = 2.6
pytz = 2012h
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.cookbook = 0.69
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.31
smmap = 0.8.2 smmap = 0.8.2
# Required by: # Required by:
# slapos.core==0.31.2 # slapos.core==0.33.2-dev
# slapos.toolbox==0.31 # slapos.toolbox==0.32.1-dev
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.31 # slapos.toolbox==0.32.1-dev
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.toolbox==0.32.1-dev
PyXML = 0.8.4
# Required by:
# slapos.toolbox==0.31
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.31 # slapos.toolbox==0.32.1-dev
feedparser = 5.1.2 feedparser = 5.1.3
# 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:
# slapos.cookbook==0.69
inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.core==0.33.2-dev
# slapos.core==0.31.2
# xml-marshaller==0.9.7
lxml = 3.0.1
# Required by:
# slapos.cookbook==0.69
netaddr = 0.7.10
# Required by:
# slapos.core==0.31.2
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.31 # slapos.toolbox==0.32.1-dev
paramiko = 1.7.7.2 paramiko = 1.9.0
# Required by: # Required by:
# slapos.toolbox==0.31 # slapos.toolbox==0.32.1-dev
psutil = 0.6.1 psutil = 0.6.1
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.core==0.33.2-dev
pytz = 2012f pyflakes = 0.5.0
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.cookbook==0.70.1-dev
# slapos.core==0.31.2 # slapos.core==0.33.2-dev
# slapos.toolbox==0.31 # slapos.toolbox==0.32.1-dev
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010 # zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2 # zope.interface==4.0.2
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.core==0.33.2-dev
# slapos.toolbox==0.31
slapos.core = 0.31.2
# Required by:
# slapos.core==0.31.2
supervisor = 3.0b1 supervisor = 3.0b1
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.toolbox==0.32.1-dev
# slapos.toolbox==0.31
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.69 # slapos.core==0.33.2-dev
zc.recipe.egg = 1.3.2 zope.interface = 4.0.2
# Required by:
# slapos.core==0.31.2
zope.interface = 4.0.1
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
extends = ${instance-mariadb:output} extends = ${instance-mariadb:output}
${pbsready-export:output} ${pbsready-export:output}
parts += mariadb
parts +=
mariadb
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
[exporter] [exporter]
recipe = slapos.cookbook:mydumper recipe = slapos.cookbook:mydumper
......
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
extends = ${instance-mariadb:output} extends = ${instance-mariadb:output}
${pbsready-import:output} ${pbsready-import:output}
parts += mariadb
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
......
...@@ -37,7 +37,7 @@ bin = $${buildout:directory}/bin ...@@ -37,7 +37,7 @@ bin = $${buildout:directory}/bin
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
script = $${rootdirectory:etc}/script script = $${rootdirectory:etc}/script
backup = $${rootdirectory:srv}/backup backup = $${rootdirectory:srv}/backup
......
...@@ -7,10 +7,7 @@ This fork of the LAMP stack provides: ...@@ -7,10 +7,7 @@ This fork of the LAMP stack provides:
- a Postgres instance, with an empty database and a 'postgres' superuser. - a Postgres instance, with an empty database and a 'postgres' superuser.
Log rotation is handled by Postgres itself. Log rotation is handled by Postgres itself.
- symlinks to all the postgres binaries, usable through unix socket - a psycopg2 (postgres driver) egg to be used by further configuration recipes
with no further authentication, or through ipv6
- a psycopg2 (postgres driver) egg - a hook (custom-application-deployment) for configuring the PHP application
- configuration for a maarch instance (this part should be brought outside the stack)
...@@ -32,7 +32,7 @@ tmp = $${buildout:directory}/tmp ...@@ -32,7 +32,7 @@ tmp = $${buildout:directory}/tmp
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise promises = $${rootdirectory:etc}/promise
......
...@@ -38,7 +38,7 @@ tmp = $${buildout:directory}/tmp ...@@ -38,7 +38,7 @@ tmp = $${buildout:directory}/tmp
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise promises = $${rootdirectory:etc}/promise
...@@ -194,8 +194,6 @@ url = $${request-postgres:connection-url} ...@@ -194,8 +194,6 @@ url = $${request-postgres:connection-url}
[apache-php] [apache-php]
recipe = slapos.cookbook:apachephp recipe = slapos.cookbook:apachephp
source = ${application:location} source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
htdocs = $${rootdirectory:srv}/www/ htdocs = $${rootdirectory:srv}/www/
pid-file = $${basedirectory:run}/apache.pid pid-file = $${basedirectory:run}/apache.pid
...@@ -212,11 +210,6 @@ wrapper = $${basedirectory:services}/apache ...@@ -212,11 +210,6 @@ wrapper = $${basedirectory:services}/apache
httpd-binary = ${apache:location}/bin/httpd httpd-binary = ${apache:location}/bin/httpd
mysql-username = $${postgres-urlparse:username}
mysql-password = $${postgres-urlparse:password}
mysql-database = $${postgres-urlparse:path}
mysql-host = $${stunnel:local-host}
mysql-port = $${stunnel:local-port}
[logrotate-entry-apache] [logrotate-entry-apache]
<= logrotate <= logrotate
......
[buildout] [buildout]
parts = parts =
slapos-cookbook
apache-php-postgres apache-php-postgres
rdiff-backup rdiff-backup
dropbear dropbear
...@@ -38,6 +39,7 @@ extends = ...@@ -38,6 +39,7 @@ extends =
[application] [application]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
# If the provided tarball does not contain top directory, this option should be changed to false
strip-top-level-dir = true strip-top-level-dir = true
...@@ -55,14 +57,14 @@ mode = 0644 ...@@ -55,14 +57,14 @@ mode = 0644
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 = bed286b680bd8cd494da080cdc229f1e md5sum = 72b70452d1c077cfcd0f268181506b8e
mode = 0644 mode = 0644
[instance-apache-backup] [instance-apache-backup]
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-backup.cfg.in
output = ${buildout:directory}/instance-apache-backup.cfg output = ${buildout:directory}/instance-apache-backup.cfg
md5sum = 48f969d82319a9d145570f5f0fd27672 md5sum = db879141c0b6a77ef8b3b7e699f5583a
mode = 0644 mode = 0644
[template-resilient-lapp] [template-resilient-lapp]
...@@ -85,21 +87,21 @@ mode = 0644 ...@@ -85,21 +87,21 @@ 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 = c5cd2a644fcd8450bc5d13bf53ec9f7d md5sum = 6e9e587ddb52fb9a3817fda7d77e4cab
mode = 0644 mode = 0644
[instance-postgres-import] [instance-postgres-import]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-import.cfg.in url = ${:_profile_base_location_}/postgres/instance-postgres-import.cfg.in
output = ${buildout:directory}/instance-postgres-import.cfg output = ${buildout:directory}/instance-postgres-import.cfg
md5sum = 1989ba2164dd5f79793a04e0a02ea515 md5sum = 7edfa157ddccc27e99bf128fc1c2b9ee
mode = 0644 mode = 0644
[instance-postgres-export] [instance-postgres-export]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in
output = ${buildout:directory}/instance-postgres-export.cfg output = ${buildout:directory}/instance-postgres-export.cfg
md5sum = 7bce31bc22a731a8fc6119aee96586f5 md5sum = 68080e5d861eb3474442211dd65c668b
mode = 0644 mode = 0644
...@@ -160,9 +162,83 @@ eggs = ...@@ -160,9 +162,83 @@ eggs =
${lxml-python:egg} ${lxml-python:egg}
${psycopg2:egg} ${psycopg2:egg}
slapos.toolbox slapos.toolbox
cns.recipe.symlink
[versions] [versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.11.4
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
lxml = 3.0.2
meld3 = 0.6.10 meld3 = 0.6.10
netaddr = 0.7.10
psycopg2 = 2.4.6
pycrypto = 2.6
pytz = 2012h
rdiff-backup = 1.0.5
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
smmap = 0.8.2
# Required by:
# slapos.core==0.33.2-dev
# slapos.toolbox==0.32.1-dev
Flask = 0.9
# Required by:
# slapos.toolbox==0.32.1-dev
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.32.1-dev
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.32.1-dev
feedparser = 5.1.3
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# Required by:
# slapos.core==0.33.2-dev
netifaces = 0.8
# Required by:
# slapos.toolbox==0.32.1-dev
paramiko = 1.9.0
# Required by:
# slapos.toolbox==0.32.1-dev
psutil = 0.6.1
# Required by:
# slapos.core==0.33.2-dev
pyflakes = 0.5.0
# Required by:
# slapos.cookbook==0.70.1-dev
# slapos.core==0.33.2-dev
# slapos.toolbox==0.32.1-dev
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.33.2-dev
supervisor = 3.0b1
# Required by:
# slapos.toolbox==0.32.1-dev
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.33.2-dev
zope.interface = 4.0.2
...@@ -8,6 +8,9 @@ parts += ...@@ -8,6 +8,9 @@ parts +=
postgres-instance postgres-instance
postgres-promise postgres-promise
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
[exporter] [exporter]
recipe = slapos.cookbook:postgres.export recipe = slapos.cookbook:postgres.export
......
...@@ -6,6 +6,9 @@ extends = ${instance-postgres:output} ...@@ -6,6 +6,9 @@ extends = ${instance-postgres:output}
parts += parts +=
postgres-instance postgres-instance
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer] [importer]
recipe = slapos.cookbook:postgres.import recipe = slapos.cookbook:postgres.import
wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-importer wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-importer
......
...@@ -37,7 +37,7 @@ bin = $${buildout:directory}/bin ...@@ -37,7 +37,7 @@ bin = $${buildout:directory}/bin
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
script = $${rootdirectory:etc}/script script = $${rootdirectory:etc}/script
backup = $${rootdirectory:srv}/backup backup = $${rootdirectory:srv}/backup
...@@ -120,10 +120,10 @@ rotate-num = 30 ...@@ -120,10 +120,10 @@ rotate-num = 30
notifempty = true notifempty = true
create = true create = true
#---------------- #----------------
#-- #--
#-- Deploy stunnel. #-- Deploy stunnel.
#-- XXX This is actually not needed with Postgres.
[stunnel] [stunnel]
recipe = slapos.cookbook:stunnel recipe = slapos.cookbook:stunnel
...@@ -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 = $${postgres-instance:ipv4_host} local-host = $${instance-parameters:ipv4_random}
local-port = $${postgres-instance:port} local-port = $${postgres-instance:port}
remote-host = $${slap-network-information:global-ipv6} 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
...@@ -165,25 +165,25 @@ certs = $${directory:ca-dir}/certs/ ...@@ -165,25 +165,25 @@ certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/ newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/ crl = $${directory:ca-dir}/crl/
#---------------- #----------------
#-- #--
#-- Creates a Postgres cluster, configuration files, and a database. #-- Creates a Postgres cluster, configuration files, and a database.
[postgres-instance] [postgres-instance]
recipe = slapos.cookbook:postgres recipe = slapos.cookbook:postgres
ipv6_host = $${slap-network-information:global-ipv6} ipv6 = $${instance-parameters:ipv6}
user = postgres ipv4 = $${instance-parameters:ipv4}
ipv6_random = $${instance-parameters:ipv6_random}
superuser = postgres
port = 5432 port = 5432
dbname = db dbname = db
# XXX the next line is required by stunnel, not by us
ipv4_host = $${slap-network-information:local-ipv4}
# pgdata_directory is created by initdb, and should not exist beforehand. # pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${rootdirectory:var}/data pgdata-directory = $${rootdirectory:var}/data
backup-directory = $${basedirectory:backup}/postgres backup-directory = $${basedirectory:backup}/postgres
bin = ${postgresql:location}/bin
services = $${basedirectory:services} services = $${basedirectory:services}
bin = $${rootdirectory:bin}
dependency-symlinks = $${symlinks:recipe}
[ca-stunnel] [ca-stunnel]
<= certificate-authority <= certificate-authority
recipe = slapos.cookbook:certificate_authority.request recipe = slapos.cookbook:certificate_authority.request
...@@ -192,15 +192,6 @@ wrapper = $${basedirectory:services}/stunnel ...@@ -192,15 +192,6 @@ wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file} key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file} cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Creates symlinks from the instance to the software release.
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin
#---------------- #----------------
#-- #--
...@@ -227,7 +218,7 @@ path = $${directory:report}/slapmonitor-xml ...@@ -227,7 +218,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 = $${slap-network-information:global-ipv6} hostname = $${instance-parameters:ipv6_random}
port = $${postgres-instance:port} port = $${postgres-instance:port}
...@@ -238,7 +229,8 @@ port = $${postgres-instance:port} ...@@ -238,7 +229,8 @@ port = $${postgres-instance:port}
[urls] [urls]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
url = $${postgres-instance:url} url = $${postgres-instance:url}
ip = $${slap-network-information:global-ipv6} ip = $${instance-parameters:ipv6_random}
#---------------- #----------------
#-- #--
......
Base resilient stack
====================
This stack is meant to be extended by SR profiles, or other stacks, that need to provide
automated backup/restore, election of backup candidates, and instance failover.
As reference implementations, both stack/lamp and stack/lapp define resilient behavior for
MySQL and Postgres respectively.
This involves three different software_types:
* pull-backup
* {mysoftware}_export
* {mysoftware}_import
where 'mysoftware' is the component that needs resiliency (can be postgres, mysql, erp5, and so on).
pull-backup
-----------
This software type is defined in
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/resilient/instance-pull-backup.cfg.in?js=1
and there should be no reason to modify or extend it.
An instance of type 'pull-backup' will receive data from an 'export' instance and immediately populate an 'import' instance.
The backup data is automatically used to build an historical, incremental archive in srv/backup/pbs.
export
------
example:
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/lapp/postgres/instance-postgres-export.cfg.in?js=1
This is the *active* instance - the one providing live data to the application.
A backup is run via the bin/exporter script: it will
1) run bin/{mysoftware}-backup
and 2) notify the pull-backup instance that data is ready.
The pull-backup, upon receiving the notification, will make a copy of the data and transmit it to the 'import' instances.
You should provide the bin/{mysoftware}-exporter script, see for instance
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/postgres/__init__.py?js=1#l207
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/mydumper.py?js=1#l71
By default, as defined in
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/resilient/pbsready-export.cfg.in?js=1#l27
the bin/exporter script is run every 60 minutes.
import
------
example:
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/lapp/postgres/instance-postgres-import.cfg.in?js=1
This is the *fallback* instance - the one that can be activated and thus become active.
Any number of import instances can be used. Deciding which one should take over can be done manually
or through a monitoring + election script.
You should provide the bin/{mysoftware}-importer script, see for instance
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/postgres/__init__.py?js=1#l233
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/mydumper.py?js=1#l71
In practice
-----------
Add resilience to your software
Let's say you already have a file instance-mysoftware.cfg.in that instantiates your
software. In which there is a part [mysoftware] where there is the main recipe
that instantiates the program.
You need to create two new files, instance-mysoftware-import.cfg.in and
instance-mysoftware-export.cfg.in, following this layout:
IMPORT:
[buildout]
extends = ${instance-mysoftware:output}
${pbsready-import:output}
parts +=
mysoftware
import-on-notification
[importer]
recipe = YourImportRecipe
wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-importer
backup-directory = $${directory:backup}
...
EXPORT:
[buildout]
extends = ${instance-mysoftware:output}
${pbsready-export:output}
parts +=
mysoftware
cron-entry-backup
[exporter]
recipe = YourExportRecipe
wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-exporter
backup-directory = $${directory:backup}
...
In the [exporter] / [importer] part, you are free to do whatever you want, but
you need to dump / import your data from $${directory:backup} and specify a
wrapper. I suggest you only add options and specify your export/import recipe.
-----------------------------------------------------------------------------------------
Finally, instance-mysoftware-import.cfg.in and
instance-mysoftware-export.cfg.in need to be downloaded and accessible by
switch_softwaretype, and you need to extend stack/resilient/buildout.cfg and
stack/resilient/switchsoftware.cfg to download the whole resiliency bundle.
Here is how it's done in the mariadb case for the lamp stack:
** buildout.cfg **
extends =
../resilient/buildout.cfg
[instance-mariadb-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg
md5sum = ...
mode = 0644
[instance-mariadb-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg
md5sum = ...
mode = 0644
** instance.cfg.in **
extends =
../resilient/switchsoftware.cfg
[switch-softwaretype]
...
mariadb = ${instance-mariadb:output}
mariadb-import = ${instance-mariadb-import:output}
mariadb-export = ${instance-mariadb-export:output}
...
Then, in the .cfg file where you want to instantiate your software, you can do, instead of requesting your software
* template-resilient.cfg.in *
[buildout]
...
parts +=
{{ parts.replicate("Name","3") }}
...
[...]
...
[ArgLeader]
...
[ArgBackup]
...
{{ replicated.replicate("Name", "3",
"mysoftware-export", "mysoftware-import",
"ArgLeader","ArgBackup") }}
and it'll expend into the sections require to request Name0, Name1 and Name2,
backuped and resilient. The leader will expend the section [ArgLeader], backups
will expend [ArgBackup]. If you don't need to specify any options, you can
omit the last two arguments in replicate().
Since you will compile your template with jinja2, there should be no $${},
because it is not yet possible to use jinja2 -> buildout template.
To compile with jinja2, see jinja2's recipe.
...@@ -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 = a2edaadfe652b4b131626b4801768f40 md5sum = e602f6746cbe5a1da82b90097719c4a1
mode = 0644 mode = 0644
[pbsready-import] [pbsready-import]
...@@ -47,7 +47,7 @@ mode = 0644 ...@@ -47,7 +47,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg output = ${buildout:directory}/instance-pull-backup.cfg
md5sum = 18b88cd012e886fbaa457b03928c2d10 md5sum = 453d96f5a6c1230c01c878cc7640bae6
mode = 0644 mode = 0644
[template-replicated] [template-replicated]
......
...@@ -30,7 +30,7 @@ var = $${buildout:directory}/var ...@@ -30,7 +30,7 @@ var = $${buildout:directory}/var
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise promises = $${rootdirectory:etc}/promise
......
...@@ -24,7 +24,7 @@ parts += ...@@ -24,7 +24,7 @@ parts +=
#-- Creation of all needed directories. #-- Creation of all needed directories.
[basedirectory] [basedirectory]
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
cache = $${rootdirectory:var}/cache cache = $${rootdirectory:var}/cache
notifier = $${rootdirectory:etc}/notifier notifier = $${rootdirectory:etc}/notifier
......
...@@ -21,6 +21,7 @@ exec-sitecustomize = false ...@@ -21,6 +21,7 @@ exec-sitecustomize = false
# Add location for modified non-official slapos.buildout # Add location for modified non-official slapos.buildout
find-links += find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/ http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/
# Use only quite well working sites. # Use only quite well working sites.
allow-hosts += allow-hosts +=
......
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