From e9290925245ea5e0c2100836a0af2f1409cec101 Mon Sep 17 00:00:00 2001
From: Benjamin Blanc <benjamin.blanc@tiolive.com>
Date: Mon, 1 Jul 2013 17:23:41 +0200
Subject: [PATCH] scalability: up

---
 stack/erp5/buildout.cfg                |  4 +-
 stack/erp5/instance-scalability.cfg.in | 66 +++++++++++++++-----------
 stack/erp5/instance.cfg.in             |  1 +
 3 files changed, 42 insertions(+), 29 deletions(-)

diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg
index e01c87bed..52ee82075 100644
--- a/stack/erp5/buildout.cfg
+++ b/stack/erp5/buildout.cfg
@@ -243,7 +243,7 @@ md5sum = 564006953b7d7a12d40a14b6648b32f0
 # XXX: "template.cfg" is hardcoded in instanciation recipe
 filename = template.cfg
 template = ${:_profile_base_location_}/instance.cfg.in
-md5sum = c7c798d79cf1ad0f1ae6804ffc36626a
+md5sum = 16fc8b6907dcff36e2c47f11a0f2cd46
 extra-context =
     key apache_location apache:location
     key aspell_location aspell:location
@@ -322,7 +322,7 @@ md5sum = f271a904e7cc0039ce109f592fb48b5f
 [template-scalability]
 < = download-base
 filename = instance-scalability.cfg.in
-md5sum = 3c189ee04cc8910f722c1647d981fc8d
+md5sum = 56bdb54aa4c8e6eba6768965fee7e7ed
 
 [template-zeo]
 < = download-base
diff --git a/stack/erp5/instance-scalability.cfg.in b/stack/erp5/instance-scalability.cfg.in
index d499cf54d..b8e130744 100644
--- a/stack/erp5/instance-scalability.cfg.in
+++ b/stack/erp5/instance-scalability.cfg.in
@@ -2,8 +2,8 @@
 {% set site_id = slapparameter_dict.get('site-id', 'erp5') -%}
 {% set promise_path = slapparameter_dict.get('promise-path', 'erp5') -%}
 [buildout]
-extends = {{ template_cluster_zope }}
-  {{ template_erp5_cluster }}
+extends = {{ template_erp5_cluster }}
+  {{ template_zope }}
 parts =
   erp5-cluster
   binary-wrap-launcher
@@ -12,35 +12,11 @@ parts =
   erp5-bootstrap
   erp5-promise
   promise-erp5-site
-  
+
 eggs-directory = {{ eggs_directory }}
 develop-eggs-directory = {{ develop_eggs_directory }}
 offline = true
 
-[erp5-bootstrap]
-recipe = slapos.cookbook:erp5.bootstrap
-runner-path = ${basedirectory:services}/erp5-bootstrap
-mysql-url =  ${request-mariadb:connection-url}
-# Dirty way to get parameters
-zope-url = http://${zope-0:user}:insecure@${zope-0:ip}:${zope-0:port}/{{ site_id }}
-
-[erp5-promise]
-recipe = slapos.cookbook:erp5.promise
-promise-path = {{ promise_path }}
-kumofs-url = ${request-kumofs:connection-url}
-memcached-url = ${request-memcached:connection-url}
-cloudooo-url = ${request-cloudooo:connection-url}
-smtp-url = ${slap-parameter:smtp-url}
-bt5 = ${slap-parameter:bt5}
-bt5-repository-url = ${slap-parameter:bt5-repository-url}
-
-[promise-erp5-site]
-recipe = slapos.cookbook:check_url_available
-path = ${basedirectory:promises}/erp5site
-url = http://${zope-instance:ip}:${zope-instance:port}/${slap-parameter:site-id}
-dash_path = {{ dash_location }}/bin/dash
-curl_path = {{ curl_location }}/bin/curl
-
 # Request erp5-cluster instance
 [erp5-cluster]
 recipe = slapos.cookbook:request.serialised
@@ -110,4 +86,40 @@ etc = ${buildout:directory}/etc
 var = ${buildout:directory}/var
 bin = ${buildout:directory}/bin
 
+
+
+
+
+
+
+[erp5-bootstrap]
+recipe = slapos.cookbook:erp5.bootstrap
+runner-path = ${basedirectory:services}/erp5-bootstrap
+mysql-url =  ${request-mariadb:connection-url}
+zope-url = http://${zope-instance:user}:${zope-instance:password}@${zope-instance:ip}:${zope-instance:port}/{{ site_id }}
+
+[erp5-promise]
+recipe = slapos.cookbook:erp5.promise
+promise-path = {{ promise_path }}
+kumofs-url = ${request-kumofs:connection-url}
+memcached-url = ${request-memcached:connection-url}
+cloudooo-url = ${request-cloudooo:connection-url}
+smtp-url =
+bt5 =
+bt5-repository-url =
+
+[zope-instance]
+promise-path = {{ promise_path }}
+site-id = {{ site_id }}
+
+[promise-erp5-site]
+recipe = slapos.cookbook:check_url_available
+path = ${basedirectory:promises}/erp5site
+url = http://${zope-instance:ip}:${zope-instance:port}/{{ site_id }}
+dash_path = {{ dash_location }}/bin/dash
+curl_path = {{ curl_location }}/bin/curl
+
+
+
+
 {% endif %}
diff --git a/stack/erp5/instance.cfg.in b/stack/erp5/instance.cfg.in
index c579d60f0..54d3a7ae8 100644
--- a/stack/erp5/instance.cfg.in
+++ b/stack/erp5/instance.cfg.in
@@ -251,6 +251,7 @@ extra-context =
     key curl_location template-erp5-single-parameters:curl
     key dash_location template-erp5-single-parameters:dash
     key local_bt5_repository dynamic-template-cluster-erp5-parameters:local-bt5-repository
+    key template_zope dynamic-template-zope:rendered
     key template_cluster_zope dynamic-template-cluster-zope:rendered
     key template_erp5_cluster dynamic-template-cluster-erp5:rendered
 # Must match the key id in [switch-softwaretype] which uses this section.
-- 
2.30.9