Commit a1659ff2 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Use erp5.extension.sectionextender to support properly supervisor

programs, namely only supervisor programs in sections added to parts 
will actually be in supervisord.conf.

Previously, loading a .cfg specifying a supervisor programs would 
add it to supervisord.conf even if it was not in parts and it was not 
easily extendable neither.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41801 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 659b0c2f
No related merge requests found
......@@ -57,11 +57,10 @@ virtual-display-id = 77
virtual-screen = 0
server-hostname = 0.0.0.0
server-port = 8011
supervisor-priority = 30
supervisor-program =
${:supervisor-priority} ${:_buildout_section_name_} (stopsignal=HUP) ${buildout:bin-directory}/paster [serve ${cloudooo-instance:conf-output}]
# this name is only for backward compatibility
[cloudooo-instance-template]
<= cloudooo-instance
[configuration]
supervisor_programs +=
30 cloudooo (stopsignal=HUP) ${buildout:bin-directory}/paster [serve ${cloudooo-instance:conf-output}]
......@@ -11,7 +11,9 @@ memcached_software_bin = ${software_definition:software_home}/parts/memcached/bi
memcached_bin_folder = ${buildout:data-bin-directory}
memcached_conf_file = ${buildout:etc-directory}/memcached.conf
instancehome = ${buildout:var-directory}/memcached
supervisor-priority = 20
supervisor-program =
${:supervisor-priority} ${:_buildout_section_name_} (autorestart=true) ${:memcached_bin_folder}/memcached
### JPS : Problem : promise-based config : We don't know if goal is reached
### + don't crush everything each time if nothing changed
......@@ -40,7 +42,3 @@ memcached_factor = 1.25
memcached_key_size = 48
# -t
memcached_threads = 4
[configuration]
supervisor_programs +=
20 memcached (autorestart=true) ${memcached-instance:memcached_bin_folder}/memcached
......@@ -36,10 +36,9 @@ mysql_slow_query_time = 5
# Add some extra configuration to mysqld part in my.cnf
mysqld-extra-configuration =
supervisor-priority = 10
supervisor-program =
${:supervisor-priority} ${:_buildout_section_name_} (autorestart=true) ${buildout:data-bin-directory}/pidproxy [ ${configuration:mysql_pid} ${buildout:data-bin-directory}/mysqld_safe ]
[mysql-server-template]
<= mysql-instance
[configuration]
supervisor_programs +=
10 mysql (autorestart=true) ${buildout:data-bin-directory}/pidproxy [ ${configuration:mysql_pid} ${buildout:data-bin-directory}/mysqld_safe ]
......@@ -10,6 +10,9 @@ oood_conf_file = ${buildout:etc-directory}/oood.conf
wrapper_part = oood-wrapper
configuration_part = oood-configuration
supervisor-priority = 20
supervisor-program =
${:supervisor-priority} ${:_buildout_section_name_} (autorestart=true stopsignal=TERM stopwaitsecs=30) ${buildout:data-bin-directory}/oood-runserw ${buildout:etc-directory}
[oood-wrapper]
openoffice_python = ${software_definition:openoffice_software}/program/python
......@@ -44,7 +47,3 @@ update-command = ${:command}
[conversion-server-template]
<= oood-instance
[configuration]
supervisor_programs +=
20 oood (autorestart=true stopsignal=TERM stopwaitsecs=30) ${buildout:data-bin-directory}/oood-runserw ${buildout:etc-directory}
......@@ -25,3 +25,8 @@ sphinx_conf_file = ${buildout:etc-directory}/sphinx.conf
sphinx_address = ${configuration:sphinx_address}
sphinx_port = ${configuration:sphinx_port}
sphinx_sql_port = ${configuration:sphinx_sql_port}
supervisor-priority = 30
supervisor-program =
${:supervisor-priority} ${:_buildout_section_name_} (autorestart=true stopsignal=TERM) ${buildout:data-bin-directory}/searchd [ --nodetach ]
......@@ -2,6 +2,10 @@
parts =
supervisor-instance
supervisor-section-extender-target-section = supervisor
supervisor-section-extender-target-option = programs
supervisor-section-extender-source-option = supervisor-program
[configuration]
supervisor_port = 9001
supervisor_host = 127.0.0.1
......@@ -28,5 +32,4 @@ depends = ${pidproxy:recipe}
recipe = collective.recipe.supervisor
serverurl = http://${configuration:supervisor_host}:${configuration:supervisor_port}
pp = ${buildout:directory}/eggs/supervisor-3.0a7-py2.5.egg/supervisor/pidproxy.py
programs = ${configuration:supervisor_programs}
port = ${configuration:supervisor_host}:${configuration:supervisor_port}
......@@ -29,6 +29,8 @@ parts =
versions = versions
extensions += erp5.extension.sectionextender
[eggs]
recipe = zc.recipe.egg
scripts =
......
......@@ -28,11 +28,7 @@ parts =
versions = versions
[configuration]
supervisor_programs =
10 mysql (autorestart=true) ${buildout:data-bin-directory}/pidproxy [ ${configuration:mysql_pid} ${buildout:data-bin-directory}/mysqld_safe ]
20 oood (autorestart=true stopsignal=TERM stopwaitsecs=30) ${buildout:data-bin-directory}/oood-runserw ${buildout:etc-directory}
30 sphinx (autorestart=true stopsignal=TERM) ${buildout:data-bin-directory}/searchd [ --nodetach ]
extensions += erp5.extension.sectionextender
[software-links]
recipe = plone.recipe.command
......
......@@ -28,6 +28,7 @@ eggs =
erp5.recipe.sphinxserver
erp5.recipe.testrunner
erp5.recipe.zope2instance
erp5.extension.sectionextender
plone.recipe.command
supervisor
z3c.recipe.mkdir
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