Commit 8eb6af3d authored by Benjamin Blanc's avatar Benjamin Blanc

bootstrap erp5: change the way to get zope password and username

Add zope-username and zope-password options into the recipe erp5_bootstrap.
'zope-username' and 'zope-password' are harcoded on the buildout-side,
because the (https) 'zope-url' no longer include these informations.
parent 9337b7fc
......@@ -48,10 +48,20 @@ class Recipe(GenericBaseRecipe):
zope_parsed = urlparse.urlparse(self.options['zope-url'])
# Extract zope username/password from url, or get it from options
if zope_parsed.username:
zope_username = zope_parsed.username
else:
zope_username = self.options['zope-username']
if zope_parsed.password:
zope_password = zope_parsed.password
else:
zope_password = self.options['zope-password']
config = dict(
python_path=sys.executable,
user=zope_parsed.username,
password=zope_parsed.password,
user=zope_username,
password=zope_password,
site_id=zope_parsed.path.split('/')[1],
host="%s:%s" % (zope_parsed.hostname, zope_parsed.port),
sql_connection_string=mysql_connection_string,
......
......@@ -329,7 +329,7 @@ md5sum = c745d794b28cae64feba527f894d7340
[template-scalability]
< = download-base
filename = instance-scalability.cfg.in
md5sum = ec48cd1a067b74702a86358ddd6996c4
md5sum = 308ae9c4268fdc50aa0c55af3bf0f963
[template-zeo]
< = download-base
......
......@@ -96,10 +96,9 @@ bin = ${buildout:directory}/bin
recipe = slapos.cookbook:erp5.bootstrap
runner-path = ${basedirectory:services}/erp5-bootstrap
mysql-url = ${erp5-cluster:connection-mariadb-url}
# Must look like : https://user:password@ip:port/site_id
# But actually looks like : https://ip:port/site_id
#zope-url = ${erp5-cluster:connection-family-scalability}/{{ site_id }}
zope-url = https://zope:insecure@192.168.241.110:2153/erp5
zope-username = zope
zope-password = insecure
zope-url = ${erp5-cluster:connection-family-scalability}/{{ site_id }}
[erp5-promise]
recipe = slapos.cookbook:erp5.promise
......
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