diff --git a/software/erp5/instance-haproxy.cfg b/software/erp5/instance-haproxy.cfg deleted file mode 100644 index 182cfcdded90666ce12579463c3dc7da0755b2cb..0000000000000000000000000000000000000000 --- a/software/erp5/instance-haproxy.cfg +++ /dev/null @@ -1,49 +0,0 @@ -############################# -# -# Instanciate haproxy -# -# haproxy-id -- local id of the requested haproxy (login, web,...) -# -# haproxy-port -- ip port to use to run the process -# -# maxconn -- max connection per server -# -# site-id -- ID of the ERP5 site object in ZODB -# -# storage_list -- string with list of all resquested storage -# Example: event_module person_module -# -############################# -[buildout] -parts = - haproxy-instance - publish-haproxy-connection-information - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -services = $${rootdirectory:etc}/run/ - -[haproxy-instance] -recipe = slapos.cookbook:haproxy -name = $${slap-parameter:haproxy-id} -conf-path = $${rootdirectory:etc}/haproxy-$${slap-parameter:haproxy-id}.cfg -ip = $${slap-network-information:local-ipv4} -port = $${slap-parameter:haproxy-port} -maxconn = $${slap-parameter:maxconn} -server-check-path = /$${slap-parameter:site-id}/getId - -wrapper-path = $${basedirectory:services}/haproxy_$${slap-parameter:haproxy-id} -binary-path = ${memcached:location}/bin/memcached - -[publish-haproxy-connection-information] -recipe = slapos.cookbook:publishurl -url = http://$${haproxy-instance:ip}:$${haproxy-instance:port}/ - diff --git a/software/erp5/instance.cfg b/software/erp5/instance.cfg index 8722684456826b70b01d439a3489f15aad0fb702..d21d7310a91b650e134cc33d39fac4cae56c9eff 100644 --- a/software/erp5/instance.cfg +++ b/software/erp5/instance.cfg @@ -76,7 +76,6 @@ memcached = ${template-memcached:output} cloudooo = ${template-cloudooo:output} zope = ${template-zope:output} mariadb = ${template-mariadb:output} -haproxy = ${template-haproxy:output} tidstorage = $${dynamic-template-tidstorage:output} [slap-connection] diff --git a/software/erp5/snippet-backend.cfg b/software/erp5/snippet-backend.cfg index 3ed5d99ebc7d337aaed7f8acb031f1ddfcdb5517..48b8a88ce036585deb20a276572a68f337ba3f8c 100644 --- a/software/erp5/snippet-backend.cfg +++ b/software/erp5/snippet-backend.cfg @@ -33,3 +33,16 @@ post = ${buildout:bin-directory}/killpidfromfile $${apache-zope-backend-instance sharedscripts = true notifempty = true create = true + +[haproxy-instance] +recipe = slapos.cookbook:haproxy +name = $${slap-parameter:haproxy-id} +conf-path = $${rootdirectory:etc}/haproxy-$${slap-parameter:haproxy-id}.cfg +ip = $${slap-network-information:local-ipv4} +port = $${slap-parameter:haproxy-port} +maxconn = $${slap-parameter:maxconn} +server-check-path = /$${slap-parameter:site-id}/getId + +wrapper-path = $${basedirectory:services}/haproxy_$${slap-parameter:haproxy-id} +binary-path = ${memcached:location}/bin/memcached + diff --git a/software/erp5/software.cfg b/software/erp5/software.cfg index 195d90ddebc849e52445480a7d57a8077890510e..3d2eb5249fa6eef8fb3b70b861d976d037f3a59c 100644 --- a/software/erp5/software.cfg +++ b/software/erp5/software.cfg @@ -12,7 +12,6 @@ parts += template-cloudooo template-zope template-mariadb - template-haproxy template validator @@ -49,13 +48,6 @@ md5sum = d8a4a1976f4d22fae0668be0543438cc output = ${buildout:directory}/template-kumofs.cfg mode = 0644 -[template-haproxy] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-haproxy.cfg -md5sum = ba2b358bc65c69533761fef8662cca30 -output = ${buildout:directory}/template-haproxy.cfg -mode = 0644 - [instance-recipe] # Note: In case if specific instantiation recipe is used this is the place to # put its name @@ -68,7 +60,7 @@ configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catal [template] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg -md5sum = 2ad8b538cb3c812f497cdba7116d0d6a +md5sum = 52f3c27de3e9e5f9223084829c3ed2f6 output = ${buildout:directory}/template.cfg mode = 0644 @@ -110,7 +102,7 @@ mode = 0644 [template-snippet-backend] recipe = slapos.recipe.template url = ${:_profile_base_location_}/snippet-backend.cfg -md5sum = 8105ea278fc00549a4f5a12eba14cae0 +md5sum = 50963d43711c1f928841b844d38b7286 output = ${buildout:directory}/template-snippet-backend.cfg mode = 0644