[Erp5-report] r45799 rafael - in /erp5/trunk/utils/slapos.recipe.cloudooo: ./ src/ src/slap...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 3 19:50:15 CEST 2011
Author: rafael
Date: Tue May 3 19:50:14 2011
New Revision: 45799
URL: http://svn.erp5.org?rev=45799&view=rev
Log:
Initial draft commit.
Added:
erp5/trunk/utils/slapos.recipe.cloudooo/CHANGES.txt (with props)
erp5/trunk/utils/slapos.recipe.cloudooo/MANIFEST.in
erp5/trunk/utils/slapos.recipe.cloudooo/README.txt (with props)
erp5/trunk/utils/slapos.recipe.cloudooo/setup.cfg
erp5/trunk/utils/slapos.recipe.cloudooo/setup.py
erp5/trunk/utils/slapos.recipe.cloudooo/src/
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/__init__.py
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/__init__.py
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/__init__.py
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/execute.py
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/killpidfromfile.py
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/cloudooo.cfg.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/haproxy.cfg.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/logrotate_entry.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/memcached.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/my.cnf.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/openssl.cnf.ca.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/tidstorage.py.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zeo.conf.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zeo-snippet.conf.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zodb-snippet.conf.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.in
erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.timerservice.in
Added: erp5/trunk/utils/slapos.recipe.cloudooo/CHANGES.txt
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/CHANGES.txt?rev=45799&view=auto
==============================================================================
(empty)
Propchange: erp5/trunk/utils/slapos.recipe.cloudooo/CHANGES.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: erp5/trunk/utils/slapos.recipe.cloudooo/MANIFEST.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/MANIFEST.in?rev=45799&view=auto
==============================================================================
(empty)
Added: erp5/trunk/utils/slapos.recipe.cloudooo/README.txt
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/README.txt?rev=45799&view=auto
==============================================================================
(empty)
Propchange: erp5/trunk/utils/slapos.recipe.cloudooo/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: erp5/trunk/utils/slapos.recipe.cloudooo/setup.cfg
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/setup.cfg?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/setup.cfg (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/setup.cfg [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = .dev
+tag_svn_revision = 1
Added: erp5/trunk/utils/slapos.recipe.cloudooo/setup.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/setup.py?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/setup.py (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/setup.py [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,35 @@
+from setuptools import setup, find_packages
+
+name = "slapos.recipe.cloudooo"
+version = '0.1'
+
+def read(name):
+ return open(name).read()
+
+long_description=( read('README.txt')
+ + '\n' +
+ read('CHANGES.txt')
+ )
+
+setup(
+ name = name,
+ version = version,
+ description = "ZC Buildout recipe for create an cloudooo instance",
+ long_description=long_description,
+ license = "GPLv3",
+ keywords = "buildout slapos cloudooo",
+ classifiers=[
+ "Framework :: Buildout :: Recipe",
+ "Programming Language :: Python",
+ ],
+ packages = find_packages('src'),
+ package_dir = {'': 'src'},
+ include_package_data=True,
+ install_requires = [
+ 'zc.recipe.egg',
+ 'setuptools',
+ 'slapos.lib.recipe',
+ ],
+ namespace_packages = ['slapos', 'slapos.recipe'],
+ entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
+ )
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/__init__.py?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/__init__.py (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/__init__.py [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/__init__.py?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/__init__.py (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/__init__.py [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/__init__.py?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/__init__.py (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/__init__.py [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,120 @@
+##############################################################################
+#
+# 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.lib.recipe.BaseSlapRecipe import BaseSlapRecipe
+import binascii
+import os
+import pkg_resources
+import hashlib
+import sys
+import zc.buildout
+import zc.recipe.egg
+
+# Taken from Zope2 egg
+def write_inituser(fn, user, password):
+ fp = open(fn, "w")
+ pw = binascii.b2a_base64(hashlib.sha1(password).digest())[:-1]
+ fp.write('%s:{SHA}%s\n' % (user, pw))
+ fp.close()
+ os.chmod(fn, 0600)
+
+
+class Recipe(BaseSlapRecipe):
+ def getTemplateFilename(self, template_name):
+ return pkg_resources.resource_filename(__name__,
+ 'template/%s' % template_name)
+
+ def _install(self):
+ self.path_list = []
+ self.requirements, self.ws = self.egg.working_set([__name__])
+ self.killpidfromfile = zc.buildout.easy_install.scripts(
+ [('killpidfromfile', __name__ + '.killpidfromfile',
+ 'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0]
+ self.path_list.append(self.killpidfromfile)
+ conversion_server_conf = self.installConversionServer(
+ self.getLocalIPv4Address(), 23000, 23060)
+
+ self.linkBinary()
+ self.setConnectionDict(dict(
+ site_url="http://%s:%s/" % (self.getLocalIPv4Address(), 23000),
+ ))
+ return self.path_list
+
+ def linkBinary(self):
+ """Links binaries to instance's bin directory for easier exposal"""
+ for linkline in self.options.get('link_binary_list', '').splitlines():
+ if not linkline:
+ continue
+ target = linkline.split()
+ if len(target) == 1:
+ target = target[0]
+ path, linkname = os.path.split(target)
+ else:
+ linkname = target[1]
+ target = target[0]
+ link = os.path.join(self.bin_directory, linkname)
+ 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(target, link)
+ self.logger.debug('Created link %r -> %r' % (link, target))
+ self.path_list.append(link)
+
+ def installConversionServer(self, ip, port, openoffice_port):
+ name = 'conversion_server'
+ working_directory = self.createDataDirectory(name)
+ conversion_server_dict = dict(
+ working_path=working_directory,
+ uno_path=self.options['ooo_uno_path'],
+ office_binary_path=self.options['ooo_binary_path'],
+ ip=ip,
+ port=port,
+ openoffice_port=openoffice_port,
+ )
+ for env_line in self.options['environment'].splitlines():
+ env_line = env_line.strip()
+ if not env_line:
+ continue
+ if '=' in env_line:
+ env_key, env_value = env_line.split('=')
+ conversion_server_dict[env_key.strip()] = env_value.strip()
+ else:
+ raise zc.buildout.UserError('Line %r in environment parameter is '
+ 'incorrect' % env_line)
+ config_file = self.createConfigurationFile(name + '.cfg',
+ self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'),
+ conversion_server_dict))
+ self.path_list.append(config_file)
+ self.path_list.extend(zc.buildout.easy_install.scripts([(name,
+ __name__ + '.execute', 'execute_with_signal_translation')], self.ws,
+ sys.executable, self.wrapper_directory,
+ arguments=[self.options['ooo_paster'].strip(), 'serve', config_file]))
+ return {
+ name + '_port': conversion_server_dict['port'],
+ name + '_ip': conversion_server_dict['ip']
+ }
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/execute.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/execute.py?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/execute.py (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/execute.py [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,38 @@
+import sys
+import os
+import signal
+import subprocess
+import time
+
+
+def execute(args):
+ """Portable execution with process replacement"""
+ # Note: Candidate for slapos.lib.recipe
+ os.execv(args[0], args)
+
+child_pg = None
+
+
+def sig_handler(signal, frame):
+ print 'Received signal %r, killing children and exiting' % signal
+ if child_pg is not None:
+ os.killpg(child_pg, signal.SIGHUP)
+ os.killpg(child_pg, signal.SIGTERM)
+ sys.exit(0)
+
+signal.signal(signal.SIGINT, sig_handler)
+signal.signal(signal.SIGQUIT, sig_handler)
+signal.signal(signal.SIGTERM, sig_handler)
+
+
+def execute_with_signal_translation(args):
+ """Run process as children and translate from SIGTERM to another signal"""
+ child = subprocess.Popen(args, close_fds=True, preexec_fn=os.setsid)
+ child_pg = child.pid
+ try:
+ print 'Process %r started' % args
+ while True:
+ time.sleep(10)
+ finally:
+ os.killpg(child_pg, signal.SIGHUP)
+ os.killpg(child_pg, signal.SIGTERM)
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/killpidfromfile.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/killpidfromfile.py?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/killpidfromfile.py (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/killpidfromfile.py [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,12 @@
+import sys
+import os
+import signal
+def killpidfromfile():
+ file = sys.argv[1]
+ sig = getattr(signal, sys.argv[2], None)
+ if sig is None:
+ raise ValueError('Unknwon signal name %s' % sys.argv[2])
+ if os.path.exists(file):
+ pid = int(open(file).read())
+ print 'Killing pid %s with signal %s' % (pid, sys.argv[2])
+ os.kill(pid, sig)
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/cloudooo.cfg.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/cloudooo.cfg.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/cloudooo.cfg.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/cloudooo.cfg.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,54 @@
+[app:main]
+use = egg:cloudooo
+#
+## System config
+#
+debug_mode = True
+# Folder where pid files, lock files and virtual frame buffer mappings
+# are stored. In this folder is necessary create a folder tmp, because this
+# folder is used to create all temporary documents.
+working_path = %(working_path)s
+# Folder where UNO library is installed
+uno_path = %(uno_path)s
+# Folder where soffice.bin is installed
+office_binary_path = %(office_binary_path)s
+#
+## Monitor Settings
+#
+# Limit to use the Openoffice Instance. if pass of the limit, the instance is
+# stopped and another is started.
+limit_number_request = 100
+# Interval to check the factory
+monitor_interval = 10
+timeout_response = 180
+enable_memory_monitor = True
+# Set the limit in MB
+# e.g 1000 = 1 GB, 100 = 100 MB
+limit_memory_used = 3000
+#
+## OOFactory Settings
+#
+# The pool consist of several OpenOffice.org instances
+application_hostname = %(ip)s
+# OpenOffice Port
+openoffice_port = %(openoffice_port)s
+# LD_LIBRARY_PATH passed to OpenOffice
+env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s
+
+#
+# Mimetype Registry
+# It is used to select the handler that will be used in conversion.
+# Priority matters, first match take precedence on next lines.
+mimetype_registry =
+ application/pdf * pdf
+ application/vnd.oasis.opendocument* * ooo
+ application/vnd.sun.xml* * ooo
+ text/* * ooo
+ image/* image/* imagemagick
+ video/* * ffmpeg
+ * application/vnd.oasis.opendocument* ooo
+
+[server:main]
+use = egg:PasteScript#wsgiutils
+host = %(ip)s
+port = %(port)s
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/haproxy.cfg.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/haproxy.cfg.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/haproxy.cfg.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/haproxy.cfg.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,26 @@
+global
+ maxconn 4096
+
+defaults
+ log global
+ mode http
+ option httplog
+ option dontlognull
+ retries 1
+ option redispatch
+ maxconn 2000
+ timeout server 3000s
+ timeout queue 5s
+ timeout connect 10s
+ timeout client 3600s
+
+listen %(name)s %(ip)s:%(port)s
+ cookie SERVERID insert
+ balance roundrobin
+
+%(server_text)s
+
+ option httpchk GET %(server_check_path)s
+
+ stats uri /haproxy
+ stats realm Global\ statistics
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/logrotate_entry.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/logrotate_entry.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/logrotate_entry.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/logrotate_entry.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,12 @@
+%(file_list)s {
+ daily
+ dateext
+ rotate 30
+ compress
+ notifempty
+ sharedscripts
+ create
+ postrotate
+ %(postrotate)s
+ endscript
+}
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/memcached.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/memcached.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/memcached.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/memcached.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec %(memcached_binary)s -p %(memcached_port)s -U %(memcached_port)s -l %(memcached_ip)s
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/my.cnf.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/my.cnf.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/my.cnf.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/my.cnf.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,52 @@
+# 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
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/openssl.cnf.ca.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/openssl.cnf.ca.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/openssl.cnf.ca.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/openssl.cnf.ca.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,350 @@
+#
+# OpenSSL example configuration file.
+# This is mostly being used for generation of certificate requests.
+#
+
+# This definition stops the following lines choking if HOME isn't
+# defined.
+HOME = .
+RANDFILE = $ENV::HOME/.rnd
+
+# Extra OBJECT IDENTIFIER info:
+#oid_file = $ENV::HOME/.oid
+oid_section = new_oids
+
+# To use this configuration file with the "-extfile" option of the
+# "openssl x509" utility, name here the section containing the
+# X.509v3 extensions to use:
+# extensions =
+# (Alternatively, use a configuration file that has only
+# X.509v3 extensions in its main [= default] section.)
+
+[ new_oids ]
+
+# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
+# Add a simple OID like this:
+# testoid1=1.2.3.4
+# Or use config file substitution like this:
+# testoid2=${testoid1}.5.6
+
+# Policies used by the TSA examples.
+tsa_policy1 = 1.2.3.4.1
+tsa_policy2 = 1.2.3.4.5.6
+tsa_policy3 = 1.2.3.4.5.7
+
+####################################################################
+[ ca ]
+default_ca = CA_default # The default ca section
+
+####################################################################
+[ CA_default ]
+
+dir = %(working_directory)s # Where everything is kept
+certs = $dir/certs # Where the issued certs are kept
+crl_dir = $dir/crl # Where the issued crl are kept
+database = $dir/index.txt # database index file.
+#unique_subject = no # Set to 'no' to allow creation of
+ # several ctificates with same subject.
+new_certs_dir = $dir/newcerts # default place for new certs.
+
+certificate = $dir/cacert.pem # The CA certificate
+serial = $dir/serial # The current serial number
+crlnumber = $dir/crlnumber # the current crl number
+ # must be commented out to leave a V1 CRL
+crl = $dir/crl.pem # The current CRL
+private_key = $dir/private/cakey.pem # The private key
+RANDFILE = $dir/private/.rand # private random number file
+
+x509_extensions = usr_cert # The extentions to add to the cert
+
+# Comment out the following two lines for the "traditional"
+# (and highly broken) format.
+name_opt = ca_default # Subject Name options
+cert_opt = ca_default # Certificate field options
+
+# Extension copying option: use with caution.
+# copy_extensions = copy
+
+# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
+# so this is commented out by default to leave a V1 CRL.
+# crlnumber must also be commented out to leave a V1 CRL.
+# crl_extensions = crl_ext
+
+default_days = 3650 # how long to certify for
+default_crl_days= 30 # how long before next CRL
+default_md = default # use public key default MD
+preserve = no # keep passed DN ordering
+
+# A few difference way of specifying how similar the request should look
+# For type CA, the listed attributes must be the same, and the optional
+# and supplied fields are just that :-)
+policy = policy_match
+
+# For the CA policy
+[ policy_match ]
+countryName = match
+stateOrProvinceName = match
+organizationName = match
+organizationalUnitName = optional
+commonName = supplied
+emailAddress = optional
+
+# For the 'anything' policy
+# At this point in time, you must list all acceptable 'object'
+# types.
+[ policy_anything ]
+countryName = optional
+stateOrProvinceName = optional
+localityName = optional
+organizationName = optional
+organizationalUnitName = optional
+commonName = supplied
+emailAddress = optional
+
+####################################################################
+[ req ]
+default_bits = 2048
+default_md = sha1
+default_keyfile = privkey.pem
+distinguished_name = req_distinguished_name
+#attributes = req_attributes
+x509_extensions = v3_ca # The extentions to add to the self signed cert
+
+# Passwords for private keys if not present they will be prompted for
+# input_password = secret
+# output_password = secret
+
+# This sets a mask for permitted string types. There are several options.
+# default: PrintableString, T61String, BMPString.
+# pkix : PrintableString, BMPString (PKIX recommendation before 2004)
+# utf8only: only UTF8Strings (PKIX recommendation after 2004).
+# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
+# MASK:XXXX a literal mask value.
+# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
+string_mask = utf8only
+
+# req_extensions = v3_req # The extensions to add to a certificate request
+
+[ req_distinguished_name ]
+countryName = Country Name (2 letter code)
+countryName_value = %(country_code)s
+countryName_min = 2
+countryName_max = 2
+
+stateOrProvinceName = State or Province Name (full name)
+stateOrProvinceName_value = %(state)s
+
+localityName = Locality Name (eg, city)
+localityName_value = %(city)s
+
+0.organizationName = Organization Name (eg, company)
+0.organizationName_value = %(company)s
+
+# we can do this but it is not needed normally :-)
+#1.organizationName = Second Organization Name (eg, company)
+#1.organizationName_default = World Wide Web Pty Ltd
+
+commonName = Common Name (eg, your name or your server\'s hostname)
+commonName_max = 64
+
+emailAddress = Email Address
+emailAddress_value = %(email_address)s
+emailAddress_max = 64
+
+# SET-ex3 = SET extension number 3
+
+#[ req_attributes ]
+#challengePassword = A challenge password
+#challengePassword_min = 4
+#challengePassword_max = 20
+#
+#unstructuredName = An optional company name
+
+[ usr_cert ]
+
+# These extensions are added when 'ca' signs a request.
+
+# This goes against PKIX guidelines but some CAs do it and some software
+# requires this to avoid interpreting an end user certificate as a CA.
+
+basicConstraints=CA:FALSE
+
+# Here are some examples of the usage of nsCertType. If it is omitted
+# the certificate can be used for anything *except* object signing.
+
+# This is OK for an SSL server.
+# nsCertType = server
+
+# For an object signing certificate this would be used.
+# nsCertType = objsign
+
+# For normal client use this is typical
+# nsCertType = client, email
+
+# and for everything including object signing:
+# nsCertType = client, email, objsign
+
+# This is typical in keyUsage for a client certificate.
+# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+# This will be displayed in Netscape's comment listbox.
+nsComment = "OpenSSL Generated Certificate"
+
+# PKIX recommendations harmless if included in all certificates.
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer
+
+# This stuff is for subjectAltName and issuerAltname.
+# Import the email address.
+# subjectAltName=email:copy
+# An alternative to produce certificates that aren't
+# deprecated according to PKIX.
+# subjectAltName=email:move
+
+# Copy subject details
+# issuerAltName=issuer:copy
+
+#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
+#nsBaseUrl
+#nsRevocationUrl
+#nsRenewalUrl
+#nsCaPolicyUrl
+#nsSslServerName
+
+# This is required for TSA certificates.
+# extendedKeyUsage = critical,timeStamping
+
+[ v3_req ]
+
+# Extensions to add to a certificate request
+
+basicConstraints = CA:FALSE
+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+[ v3_ca ]
+
+
+# Extensions for a typical CA
+
+
+# PKIX recommendation.
+
+subjectKeyIdentifier=hash
+
+authorityKeyIdentifier=keyid:always,issuer
+
+# This is what PKIX recommends but some broken software chokes on critical
+# extensions.
+#basicConstraints = critical,CA:true
+# So we do this instead.
+basicConstraints = CA:true
+
+# Key usage: this is typical for a CA certificate. However since it will
+# prevent it being used as an test self-signed certificate it is best
+# left out by default.
+# keyUsage = cRLSign, keyCertSign
+
+# Some might want this also
+# nsCertType = sslCA, emailCA
+
+# Include email address in subject alt name: another PKIX recommendation
+# subjectAltName=email:copy
+# Copy issuer details
+# issuerAltName=issuer:copy
+
+# DER hex encoding of an extension: beware experts only!
+# obj=DER:02:03
+# Where 'obj' is a standard or added object
+# You can even override a supported extension:
+# basicConstraints= critical, DER:30:03:01:01:FF
+
+[ crl_ext ]
+
+# CRL extensions.
+# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
+
+# issuerAltName=issuer:copy
+authorityKeyIdentifier=keyid:always
+
+[ proxy_cert_ext ]
+# These extensions should be added when creating a proxy certificate
+
+# This goes against PKIX guidelines but some CAs do it and some software
+# requires this to avoid interpreting an end user certificate as a CA.
+
+basicConstraints=CA:FALSE
+
+# Here are some examples of the usage of nsCertType. If it is omitted
+# the certificate can be used for anything *except* object signing.
+
+# This is OK for an SSL server.
+# nsCertType = server
+
+# For an object signing certificate this would be used.
+# nsCertType = objsign
+
+# For normal client use this is typical
+# nsCertType = client, email
+
+# and for everything including object signing:
+# nsCertType = client, email, objsign
+
+# This is typical in keyUsage for a client certificate.
+# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+# This will be displayed in Netscape's comment listbox.
+nsComment = "OpenSSL Generated Certificate"
+
+# PKIX recommendations harmless if included in all certificates.
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer
+
+# This stuff is for subjectAltName and issuerAltname.
+# Import the email address.
+# subjectAltName=email:copy
+# An alternative to produce certificates that aren't
+# deprecated according to PKIX.
+# subjectAltName=email:move
+
+# Copy subject details
+# issuerAltName=issuer:copy
+
+#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
+#nsBaseUrl
+#nsRevocationUrl
+#nsRenewalUrl
+#nsCaPolicyUrl
+#nsSslServerName
+
+# This really needs to be in place for it to be a proxy certificate.
+proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
+
+####################################################################
+[ tsa ]
+
+default_tsa = tsa_config1 # the default TSA section
+
+[ tsa_config1 ]
+
+# These are used by the TSA reply generation only.
+dir = /etc/pki/tls # TSA root directory
+serial = $dir/tsaserial # The current serial number (mandatory)
+crypto_device = builtin # OpenSSL engine to use for signing
+signer_cert = $dir/tsacert.pem # The TSA signing certificate
+ # (optional)
+certs = $dir/cacert.pem # Certificate chain to include in reply
+ # (optional)
+signer_key = $dir/private/tsakey.pem # The TSA private key (optional)
+
+default_policy = tsa_policy1 # Policy if request did not specify it
+ # (optional)
+other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
+digests = md5, sha1 # Acceptable message digests (mandatory)
+accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
+clock_precision_digits = 0 # number of digits after dot. (optional)
+ordering = yes # Is ordering defined for timestamps?
+ # (optional, default: no)
+tsa_name = yes # Must the TSA name be included in the reply?
+ # (optional, default: no)
+ess_cert_id_chain = no # Must the ESS cert id chain be included?
+ # (optional, default: no)
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/tidstorage.py.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/tidstorage.py.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/tidstorage.py.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/tidstorage.py.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,15 @@
+known_tid_storage_identifier_dict = %(known_tid_storage_identifier_dict)s
+base_url = '%(base_url)s'
+host = '%(host)s'
+port = %(port)s
+
+#logfile_name = 'tidstorage.log'
+#pidfile_name = 'tidstorage.pid'
+#fork = False
+#setuid = None
+#setgid = None
+#status_file = 'tidstorage.tid'
+burst_period = 30
+full_dump_period = 300
+
+timestamp_file_path = '%(timestamp_file_path)s'
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zeo.conf.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zeo.conf.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zeo.conf.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zeo.conf.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,15 @@
+# ZEO configuration file generated by SlapOS
+<zeo>
+ address %(zeo_ip)s:%(zeo_port)s
+ read-only false
+ invalidation-queue-size 100
+ pid-filename %(zeo_pid)s
+</zeo>
+
+%(zeo_filestorage_snippet)s
+
+<eventlog>
+ <logfile>
+ path %(zeo_event_log)s
+ </logfile>
+</eventlog>
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zeo-snippet.conf.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zeo-snippet.conf.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zeo-snippet.conf.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zeo-snippet.conf.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,8 @@
+<zodb_db %(storage_name)s>
+ mount-point %(mount_point)s
+ <zeoclient>
+ server %(address)s
+ storage %(storage_name)s
+ name %(storage_name)s
+ </zeoclient>
+</zodb_db>
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zodb-snippet.conf.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zodb-snippet.conf.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zodb-snippet.conf.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope-zodb-snippet.conf.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,6 @@
+<zodb_db root>
+ <filestorage>
+ path %(zodb_root_path)s
+ </filestorage>
+ mount-point /
+</zodb_db>
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,49 @@
+## Zope 2 configuration file generated by SlapOS
+
+# Some defines
+%%define INSTANCE %(instance)s
+instancehome $INSTANCE
+
+# Used products
+%(products)s
+
+# Environment override
+<environment>
+ TMP %(tmp_directory)s
+ TMPDIR %(tmp_directory)s
+ HOME %(tmp_directory)s
+ PATH %(path)s
+</environment>
+
+# No need to debug
+debug-mode off
+
+# One thread is safe enough
+zserver-threads 1
+
+# File location
+pid-filename %(pid-filename)s
+lock-filename %(lock-filename)s
+
+# Logging configuration
+<eventlog>
+ <logfile>
+ path %(event_log)s
+ </logfile>
+</eventlog>
+<logger access>
+ <logfile>
+ path %(z2_log)s
+ </logfile>
+</logger>
+
+# Serving configuration
+<http-server>
+ address %(address)s
+</http-server>
+
+# ZODB configuration
+%(zodb_configuration_string)s
+<zoperunner>
+ program $INSTANCE/bin/runzope
+</zoperunner>
Added: erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.timerservice.in
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.timerservice.in?rev=45799&view=auto
==============================================================================
--- erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.timerservice.in (added)
+++ erp5/trunk/utils/slapos.recipe.cloudooo/src/slapos/recipe/cloudooo/template/zope.conf.timerservice.in [utf8] Tue May 3 19:50:14 2011
@@ -0,0 +1,6 @@
+
+# ERP5 Timer Service
+%%import timerserver
+<timer-server>
+ interval 5
+</timer-server>
More information about the Erp5-report
mailing list