Commit 506fcb47 authored by Romain Courteaud's avatar Romain Courteaud

Do not automatically modify production system.

Forcing modification of ERP5 internal configuration is not trustable for
production system (where custom configuration may have been applied by
administrator).

Instead, use erp5_promise bt5 which warn the administrator that the
configuration is not the expected one.
parent ff0a3100
......@@ -38,7 +38,7 @@ class Recipe(GenericBaseRecipe):
promise_parser = ConfigParser.RawConfigParser()
promise_parser.add_section('portal_templates')
promise_parser.set('portal_templates', 'repository', self.options['repository'])
promise_parser.set('portal_templates', 'repository', self.options['bt5-repository-url'])
promise_parser.set('portal_templates', 'expected_bt5', self.options['bt5'])
promise_parser.add_section('external_service')
......
......@@ -95,7 +95,8 @@ class Recipe(GenericSlapRecipe):
zeo_connection_string = '\n'.join(zeo_connection_list)
zope_dict.update(
timezone=json_data['timezone'],
zeo_connection_string=zeo_connection_string
zeo_connection_string=zeo_connection_string,
site_id=site_id,
)
# always one distribution node
current_zope_port += 1
......
......@@ -66,7 +66,7 @@ sla-computer_guid = $${slap-parameter:kumofs-computer-guid}
<=request-common
name = TidStorage
return = url-login
config = json mysql-url memcached-url cloudooo-url kumofs-url sphinx-url-sphinx sphinx-url-sphinx-sql
config = json mysql-url memcached-url cloudooo-url kumofs-url sphinx-url-sphinx sphinx-url-sphinx-sql smtp-url bt5 bt5-repository-url
config-json = $${slap-parameter:json}
config-mysql-url = $${request-mariadb:connection-url}
config-memcached-url = $${request-memcached:connection-url}
......@@ -74,6 +74,9 @@ config-cloudooo-url = $${request-cloudooo:connection-url}
config-kumofs-url = $${request-kumofs:connection-url}
config-sphinx-url-sphinx = $${request-sphinx:connection-url-sphinx}
config-sphinx-url-sphinx-sql = $${request-sphinx:connection-url-sphinx-sql}
config-bt5 = $${slap-parameter:bt5}
config-bt5-repository-url = $${slap-parameter:bt5-repository-url}
config-smtp-url = $${slap-parameter:smtp-url}
software-type = tidstorage
sla-computer_guid = $${slap-parameter:tidstorage-computer-guid}
......@@ -97,6 +100,13 @@ kumofs-computer-guid = $${slap-connection:computer-id}
tidstorage-computer-guid = $${slap-connection:computer-id}
varnish-computer-guid = $${slap-connection:computer-id}
cloudooo-json =
bt5 = erp5_full_text_myisam_catalog
erp5_configurator_standard
erp5_configurator_maxma_demo
erp5_configurator_ung
erp5_configurator_run_my_doc
bt5-repository-url = ${local-bt5-repository:list}
smtp-url = smtp://localhost:25/
# rest of parts are candidates for some generic stuff
[basedirectory]
......
......@@ -9,7 +9,8 @@ parts =
cron-entry-tidstorage-backup
logrotate-entry-tidstorage
binary-link
erp5-update
erp5-promise
erp5-bootstrap
%(part_list)s
eggs-directory = ${buildout:eggs-directory}
......@@ -195,22 +196,19 @@ link-binary =
${poppler:location}/bin/pdftotext
${poppler:location}/bin/pdftohtml
[erp5-update]
recipe = slapos.cookbook:erp5.update
# Configuration
url = http://$${%(zope_section)s:user}:$${%(zope_section)s:password}@$${%(zope_section)s:ip}:$${%(zope_section)s:port}/
[erp5-bootstrap]
recipe = slapos.cookbook:erp5.bootstrap
runner-path = $${basedirectory:services}/erp5-bootstrap
mysql-url = %(mysql-url)s
zope-url = http://$${%(zope_section)s:user}:$${%(zope_section)s:password}@$${%(zope_section)s:ip}:$${%(zope_section)s:port}/%(site_id)s
[erp5-promise]
recipe = slapos.cookbook:erp5.promise
promise-path = $${rootdirectory:etc}/erp5promise.cfg
kumofs-url = %(kumofs-url)s
memcached-url = %(memcached-url)s
cloudooo-url = %(cloudooo-url)s
site-id = %(site_id)s
openssl-binary = ${openssl:location}/bin/openssl
cadir-path = $${erp5-certificate-authority:ca-dir}
# Paths
update-wrapper = $${basedirectory:services}/erp5-update
smtp-url = $${slap-parameter:smtp-url}
bt5 = $${slap-parameter:bt5}
bt5-repository-url = $${slap-parameter:bt5-repository-url}
# Defaults
configurator-bt5-list = erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung erp5_configurator_ung erp5_configurator_run_my_doc
bt5-repository-list = $${%(zope_section)s:bt5-repository-list}
......@@ -46,6 +46,9 @@ runzope-binary = ${buildout:bin-directory}/runzope
# BT5 Configuration
bt5-repository-list =
promise-path = $${erp5-promise:promise-path}
site-id = %(site_id)s
[logrotate-entry-%(zope_id)s]
<= logrotate
recipe = slapos.cookbook:logrotate.d
......
......@@ -109,7 +109,7 @@ mode = 0644
[template-erp5-production]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-erp5-production.cfg
md5sum = 929fdc08c181581863a4097bd73a3a8b
md5sum = 54ad3c5e92af02d0db98d1085adf986d
output = ${buildout:directory}/template-erp5-production.cfg
mode = 0644
......@@ -123,14 +123,14 @@ mode = 0644
[template-snippet-master]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-master.cfg
md5sum = 2266f4fe51d988e4d300af34468f154c
md5sum = 14ffe48453a74190bdd289169220739f
output = ${buildout:directory}/template-snippet-master.cfg
mode = 0644
[template-snippet-zope]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-zope.cfg
md5sum = 209577505d44b9d3cd1473f792527159
md5sum = bcc68c31a16b35bee7111f9c6e02b781
output = ${buildout:directory}/template-snippet-zope.cfg
mode = 0644
......
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