Commit ac4230f5 authored by Łukasz Nowak's avatar Łukasz Nowak

Merge branch 'master' into slapos

parents cac4d4a8 5b18969f
0.10 (unreleased)
0.11 (not yet released)
================
* No change yet.
0.10 (2011-07-01)
================
* Add PHPMyAdmin software release used in SlapOS tutorials
[Cedric de Saint Martin]
* Add slaprunner software release [Cedric de Saint Martin]
0.9 (2011-06-24)
================
......
[buildout]
parts = apache-php
extends =
../apache/buildout.cfg
[apache-php]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
url = http://fr2.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
md5sum = 2286f5a82a6e8397955a0025c1c2ad98
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
--with-mysql=${mariadb:location}
--with-zlib-dir=${zlib:location}
--with-mcrypt=${libmcrypt:location}
--enable-mbstring
--enable-session
--disable-all
environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
PATH=${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/lib
[apache-php-xmlrpc-gd]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
url = http://fr2.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
md5sum = 2286f5a82a6e8397955a0025c1c2ad98
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
--with-gd
--with-zlib-dir=${zlib:location}
--with-mcrypt=${libmcrypt:location}
--with-xmlrpc=${xml-rpc:location}
--enable-mbstring
--enable-session
--disable-all
environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
PATH=${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${xml-rpc:location}/lib -Wl,-rpath -Wl,${xml-rpc:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/lib
[libmcrypt]
recipe = hexagonit.recipe.cmmi
url = http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.bz2/download
md5sum = c4f491dd411a09e9de3b8702ea6f73eb
[xml-rpc]
recipe = hexagonit.recipe.cmmi
url = http://downloads.sourceforge.net/project/phpxmlrpc/phpxmlrpc/2.2.2/xmlrpc-2.2.2.tar.gz
md5sum = 59a644c636c6d98267d0c99b406ae9e8
\ No newline at end of file
......@@ -13,6 +13,55 @@ extends =
../sqlite3/buildout.cfg
../zlib/buildout.cfg
[apache-no-ssl]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.19.tar.bz2
md5sum = 832f96a6ec4b8fc7cf49b9efd4e89060
configure-options = --enable-authn-alias
--enable-bucketeer
--enable-cache
--enable-case-filter
--enable-case-filter-in
--enable-cgid
--enable-charset-lite
--enable-disk-cache
--enable-echo
--enable-exception-hook
--enable-mods-shared=all
--enable-optional-fn-export
--enable-optional-fn-import
--enable-optional-hook-export
--enable-optional-hook-import
--enable-proxy
--enable-proxy-ajp
--enable-proxy-balancer
--enable-proxy-connect
--enable-proxy-ftp
--enable-proxy-http
--enable-proxy-scgi
--enable-so
--disable-ssl
--with-included-apr
--with-z=${zlib:location}
--with-expat=${libexpat:location}
--with-pcre=${pcre:location}
--with-sqlite3=${sqlite3:location}
--with-dbm=gdbm
--with-gdm=${gdbm:location}
--without-ssl
--without-lber
--without-ldap
--without-ndbm
--without-berkeley-db
--without-pgsql
--without-mysql
--without-sqlite2
--without-oracle
--without-freedts
--without-odbc
--without-iconv
[apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
......
[buildout]
extends =
../mysql-tritonn-5.0/buildout.cfg
../python-2.4/buildout.cfg
../lxml-python/buildout.cfg
../mysql-python/buildout.cfg
../subversion/buildout.cfg
../pysvn-python/buildout.cfg
../python-ldap-python/buildout.cfg
../glib/buildout.cfg
parts =
cmf15
itools
mysql-python
products-other
products-deps
products-erp5
[cmf15]
recipe = plone.recipe.distros
urls =
http://www.zope.org/Products/CMF/CMF-1.5.4/CMF-1.5.4.tar.gz
nested-packages =
CMF-1.5.4.tar.gz
version-suffix-packages =
CMF-1.5.4.tar.gz
[itools]
# use a custom build for itools, to add lib64 to the include path
recipe = zc.recipe.egg:custom
python = python2.4
egg = itools
find-links =
http://download.hforge.org/itools/0.20/
include-dirs =
${glib:location}/include/glib-2.0
${glib:location}/lib/glib-2.0/include
library-dirs =
${glib:location}/lib
rpath =
${glib:location}/lib
[products-deps]
recipe = plone.recipe.distros
urls =
http://www.zope.org/Members/shh/ExtFile/1.4.4/ExtFile-1.4.4.tar.gz
http://www.zope.org/Members/NIP/ZMailIn/1.0.1/ZMailIn-1-0-1.tgz
http://www.zope.org/Members/NIP/ZMailIn/1.0.0/CMFMailIn-1.0.0
http://www.zope.org/Products/PluggableAuthService/PluggableAuthService-1.1b2/PluggableAuthService-1.1b2.tar.gz
http://download.hforge.org/localizer/Localizer-1.2.3.tar.gz
version-suffix-packages =
Localizer-1.2.3.tar.gz
[products-ldap]
recipe = plone.recipe.distros
urls =
http://www.dataflake.org/software/ldapmultiplugins/ldapmultiplugins_1.1/LDAPMultiPlugins-1_1.tgz
http://www.dataflake.org/software/ldapuserfolder/ldapuserfolder_2.6/LDAPUserFolder-2_6.tgz
[products-other]
# Recipe infrae.subversion is using svn command under the hood, but there is
# no way to pass --trust-server-cert --non-interactive --no-auth-cache, so in 2.12 falvour
# it is better to evaluate usage of provided subversion command
recipe = plone.recipe.command
svn_param =--trust-server-cert --non-interactive --no-auth-cache --quiet
# dircty hack to support PluginRegistry/utils.py:17 assumption that products
# are in Products folder
# XXX: Zelenium was eggfied for recent zope versions (2.12) and are available at Bazaar.
# some better alternative should be used in future.
location = ${buildout:parts-directory}/${:_buildout_section_name_}
destination = ${:location}/Products
stop-on-error = true
update-command = ${:command}
command = ${subversion:location}/bin/svn checkout ${:svn_param} http://svn.plone.org/svn/collective/DCWorkflowGraph/tags/release-0_3/ ${:destination}/DCWorkflowGraph &&
${subversion:location}/bin/svn checkout ${:svn_param} svn://svn.zope.org/repos/main/Zelenium/trunk/@110603 ${:destination}/Zelenium &&
${subversion:location}/bin/svn checkout ${:svn_param} svn://svn.zope.org/repos/main/PluginRegistry/tags/1.0 ${:destination}/PluginRegistry &&
${subversion:location}/bin/svn checkout ${:svn_param} http://svn.plone.org/svn/archetypes/MimetypesRegistry/tags/Archetypes-1.4.0-final ${:destination}/MimetypesRegistry
[eggs]
recipe = zc.recipe.egg
python = python2.4
eggs =
${itools:egg}
${mysql-python:egg}
${lxml-python:egg}
${pysvn-python:egg}
${python-ldap-python:egg}
PyXML
ClientForm
SOAPpy
cElementTree
chardet
ctypes
elementtree
erp5.recipe.mysqldatabase
erp5diff
ipdb
mechanize
numpy
ordereddict
pycrypto
paramiko
ply
python-ldap
python-magic
python-memcached
pytz
simplejson
threadframe
timerserver
urlnorm
uuid
xml_marshaller
xupdate_processor
feedparser
extra-paths =
${zope-2.8:location}/lib/python
# shut down script generation. Other parts can generate scripts as needed by
# reusing ${eggs:eggs}
# parameterizing the version of the generated python interpreter name by the
# python section version causes dependency between this egg section and the
# installation of python, which we don't want on an instance
interpreter = python2.4
scripts =
python=${:interpreter}
ipython=i${:interpreter}
[mysql-python]
python = python2.4
[lxml-python]
python = python2.4
[python-ldap-python]
python = python2.4
[pysvn-python]
python = python2.4
[omelette]
# XXX don't use this part until this omelette bug is fixed:
# https://bugs.launchpad.net/collective.buildout/+bug/553005
recipe = collective.recipe.omelette
eggs = ${eggs:eggs}
packages =
${itools:lib} .
[precache-eggs]
python = python2.4
eggs +=
plone.recipe.zope2zeoserver
......@@ -10,8 +10,8 @@ parts =
[freetype]
recipe = hexagonit.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.4.tar.gz
md5sum = 9273efacffb683483e58a9e113efae9f
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.5.tar.bz2
md5sum = 90428a6d8ec4876cd1eb94858c2a59b0
configure-options =
--disable-static
environment =
......
......@@ -10,8 +10,8 @@ parts =
[gmp]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
md5sum = dd60683d7057917e34630b4a787932e8
url = ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
md5sum = 0bbaedc82fb30315b06b1588b9077cd3
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
......@@ -22,8 +22,8 @@ environment =
[mpfr]
recipe = hexagonit.recipe.cmmi
url = http://www.mpfr.org/mpfr-3.0.0/mpfr-3.0.0.tar.bz2
md5sum = f45bac3584922c8004a10060ab1a8f9f
url = http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2
md5sum = bfbecb2eacb6d48432ead5cfc3f7390a
configure-options =
--with-gmp=${gmp:location}
environment =
......@@ -50,15 +50,15 @@ filename = ecj.jar
[gcc-download]
recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.2/gcc-4.5.2.tar.bz2
md5sum = d6559145853fbaaa0fd7556ed93bce9a
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2
md5sum = 8e0b5c12212e185f3e4383106bfa9cc6
strip-top-level-dir = True
destination = ${gcc-java-source:location}
[gcc-java-download]
recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.2/gcc-java-4.5.2.tar.bz2
md5sum = fe2b647bace18dc7867a4192def46e2c
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-java-4.5.3.tar.bz2
md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab
strip-top-level-dir = True
destination = ${gcc-java-source:location}
ignore-existing = true
......
......@@ -13,9 +13,18 @@ PATH = ${libxslt:location}/bin:%(PATH)s
[lxml-python]
recipe = zc.recipe.egg:custom
egg = lxml
# Note: Workaround lxml.de issues blocking buildout runs
# Empty index makes setuptools NOT trying to find any meta information about
# lxml...
index =
# ...so it is wise to tell where lxml can be found
find-links =
http://pypi.python.org/pypi/lxml/2.2.8
http://pypi.python.org/pypi/lxml/2.3
# Note: Whenever someone is going to remove it, one shall check, that buildout
# can run in newest mode, without any locally downloaded cache
rpath =
${libxml2:location}/lib/
${libxslt:location}/lib/
......
......@@ -26,7 +26,6 @@ configure-options =
--disable-poppler-cpp
--disable-poppler-glib
--disable-poppler-qt4
--disable-splash-output
--enable-zlib
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
......
# Sphinx - Open Source Search Server
# http://sphinxsearch.com/
[buildout]
parts = sphinx
extends =
......@@ -5,13 +8,6 @@ extends =
../mariadb/buildout.cfg
../zlib/buildout.cfg
[sphinx-1.10-fix_nosigpipe.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = b606b2a267ebfbd009bb1e72e7a29462
download-only = true
filename = sphinx-1.10-fix_nosigpipe.patch
[sphinx-1.10-beta-snowball.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
......@@ -22,8 +18,8 @@ filename = sphinx-1.10-beta-snowball.patch
[sphinx]
recipe = hexagonit.recipe.cmmi
url = http://www.sphinxsearch.com/files/sphinx-1.10-beta.tar.gz
md5sum = 5b52ce9e93a73c66d37bc3a2402f14fa
url = http://sphinxsearch.com/files/sphinx-2.0.1-beta.tar.gz
md5sum = 95c217d81d0b7a4ff73d5297318c3481
configure-options =
--with-mysql
--with-mysql-includes=${mariadb:location}/include/mysql
......@@ -34,7 +30,6 @@ configure-options =
--without-unixodbc
patch-options = -p1
patches =
${sphinx-1.10-fix_nosigpipe.patch:location}/${sphinx-1.10-fix_nosigpipe.patch:filename}
${sphinx-1.10-beta-snowball.patch:location}/${sphinx-1.10-beta-snowball.patch:filename}
environment =
CPPFLAGS=-I${zlib:location}/include -I${libexpat:location}/include
......
......@@ -17,8 +17,8 @@ filename = stunnel-4-hooks.py
[stunnel-4]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/stunnel-4.37.tar.gz
md5sum = 8d4e2cefbef6638da95986a3d44c1b4a
url = ftp://ftp.stunnel.org/stunnel/stunnel-4.38.tar.gz
md5sum = de5c0478303da746f946d9c112fa7f4b
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
--enable-ipv6
......
......@@ -9,6 +9,18 @@ extends =
parts =
w3m
versions = versions
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
[w3m-w3m.gcc.forward.compat.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
filename = w3m.gcc.forward.compat.patch
download-only = true
md5sum = 75422a6f7f671b3a6d9add6724cc0945
[w3m]
recipe = hexagonit.recipe.cmmi
md5sum = 1b845a983a50b8dec0169ac48479eacc
......@@ -27,8 +39,18 @@ configure-options =
--disable-external-uri-loader
--disable-w3mmailer
patch-options =
-p1
patches =
${w3m-w3m.gcc.forward.compat.patch:location}/${w3m-w3m.gcc.forward.compat.patch:filename}
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include/ -I${zlib:location}/include/
LDFLAGS=-Wl,--as-needed -L${garbage-collector:location}/lib -Wl,-rpath=${garbage-collector:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-004
diff --git a/istream.c b/istream.c
index 8967280..d4c788a 100644
--- a/istream.c
+++ b/istream.c
@@ -22,8 +22,8 @@
static void basic_close(int *handle);
static int basic_read(int *handle, char *buf, int len);
-static void file_close(struct file_handle *handle);
-static int file_read(struct file_handle *handle, char *buf, int len);
+static void file_close(struct w3m_file_handle *handle);
+static int file_read(struct w3m_file_handle *handle, char *buf, int len);
static int str_read(Str handle, char *buf, int len);
@@ -114,7 +114,7 @@ newFileStream(FILE * f, void (*closep) ())
stream = New(union input_stream);
init_base_stream(&stream->base, STREAM_BUF_SIZE);
stream->file.type = IST_FILE;
- stream->file.handle = New(struct file_handle);
+ stream->file.handle = New(struct w3m_file_handle);
stream->file.handle->f = f;
if (closep)
stream->file.handle->close = closep;
@@ -658,13 +658,13 @@ basic_read(int *handle, char *buf, int len)
}
static void
-file_close(struct file_handle *handle)
+file_close(struct w3m_file_handle *handle)
{
handle->close(handle->f);
}
static int
-file_read(struct file_handle *handle, char *buf, int len)
+file_read(struct w3m_file_handle *handle, char *buf, int len)
{
return fread(buf, 1, len, handle->f);
}
diff --git a/istream.h b/istream.h
index a220d8b..6d9736d 100644
--- a/istream.h
+++ b/istream.h
@@ -20,7 +20,7 @@ struct stream_buffer {
typedef struct stream_buffer *StreamBuffer;
-struct file_handle {
+struct w3m_file_handle {
FILE *f;
void (*close) ();
};
@@ -53,7 +53,7 @@ struct base_stream {
struct file_stream {
struct stream_buffer stream;
- struct file_handle *handle;
+ struct w3m_file_handle *handle;
char type;
char iseos;
int (*read) ();
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.10dev'
version = '0.11dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -52,6 +52,10 @@ setup(name=name,
'mysql = slapos.recipe.mysql:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
'osoeslaptraining = slapos.recipe.osoeslaptraining:Request',
'osoeslaptraining.request = slapos.recipe.osoeslaptraining:Request',
'osoeslaptraining.static = slapos.recipe.osoeslaptraining:Static',
'osoeslaptraining.simple = slapos.recipe.osoeslaptraining:Simple',
'proactive = slapos.recipe.proactive:Recipe',
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
'siptester = slapos.recipe.siptester:SipTesterRecipe',
......
......@@ -34,6 +34,9 @@ import sys
import zc.buildout
import zc.recipe.egg
import ConfigParser
import re
_isurl = re.compile('([a-zA-Z0-9+.-]+)://').match
# based on Zope2.utilities.mkzopeinstance.write_inituser
def Zope2InitUser(path, username, password):
......@@ -68,20 +71,27 @@ class Recipe(BaseSlapRecipe):
self.getLocalIPv4Address(), 23000, 23060)
mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678)
user, password = self.installERP5()
zodb_dir = os.path.join(self.data_root_directory, 'zodb')
self._createDirectory(zodb_dir)
zodb_root_path = os.path.join(zodb_dir, 'root.fs')
zope_access = self.installZope(ip=self.getLocalIPv4Address(),
port=12000 + 1, name='zope_%s' % 1,
zodb_configuration_string=self.substituteTemplate(
self.getTemplateFilename('zope-zodb-snippet.conf.in'),
dict(zodb_root_path=zodb_root_path)), with_timerservice=True)
if self.parameter_dict.get("slap_software_type", "").lower() == "cluster":
# Site access is done by HAProxy
zope_access, site_access = self.installZopeCluster()
else:
zope_access = self.installZopeStandalone()
site_access = zope_access
key, certificate = self.requestCertificate('Login Based Access')
apache_conf = dict(
apache_login=self.installBackendApache(ip=self.getGlobalIPv6Address(),
port=13000, backend=zope_access, key=key, certificate=certificate))
self.installERP5Site(user, password, zope_access, mysql_conf,
conversion_server_conf, memcached_conf, kumo_conf, self.site_id)
port=13000, backend=site_access, key=key, certificate=certificate))
default_bt5_list = []
if self.parameter_dict.get("flavour", "default") == 'configurator':
default_bt5_list = self.options.get("configurator_bt5_list", '').split()
self.installERP5Site(user, password, zope_access, mysql_conf,
conversion_server_conf, memcached_conf, kumo_conf,
self.site_id, default_bt5_list)
self.installTestRunner(ca_conf, mysql_conf, conversion_server_conf,
memcached_conf, kumo_conf)
self.installTestSuiteRunner(ca_conf, mysql_conf, conversion_server_conf,
......@@ -96,6 +106,87 @@ class Recipe(BaseSlapRecipe):
))
return self.path_list
def installZopeStandalone(self):
""" Install a single Zope instance without ZEO Server.
"""
zodb_dir = os.path.join(self.data_root_directory, 'zodb')
self._createDirectory(zodb_dir)
zodb_root_path = os.path.join(zodb_dir, 'root.fs')
thread_amount_per_zope = int(self.options.get(
'single_zope_thread_amount', 4))
return self.installZope(ip=self.getLocalIPv4Address(),
port=12000 + 1, name='zope_%s' % 1,
zodb_configuration_string=self.substituteTemplate(
self.getTemplateFilename('zope-zodb-snippet.conf.in'),
dict(zodb_root_path=zodb_root_path)), with_timerservice=True,
thread_amount=thread_amount_per_zope)
def installZopeCluster(self):
""" Install ERP5 using ZEO Cluster
"""
site_check_path = '/%s/getId' % self.site_id
thread_amount_per_zope = int(self.options.get(
'cluster_zope_thread_amount', 1))
activity_node_amount = 2
user_node_amount = 2
ip = self.getLocalIPv4Address()
storage_dict = self._requestZeoFileStorage('Zeo Server 1', 'main')
zeo_conf = self.installZeo(ip)
tidstorage_config = dict(host=ip, port='6001')
mount_point = '/'
check_path = '/erp5/account_module'
known_tid_storage_identifier_dict = {}
known_tid_storage_identifier_dict[
(((storage_dict['ip'],storage_dict['port']),), storage_dict['storage_name'])
] = (zeo_conf[storage_dict['storage_name']]['path'], check_path or mount_point)
zodb_configuration_string = self.substituteTemplate(
self.getTemplateFilename('zope-zeo-snippet.conf.in'), dict(
storage_name=storage_dict['storage_name'],
address='%s:%s' % (storage_dict['ip'], storage_dict['port']),
mount_point=mount_point
))
zope_port = 12000
# One Distribution Node (Single Thread Always)
zope_port += 1
self.installZope(ip, zope_port, 'zope_distribution', with_timerservice=True,
zodb_configuration_string=zodb_configuration_string,
tidstorage_config=tidstorage_config)
# Activity Nodes (Single Thread Always)
for i in range(activity_node_amount):
zope_port += 1
self.installZope(ip, zope_port, 'zope_activity_%s' % i,
with_timerservice=True,
zodb_configuration_string=zodb_configuration_string,
tidstorage_config=tidstorage_config)
# Four Web Page Nodes (Human access)
login_url_list = []
for i in range(user_node_amount):
zope_port += 1
login_url_list.append(self.installZope(ip, zope_port,
'zope_login_%s' % i, with_timerservice=False,
zodb_configuration_string=zodb_configuration_string,
tidstorage_config=tidstorage_config,
thread_amount=thread_amount_per_zope))
login_haproxy = self.installHaproxy(ip, 15001, 'login',
site_check_path, login_url_list)
self.installTidStorage(tidstorage_config['host'],
tidstorage_config['port'],
known_tid_storage_identifier_dict, 'http://' + login_haproxy)
return login_url_list[-1], login_haproxy
def _requestZeoFileStorage(self, server_name, storage_name):
"""Local, slap.request compatible, call to ask for filestorage on Zeo
......@@ -478,10 +569,50 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(os.path.join(self.erp5_directory, directory))
self._createDirectory(os.path.join(self.erp5_directory, 'etc',
'package-includes'))
# Symlink to BT5 repositories defined in instance config.
# Those paths will eventually end up in the ZODB, and having symlinks
# inside the XXX makes it possible to reuse such ZODB with another software
# release[ version].
# Note: this path cannot be used for development, it's really just a
# read-only repository.
repository_path = os.path.join(self.var_directory, "bt5_repository")
if not os.path.isdir(repository_path):
os.mkdir(repository_path)
self.path_list.append(repository_path)
self.bt5_repository_list = []
append = self.bt5_repository_list.append
for repository in self.options.get('bt5_repository_list', '').split():
repository = repository.strip()
if not repository:
continue
if _isurl(repository) and not repository.startswith("file://"):
# XXX: assume it's a valid URL
append(repository)
continue
if repository.startswith('file://'):
repository = repository.replace('file://', '', '')
if os.path.isabs(repository):
repo_id = hashlib.sha1(repository).hexdigest()
link = os.path.join(repository_path, repo_id)
if os.path.lexists(link):
if not os.path.islink(link):
raise zc.buildout.UserError(
'Target link already %r exists but it is not link' % link)
os.unlink(link)
os.symlink(repository, link)
self.logger.debug('Created link %r -> %r' % (link, repository_path))
# Always provide a URL-Type
append("file://" + link)
return user, password
def installERP5Site(self, user, password, zope_access, mysql_conf,
conversion_server_conf=None, memcached_conf=None, kumo_conf=None, erp5_site_id='erp5'):
conversion_server_conf=None, memcached_conf=None, kumo_conf=None,
erp5_site_id='erp5', default_bt5_list=[]):
""" Create a script controlled by supervisor, which creates a erp5
site on current available zope and mysql environment"""
conversion_server = None
......@@ -494,19 +625,18 @@ class Recipe(BaseSlapRecipe):
kumo_conf = {}
# XXX Conversion server and memcache server coordinates are not relevant
# for pure site creation.
https_connection_url = "http://%s:%s@%s/" % (user, password, zope_access)
mysql_connection_string = "%(mysql_database)s@%(ip)s:%(tcp_port)s %(mysql_user)s %(mysql_password)s" % mysql_conf
# XXX URL list vs. repository + list of bt5 names?
bt5_list = self.parameter_dict.get("bt5_list", "").split()
bt5_repository_list = self.parameter_dict.get("bt5_repository_list", "").split()
bt5_list = self.parameter_dict.get("bt5_list", "").split() or default_bt5_list
bt5_repository_list = self.parameter_dict.get("bt5_repository_list", "").split() \
or getattr(self, 'bt5_repository_list', [])
self.path_list.extend(zc.buildout.easy_install.scripts([('erp5_update',
__name__ + '.erp5', 'updateERP5')], self.ws,
sys.executable, self.wrapper_directory,
arguments=[erp5_site_id,
mysql_connection_string,
https_connection_url,
[user, password, zope_access],
memcached_conf.get('memcached_url'),
conversion_server,
kumo_conf.get("kumo_address"),
......
This diff is collapsed.
......@@ -28,6 +28,9 @@ plugin-load = ha_innodb_plugin.so
#innodb_log_file_size = 256M
#innodb_log_buffer_size = 8M
# very important to allow parallel indexing
innodb_locks_unsafe_for_binlog = 1
# Some dangerous settings you may want to uncomment if you only want
# performance or less disk access. Useful for unit tests.
#innodb_flush_log_at_trx_commit = 0
......
##############################################################################
#
# 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.
#
##############################################################################
from slapos.recipe.librecipe import BaseSlapRecipe
import os
import shutil
import pkg_resources
import zc.buildout
import sys
import zc.recipe.egg
class BaseRecipe(BaseSlapRecipe):
def installMysqlServer(self, ip=None, port=None):
if ip is None:
ip = self.getLocalIPv4Address()
if port is None:
port = '3306'
mysql_conf = dict(
ip=ip,
data_directory=os.path.join(self.data_root_directory,
'mysql'),
tcp_port=port,
pid_file=os.path.join(self.run_directory, 'mysqld.pid'),
socket=os.path.join(self.run_directory, 'mysqld.sock'),
error_log=os.path.join(self.log_directory, 'mysqld.log'),
slow_query_log=os.path.join(self.log_directory,
'mysql-slow.log'),
database='appdb',
user='appuser',
password=self.generatePassword(),
)
self._createDirectory(mysql_conf['data_directory'])
mysql_conf_path = self.createConfigurationFile("my.cnf",
self.substituteTemplate(pkg_resources.resource_filename(__name__, 'template/my.cnf.in'),
mysql_conf))
mysql_script = pkg_resources.resource_string(__name__,
'template/mysqlinit.sql.in') % mysql_conf
self.path_list.extend(zc.buildout.easy_install.scripts([('mysql_update',
__name__ + '.mysql', 'updateMysql')], self.ws,
sys.executable, self.wrapper_directory, arguments=[dict(
mysql_script=mysql_script,
mysql_binary=self.options['mysql_binary'].strip(),
mysql_upgrade_binary=self.options['mysql_upgrade_binary'].strip(),
socket=mysql_conf['socket'],
)]))
self.path_list.extend(zc.buildout.easy_install.scripts([('mysqld',
__name__ + '.mysql', 'runMysql')], self.ws,
sys.executable, self.wrapper_directory, arguments=[dict(
mysql_install_binary=self.options['mysql_install_binary'].strip(),
mysqld_binary=self.options['mysqld_binary'].strip(),
data_directory=mysql_conf['data_directory'].strip(),
mysql_binary=self.options['mysql_binary'].strip(),
socket=mysql_conf['socket'].strip(),
configuration_file=mysql_conf_path,
)]))
self.path_list.extend([mysql_conf_path])
return dict(
mysql_host=mysql_conf['ip'],
mysql_port=mysql_conf['tcp_port'],
mysql_user=mysql_conf['user'],
mysql_password=mysql_conf['password'],
mysql_database=mysql_conf['database'],
)
def createHtdocs(self, source, document_root):
source = self.options['source'].strip()
document_root = self.createDataDirectory('htdocs')
for p in os.listdir(document_root):
path = os.path.join(document_root, p)
if os.path.isdir(path):
shutil.rmtree(path)
else:
os.unlink(path)
for p in os.listdir(source):
path = os.path.join(source, p)
if os.path.isdir(path):
shutil.copytree(path, os.path.join(document_root, p))
else:
shutil.copy2(path, os.path.join(document_root, p))
def installApache(self, document_root, ip=None, port=None):
if ip is None:
ip=self.getGlobalIPv6Address()
if port is None:
port = '9080'
apache_config = dict(
pid_file=os.path.join(self.run_directory, 'httpd.pid'),
lock_file=os.path.join(self.run_directory, 'httpd.lock'),
ip=ip,
port=port,
error_log=os.path.join(self.log_directory, 'httpd-error.log'),
access_log=os.path.join(self.log_directory, 'httpd-access.log'),
document_root=document_root,
php_ini_dir=self.etc_directory
)
config_file = self.createConfigurationFile('httpd.conf',
self.substituteTemplate(pkg_resources.resource_filename(__name__,
'template/apache.in'), apache_config))
self.path_list.append(config_file)
self.path_list.append(self.createConfigurationFile('php.ini',
self.substituteTemplate(pkg_resources.resource_filename(__name__,
'template/php.ini.in'), {})))
self.path_list.extend(zc.buildout.easy_install.scripts([(
'httpd',
__name__ + '.apache', 'runApache')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
dict(
required_path_list=[],
binary=self.options['httpd_binary'],
config=config_file
)
]))
return 'http://[%s]:%s' % (ip, port)
def createConfiguration(self, template, document_root, destination, d):
directory = os.path.dirname(destination)
file = os.path.basename(destination)
path = document_root
if directory:
path = os.path.join(document_root, directory)
if not os.path.exists(path):
os.makedirs(path)
destination = os.path.join(path, file)
open(destination, 'w').write(open(template, 'r').read() % d)
class Static(BaseRecipe):
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root)
url = self.installApache(document_root)
self.setConnectionDict(dict(url = url))
return self.path_list
class Simple(BaseRecipe):
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root)
mysql_conf = self.installMysqlServer()
url = self.installApache(document_root)
self.setConnectionDict(dict(
url=url,
**mysql_conf
))
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
return self.path_list
class Request(BaseRecipe):
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
software_type = self.parameter_dict['slap_software_type']
if software_type == 'RootSoftwareInstance':
document_root = self.createDataDirectory('htdocs')
self.createHtdocs(self.options['source'].strip(), document_root)
mysql = self.request(self.software_release_url, 'MySQL Server', 'mysql')
mysql_conf = dict(
mysql_host=mysql.getConnectionParameter('mysql_host'),
mysql_port=mysql.getConnectionParameter('mysql_port'),
mysql_user=mysql.getConnectionParameter('mysql_user'),
mysql_password=mysql.getConnectionParameter('mysql_password'),
mysql_database=mysql.getConnectionParameter('mysql_database'),
)
url = self.installApache(document_root)
self.setConnectionDict(dict(
url=url,
))
self.createConfiguration(self.options['template'], document_root,
self.options['configuration'], mysql_conf)
elif software_type == 'MySQL Server':
mysql_conf = self.installMysqlServer()
self.setConnectionDict(dict(
**mysql_conf
))
else:
raise zc.buildout.UserError('Uknown software type %r' % software_type)
return self.path_list
import os
import sys
import time
def runApache(args):
sleep = 60
conf = args[0]
while True:
ready = True
for f in conf.get('required_path_list', []):
if not os.path.exists(f):
print 'File %r does not exists, sleeping for %s' % (f, sleep)
ready = False
if ready:
break
time.sleep(sleep)
apache_wrapper_list = [conf['binary'], '-f', conf['config'], '-DFOREGROUND']
apache_wrapper_list.extend(sys.argv[1:])
sys.stdout.flush()
sys.stderr.flush()
os.execl(apache_wrapper_list[0], *apache_wrapper_list)
import os
import subprocess
import time
import sys
def runMysql(args):
sleep = 60
conf = args[0]
mysqld_wrapper_list = [conf['mysqld_binary'], '--defaults-file=%s' %
conf['configuration_file']]
# we trust mysql_install that if mysql directory is available mysql was
# correctly initalised
if not os.path.isdir(os.path.join(conf['data_directory'], 'mysql')):
while True:
# XXX: Protect with proper root password
popen = subprocess.Popen([conf['mysql_install_binary'],
'--skip-name-resolve', '--no-defaults', '--datadir=%s' %
conf['data_directory']],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0:
print "Failed to initialise server.\nThe error was: %s" % result
print "Waiting for %ss and retrying" % sleep
time.sleep(sleep)
else:
print "Mysql properly initialised"
break
else:
print "MySQL already initialised"
print "Starting %r" % mysqld_wrapper_list[0]
sys.stdout.flush()
sys.stderr.flush()
os.execl(mysqld_wrapper_list[0], *mysqld_wrapper_list)
def updateMysql(args):
conf = args[0]
sleep = 30
is_succeed = False
while True:
if not is_succeed:
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--no-defaults', '--user=root', '--socket=%s' % conf['socket']]
mysql_upgrade = subprocess.Popen(mysql_upgrade_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = mysql_upgrade.communicate()[0]
if mysql_upgrade.returncode is None:
mysql_upgrade.kill()
if mysql_upgrade.returncode != 0 and not 'is already upgraded' in result:
print "Command %r failed with result:\n%s" % (mysql_upgrade_list, result)
print 'Sleeping for %ss and retrying' % sleep
else:
if mysql_upgrade.returncode == 0:
print "MySQL database upgraded with result:\n%s" % result
else:
print "No need to upgrade MySQL database"
mysql_script = conf.get('mysql_script')
if mysql_script:
mysql_list = [conf['mysql_binary'].strip(), '--no-defaults', '-B', '--user=root', '--socket=%s' % conf['socket']]
mysql = subprocess.Popen(mysql_list, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = mysql.communicate(conf['mysql_script'])[0]
if mysql.returncode is None:
mysql.kill()
if mysql.returncode != 0:
print 'Command %r failed with:\n%s' % (mysql_list, result)
print 'Sleeping for %ss and retrying' % sleep
else:
is_succeed = True
print 'SlapOS initialisation script succesfully applied on database.'
sys.stdout.flush()
sys.stderr.flush()
time.sleep(sleep)
# Apache static configuration
# Automatically generated
# Basic server configuration
PidFile "%(pid_file)s"
LockFile "%(lock_file)s"
Listen %(ip)s:%(port)s
PHPINIDir %(php_ini_dir)s
ServerAdmin someone@email
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml .php5 .php4
AddType application/x-httpd-php-source .phps
# Log configuration
ErrorLog "%(error_log)s"
LogLevel warn
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory %(document_root)s>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DocumentRoot %(document_root)s
DirectoryIndex index.html index.php
# List of modules
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
# ERP5 buildout my.cnf template based on my-huge.cnf shipped with mysql
# The MySQL server
[mysqld]
# ERP5 by default requires InnoDB storage. MySQL by default fallbacks to using
# different engine, like MyISAM. Such behaviour generates problems only, when
# tables requested as InnoDB are silently created with MyISAM engine.
#
# Loud fail is really required in such case.
sql-mode="NO_ENGINE_SUBSTITUTION"
skip-show-database
port = %(tcp_port)s
bind-address = %(ip)s
socket = %(socket)s
datadir = %(data_directory)s
pid-file = %(pid_file)s
log-error = %(error_log)s
log-slow-file = %(slow_query_log)s
long_query_time = 5
max_allowed_packet = 128M
query_cache_size = 32M
plugin-load = ha_innodb_plugin.so
# The following are important to configure and depend a lot on to the size of
# your database and the available resources.
#innodb_buffer_pool_size = 4G
#innodb_log_file_size = 256M
#innodb_log_buffer_size = 8M
# Some dangerous settings you may want to uncomment if you only want
# performance or less disk access. Useful for unit tests.
#innodb_flush_log_at_trx_commit = 0
#innodb_flush_method = nosync
#innodb_doublewrite = 0
#sync_frm = 0
# Uncomment the following if you need binary logging, which is recommended
# on production instances (either for replication or incremental backups).
#log-bin=mysql-bin
# Force utf8 usage
collation_server = utf8_unicode_ci
character_set_server = utf8
skip-character-set-client-handshake
[mysql]
no-auto-rehash
socket = %(socket)s
[mysqlhotcopy]
interactive-timeout
CREATE DATABASE IF NOT EXISTS %(database)s;
GRANT ALL PRIVILEGES ON %(database)s.* TO %(user)s@localhost IDENTIFIED BY %(password)r;
GRANT ALL PRIVILEGES ON %(database)s.* TO %(user)s@'%%' IDENTIFIED BY %(password)r;
GRANT SHOW DATABASES ON *.* TO %(user)s@localhost IDENTIFIED BY %(password)r;
GRANT SHOW DATABASES ON *.* TO %(user)s@'%%' IDENTIFIED BY %(password)r;
FLUSH PRIVILEGES;
EXIT
[PHP]
engine = On
safe_mode = Off
expose_php = On
error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
......@@ -122,7 +122,7 @@ SSLCARevocationPath %(ca_crl)s"""
zodb_configuration_string = '\n'.join(zodb_configuration_list)
zope_port = 12000
# One Distribution Node
zope_port +=1
zope_port += 1
self.installZope(ip, zope_port, 'zope_distribution', with_timerservice=True,
zodb_configuration_string=zodb_configuration_string,
tidstorage_config=tidstorage_config)
......
{
"name":"Parameter",
"title": "Default parameter schema for ERP5 Software Release.",
"type": "object",
"additionalProperties": false,
"properties": {
"flavour" : {
"type" : "string",
"title" : "Sofware Release Flavour",
"optional": true,
"default" : "default",
"enum" : ["default", "configurator"]
},
"bt5_list": {
"type":"array",
"title" : "Business Template List",
"items" : {"type": "string"},
"optional" : true
},
"bt5_repository_list": {
"type" : "array",
"title" : "Business Template Repository List",
"items" : {"type": "string"},
"optional" : true
}
}
}
......@@ -66,3 +66,7 @@ link_binary_list =
products = ${products:list}
environment =
LD_LIBRARY_PATH = ${file:location}/lib:${zlib:location}/lib:${freetype:location}/lib:${libXext:location}/lib:${libXau:location}/lib:${libX11:location}/lib:${libXdmcp:location}/lib:${libxcb:location}/lib
bt5_repository_list = ${bt5-repository:list}
configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catalog erp5_base erp5_workflow erp5_configurator erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung
This diff is collapsed.
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_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
<?php
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$i = 0;
$i++;
/* Server parameters */
$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
\ No newline at end of file
[buildout]
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
versions = versions
parts =
template
downloadcache-workaround
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../component/mariadb/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg
../../component/dcron/buildout.cfg
../../component/git/buildout.cfg
../../component/glib/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/perl/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/xtrabackup/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/zlib/buildout.cfg
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = efdb8509f40c86b1b73924fc1ce92f13
output = ${buildout:directory}/template.cfg
mode = 0644
[application]
recipe = hexagonit.recipe.download
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
#md5sum = Student may put here md5sum of this file, this is good idea
#If provided tarball does not containt top directory this option shall be changed o false
strip-top-level-dir = true
[application-template]
recipe = slapos.recipe.download
#url = https://docs.google.com/a/lnowak.com/uc?id=0B_lVQSQ57Cz7Yzg3MjFiYTgtNmJlYy00YjhhLWE4ZGEtYThlOWM2NzA3YWQ0&export=download&hl=en
url = ${:_profile_base_location_}/phpmyadmin-configuration-template.php.ini
#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 = config.inc.php
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
[instance-recipe]
egg = slapos.cookbook
module = osoeslaptraining.simple
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[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
[versions]
slapos.cookbook = 0.10
# Required by slapos.cookbook==0.10
slapos.core = 0.8
collective.recipe.template = 1.8
netaddr = 0.7.5
xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-004
\ No newline at end of file
[buildout]
parts =
instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
slaprunner = ${buildout:directory}/bin/slaprunner
slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr
slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp
slapproxy = ${buildout:directory}/bin/slapproxy
supervisor = ${buildout:directory}/bin/slapgrid-supervisor
[buildout]
extends =
../../stack/flask.cfg
parts =
template
eggs
instance-recipe-egg
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
[instance-recipe]
egg = slapos.cookbook
module = slaprunner
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 04b17b8665eb4e11ce3a4661ad98e5e3
[eggs]
eggs +=
slapos.toolbox
slapos.core
[versions]
slapos.cookbook = 0.10
# Required by slapos.cookbook==0.10
slapos.core = 0.8
collective.recipe.template = 1.8
netaddr = 0.7.5
xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-004
\ No newline at end of file
......@@ -9,7 +9,6 @@ parts +=
eggs += slapos.core
[instance-recipe]
egg = slapos.cookbook
module = vifib
[vifib]
......@@ -21,8 +20,15 @@ recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
repository = http://git.erp5.org/repos/slapos.core.git
command = ${git:location}/bin/git clone --quiet ${:repository} ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
branch = master
revision = f95ca3ccda07292895939ef9b48678acb5f524ce
command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location} && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
[local-bt5-repository]
# XXX: workaround for zc.buildout bug, as list += ends up with adding new entry
# after newline
list = ${erp5:location}/bt5 ${erp5:location}/product/ERP5/bootstrap ${vifib:location}/master/bt5
[products]
# XXX: Lack of eggification workaround
......
......@@ -28,7 +28,7 @@ allow-hosts =
extends =
# Exact version of Zope
http://svn.zope.org/repos/main/Zope/tags/2.12.18/versions.cfg
http://svn.zope.org/repos/main/Zope/tags/2.12.19/versions.cfg
../component/logrotate/buildout.cfg
../component/dcron/buildout.cfg
../component/file/buildout.cfg
......@@ -52,6 +52,7 @@ extends =
../component/python-2.7/buildout.cfg
../component/python-ldap-python/buildout.cfg
../component/rdiff-backup/buildout.cfg
../component/sphinx/buildout.cfg
../component/stunnel/buildout.cfg
../component/subversion/buildout.cfg
../component/tesseract/buildout.cfg
......@@ -84,6 +85,7 @@ parts =
libpng12
ghostscript
mariadb
sphinx
imagemagick
kumo
libreoffice-bin
......@@ -120,14 +122,36 @@ parts =
# get git repositories
erp5
genbt5list
[bt5-repository]
# Format:
# <url or path> [...]
#
# Use absolute paths for local repositories, and URLs for non-local otherwise.
#
list = ${local-bt5-repository:list}
[local-bt5-repository]
# Same as bt5-repository, but only local repository.
# Used to generate bt5lists.
list = ${erp5:location}/bt5 ${erp5:location}/product/ERP5/bootstrap
[genbt5list]
recipe = plone.recipe.command
stop-on-error = true
genbt5list = ${erp5:location}/product/ERP5/bin/genbt5list
command =
${buildout:executable} ${:genbt5list} ${local-bt5-repository:list}
update-command = ${:command}
[bootstrap2.6]
python = python2.6
[rebootstrap]
# Default first version of rebootstrapped python
version = 2
version = 3
section = python2.7
eggs = slapos.libnetworkcache
[itools]
pkgname = itools-0.50.8
......@@ -191,8 +215,9 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
repository = http://git.erp5.org/repos/erp5.git
branch = master
command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
revision = 0c37bafcc688c022d710f04ffafa226e3543a2cd
command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location} && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
[products]
# XXX: ERP5 related products are not defined as python distributions, so it is
......@@ -218,14 +243,16 @@ initialization =
import Zope2
os.environ['SOFTWARE_HOME'] = os.path.abspath(os.path.dirname(os.path.dirname(Zope2.__file__)))
os.environ['ZOPE_SCRIPTS'] = ''
temp_bt5_path_list = ['/'.join(['''${buildout:parts-directory}''', x, 'bt5']) for x in '''${erp5_repository_list:repository_id_list}'''.split(' ')]
parts_directory = '''${buildout:parts-directory}'''
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
temp_bt5_path_list = ['/'.join([parts_directory, x, 'bt5']) for x in repository_id_list]
bt5_path_list = []
[bt5_path_list.extend([bt5_path, '%s/*' % bt5_path]) for bt5_path in temp_bt5_path_list]
os.environ['erp5_tests_bt5_path'] = ','.join(bt5_path_list)
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x, 'tests']) for x in '''${erp5_repository_list:repository_id_list}'''.split(' ')]
sys.path[0:0] = ['/'.join([parts_directory, x, 'tests']) for x in repository_id_list]
import glob
product_test_path_list = []
[product_test_path_list.extend(glob.glob('/'.join(['''${buildout:parts-directory}''', x, 'product/*/tests']))) for x in '''${erp5_repository_list:repository_id_list}'''.split(' ')]
[product_test_path_list.extend(glob.glob('/'.join([parts_directory, x, 'product/*/tests']))) for x in repository_id_list]
sys.path[0:0] = product_test_path_list
[test_suite_runner]
......@@ -247,7 +274,8 @@ initialization =
import Zope2
os.environ['SOFTWARE_HOME'] = os.path.abspath(os.path.dirname(os.path.dirname(Zope2.__file__)))
os.environ['ZOPE_SCRIPTS'] = ''
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in '''${erp5_repository_list:repository_id_list}'''.split(' ')]
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
[instance-recipe-egg]
recipe = zc.recipe.egg
......@@ -365,7 +393,7 @@ scripts =
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-001
zc.buildout = 1.5.3-dev-SlapOS-004
# pin Acquisition and Products.DCWorkflow to Nexedi flavour of eggs
Acquisition = 2.13.7nxd001
......
......@@ -4,6 +4,18 @@ extends =
../component/python-2.7/buildout.cfg
../component/lxml-python/buildout.cfg
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
parts =
eggs
......@@ -11,7 +23,12 @@ parts =
unzip = true
[eggs]
python = python2.7
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
Flask
slapos.cookbook
[lxml-python]
python = python2.7
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