Commit 3fc8ec81 authored by Benjamin Blanc's avatar Benjamin Blanc

Merge branch 'erp5-cluster-z2.13'

parents f1183441 9bb81bd4
...@@ -22,7 +22,7 @@ git-executable = ${git:location}/bin/git ...@@ -22,7 +22,7 @@ git-executable = ${git:location}/bin/git
[cloudooo] [cloudooo]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.6 python = python2.7
extra-paths = ${cloudooo-repository:location} extra-paths = ${cloudooo-repository:location}
eggs = eggs =
${lxml-python:egg} ${lxml-python:egg}
......
...@@ -44,6 +44,9 @@ configure-options = ...@@ -44,6 +44,9 @@ configure-options =
--enable-unicode=ucs4 --enable-unicode=ucs4
--with-system-expat --with-system-expat
--with-threads --with-threads
# Profiled build:
make-binary =
make-targets = make profile-opt && make install
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic, # the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
# which would otherwise load the system libmagic.so with ctypes # which would otherwise load the system libmagic.so with ctypes
......
...@@ -112,6 +112,7 @@ setup(name=name, ...@@ -112,6 +112,7 @@ setup(name=name,
'fontconfig = slapos.recipe.fontconfig:Recipe', 'fontconfig = slapos.recipe.fontconfig:Recipe',
'generate.mac = slapos.recipe.generatemac:Recipe', 'generate.mac = slapos.recipe.generatemac:Recipe',
'generate.password = slapos.recipe.generatepassword:Recipe', 'generate.password = slapos.recipe.generatepassword:Recipe',
'generic.scalability.launcher = slapos.recipe.generic_scalability_launcher:Recipe',
'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe',
'generic.kumofs = slapos.recipe.generic_kumofs:Recipe', 'generic.kumofs = slapos.recipe.generic_kumofs:Recipe',
'generic.memcached = slapos.recipe.generic_memcached:Recipe', 'generic.memcached = slapos.recipe.generic_memcached:Recipe',
......
...@@ -68,6 +68,7 @@ def updateMysql(args): ...@@ -68,6 +68,7 @@ def updateMysql(args):
while True: while True:
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--user=root'] mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--user=root']
if 'socket' in conf: if 'socket' in conf:
mysql_upgrade_list.insert(1)
mysql_upgrade_list.append('--socket=' + conf['socket']) mysql_upgrade_list.append('--socket=' + conf['socket'])
mysql_upgrade = subprocess.Popen(mysql_upgrade_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) mysql_upgrade = subprocess.Popen(mysql_upgrade_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = mysql_upgrade.communicate()[0] result = mysql_upgrade.communicate()[0]
...@@ -82,6 +83,7 @@ def updateMysql(args): ...@@ -82,6 +83,7 @@ def updateMysql(args):
print "No need to upgrade MySQL database" print "No need to upgrade MySQL database"
mysql_list = [conf['mysql_binary'].strip(), '-B', '--user=root'] mysql_list = [conf['mysql_binary'].strip(), '-B', '--user=root']
if 'socket' in conf: if 'socket' in conf:
mysql_list.insert(1)
mysql_list.append('--socket=' + conf['socket']) mysql_list.append('--socket=' + conf['socket'])
mysql = subprocess.Popen(mysql_list, stdin=subprocess.PIPE, mysql = subprocess.Popen(mysql_list, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# #
############################################################################## ##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
""" """
...@@ -80,6 +81,10 @@ class Recipe(GenericBaseRecipe): ...@@ -80,6 +81,10 @@ class Recipe(GenericBaseRecipe):
backend_dict = { backend_dict = {
self.options['name']: (self.options['port'], backend_list), self.options['name']: (self.options['port'], backend_list),
} }
if not backend_dict:
# Fail installation if backend_dict is empty, otherwise partition may be
# advertised as available although it provides no service.
raise UserError('backend-dict is empty')
server_snippet_filename = self.getTemplateFilename( server_snippet_filename = self.getTemplateFilename(
'haproxy-server-snippet.cfg.in') 'haproxy-server-snippet.cfg.in')
......
...@@ -14,8 +14,6 @@ parts += ...@@ -14,8 +14,6 @@ parts +=
# Local development # Local development
slapos.cookbook-repository slapos.cookbook-repository
check-recipe check-recipe
slapos.cookbook-python2.6
slapos.recipe.template-python2.6
# Create instance template # Create instance template
template template
...@@ -38,19 +36,6 @@ stop-on-error = true ...@@ -38,19 +36,6 @@ stop-on-error = true
update-command = ${:command} update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slapos.cookbook-python2.6]
recipe = zc.recipe.egg
eggs = slapos.cookbook
scripts =
python = python2.6
ugly-depend-on = ${slapos.cookbook-repository:command} ${slapos.cookbook-repository:update-command}
[slapos.recipe.template-python2.6]
recipe = zc.recipe.egg
eggs = slapos.recipe.template
scripts =
python = python2.6
[template-jinja2-base] [template-jinja2-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in template = ${:_profile_base_location_}/${:filename}.in
......
...@@ -36,7 +36,6 @@ extends = ...@@ -36,7 +36,6 @@ extends =
../component/libreoffice-bin/buildout.cfg ../component/libreoffice-bin/buildout.cfg
../component/libpng/buildout.cfg ../component/libpng/buildout.cfg
../component/lxml-python/buildout.cfg ../component/lxml-python/buildout.cfg
../component/python-2.6/buildout.cfg
../component/python-2.7/buildout.cfg ../component/python-2.7/buildout.cfg
../component/xorg/buildout.cfg ../component/xorg/buildout.cfg
../component/fonts/buildout.cfg ../component/fonts/buildout.cfg
...@@ -77,7 +76,6 @@ parts = ...@@ -77,7 +76,6 @@ parts =
poppler poppler
ffmpeg ffmpeg
bootstrap2.6
rdiff-backup rdiff-backup
cloudooo cloudooo
...@@ -85,9 +83,6 @@ parts = ...@@ -85,9 +83,6 @@ parts =
develop += develop +=
${:parts-directory}/cloudooo ${:parts-directory}/cloudooo
[bootstrap2.6]
python = python2.6
[versions] [versions]
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-006 zc.buildout = 1.6.0-dev-SlapOS-006
...@@ -267,6 +267,7 @@ extra-context = ...@@ -267,6 +267,7 @@ extra-context =
key template_cluster_zope template-cluster-zope:target key template_cluster_zope template-cluster-zope:target
key template_erp5_single template-erp5-single:target key template_erp5_single template-erp5-single:target
key template_erp5_cluster template-erp5-cluster:target key template_erp5_cluster template-erp5-cluster:target
key template_scalability template-scalability:target
key template_kumofs template-kumofs:target key template_kumofs template-kumofs:target
key template_logrotate_base template-logrotate-base:rendered key template_logrotate_base template-logrotate-base:rendered
key template_mariadb template-mariadb:target key template_mariadb template-mariadb:target
...@@ -293,6 +294,11 @@ md5sum = 69961d8b60ce529baaf958dc76537ac5 ...@@ -293,6 +294,11 @@ md5sum = 69961d8b60ce529baaf958dc76537ac5
filename = instance-erp5-cluster.cfg.in filename = instance-erp5-cluster.cfg.in
md5sum = d4d95f1749e1d9d3701565f934fcd4dc md5sum = d4d95f1749e1d9d3701565f934fcd4dc
[template-scalability]
< = download-base
filename = instance-scalability.cfg.in
md5sum = fbbfece0272b819cda88895b6cb7258a
[template-zeo] [template-zeo]
< = download-base < = download-base
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
...@@ -516,7 +522,7 @@ extra-paths = ...@@ -516,7 +522,7 @@ extra-paths =
[zodbanalyze] [zodbanalyze]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.6 python = python2.7
eggs = eggs =
ZODB3 ZODB3
erp5.util erp5.util
...@@ -594,6 +600,16 @@ Products.CMFDefault = 2.2.2 ...@@ -594,6 +600,16 @@ Products.CMFDefault = 2.2.2
Products.CMFTopic = 2.2.1 Products.CMFTopic = 2.2.1
Products.CMFUid = 2.2.1 Products.CMFUid = 2.2.1
# newer version requires zope.traversing>=4.0.0a2.
zope.app.appsetup = 3.16.0
# newer version requires zope.i18n>=4.0.0a3
zope.app.publication = 3.14.0
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler).
zope.app.testing = 3.8.1
# Pinned versions # Pinned versions
Flask = 0.9 Flask = 0.9
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
...@@ -611,6 +627,7 @@ Products.LongRequestLogger = 1.1.0 ...@@ -611,6 +627,7 @@ Products.LongRequestLogger = 1.1.0
Products.MimetypesRegistry = 2.0.4 Products.MimetypesRegistry = 2.0.4
Products.PluginRegistry = 1.3 Products.PluginRegistry = 1.3
Products.TIDStorage = 5.4.8 Products.TIDStorage = 5.4.8
Products.ZSQLMethods = 2.13.4
Pygments = 1.6 Pygments = 1.6
StructuredText = 2.11.1 StructuredText = 2.11.1
WSGIUtils = 0.7 WSGIUtils = 0.7
...@@ -629,6 +646,7 @@ erp5.util = 0.4.34 ...@@ -629,6 +646,7 @@ erp5.util = 0.4.34
erp5diff = 0.8.1.5 erp5diff = 0.8.1.5
eventlet = 0.12.1 eventlet = 0.12.1
feedparser = 5.1.3 feedparser = 5.1.3
five.formlib = 1.0.4
five.localsitemanager = 2.0.5 five.localsitemanager = 2.0.5
fpconst = 0.7.2 fpconst = 0.7.2
gitdb = 0.5.4 gitdb = 0.5.4
......
{% if slap_software_type == software_type -%}
[buildout]
parts =
erp5-cluster
binary-wrap-launcher
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[erp5-cluster]
recipe = slapos.cookbook:request.serialised
sla = computer_guid
server-url = ${slap-connection:server-url}
key-file = ${slap-connection:key-file}
cert-file = ${slap-connection:cert-file}
computer-id = ${slap-connection:computer-id}
partition-id = ${slap-connection:partition-id}
name = ERP5 Cluster
software-url = ${slap-connection:software-release-url}
software-type = cluster
sla-computer_guid = {{ slapparameter_dict.get('launcher-computer-guid', computer_id) }}
config =
use-ipv6
${:extra-config}
extra-config =
config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
[launcher-param]
binary-path = ${rootdirectory:bin}/launcher
wrapper-path = ${rootdirectory:bin}/launcher
log-path = ${basedirectory:log}/launcher.log
test-suite-title = {{ slapparameter_dict.get('test-suite-title', '') }}
[binary-wrap-launcher]
recipe = slapos.cookbook:wrapper
command-line = "${launcher-param:binary-path} --test_suite_title ${launcher-param:test-suite-title} --log ${launcher-param:log-path}"
output = ${launcher-param:binary-path}
return = url
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = ${rootdirectory:var}/log
run = ${rootdirectory:var}/run
services = ${rootdirectory:etc}/run
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
srv = ${buildout:directory}/srv
bin = ${buildout:directory}/bin
{% endif %}
\ No newline at end of file
...@@ -230,6 +230,16 @@ extra-context = ...@@ -230,6 +230,16 @@ extra-context =
# Must match the key id in [switch-softwaretype] which uses this section. # Must match the key id in [switch-softwaretype] which uses this section.
raw software_type cluster-zope raw software_type cluster-zope
[dynamic-template-scalability]
< = jinja2-template-base
template = {{ template_scalability }}
filename = instance-scalability.cfg
extensions = jinja2.ext.do
extra-context =
key local_bt5_repository dynamic-template-cluster-erp5-parameters:local-bt5-repository
# Must match the key id in [switch-softwaretype] which uses this section.
raw software_type scalability
[dynamic-template-kumofs-parameters] [dynamic-template-kumofs-parameters]
dash-location = {{ dash_location }} dash-location = {{ dash_location }}
dcron-location = {{ dcron_location }} dcron-location = {{ dcron_location }}
...@@ -274,6 +284,7 @@ extra-context = ...@@ -274,6 +284,7 @@ extra-context =
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${template-erp5-single:rendered} default = ${template-erp5-single:rendered}
cluster = ${dynamic-template-cluster-erp5:rendered} cluster = ${dynamic-template-cluster-erp5:rendered}
scalability = ${dynamic-template-scalability:rendered}
kumofs = ${dynamic-template-kumofs:rendered} kumofs = ${dynamic-template-kumofs:rendered}
cloudooo = ${dynamic-template-cloudooo:rendered} cloudooo = ${dynamic-template-cloudooo:rendered}
zope = ${dynamic-template-zope:rendered} zope = ${dynamic-template-zope:rendered}
......
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