Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Takoudjou
slapos
Commits
1dd50804
Commit
1dd50804
authored
Jul 11, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability: Fix missing input in bootstrap section
parent
75733bad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
+19
-12
slapos/recipe/erp5_bootstrap/__init__.py
slapos/recipe/erp5_bootstrap/__init__.py
+9
-3
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+8
-8
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+1
-1
stack/erp5/instance-scalability.cfg.in
stack/erp5/instance-scalability.cfg.in
+1
-0
No files found.
slapos/recipe/erp5_bootstrap/__init__.py
View file @
1dd50804
...
...
@@ -107,7 +107,7 @@ class Recipe(GenericBaseRecipe):
elif
self
.
options
.
get
(
'zope-url'
):
zope_port
=
zope_parsed
.
port
else
:
zope_port
=
8080
zope_port
=
"8080"
# Zope username and password
if
self
.
options
.
get
(
'zope-username'
)
and
self
.
options
.
get
(
'zope-password'
):
zope_username
=
self
.
options
[
'zope-username'
]
...
...
@@ -133,15 +133,21 @@ class Recipe(GenericBaseRecipe):
else
:
zope_site_id
=
'erp5'
# Scalability
if
self
.
options
.
get
(
'scalability'
):
scalability
=
self
.
options
[
'scalability'
]
else
:
scalability
=
"False"
config
=
dict
(
python_path
=
sys
.
executable
,
user
=
zope_username
,
password
=
zope_password
,
site_id
=
zope_site_id
,
host
=
"%s:%s"
%
(
zope_hostname
,
zope_port
),
host
=
"%s:%s"
%
(
zope_hostname
,
str
(
zope_port
)
),
protocol
=
zope_protocol
,
sql_connection_string
=
mysql_connection_string
,
scalability
=
s
elf
.
options
.
get
(
'scalability'
,
'False'
)
,
scalability
=
s
calability
,
)
# Runners
...
...
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
1dd50804
...
...
@@ -8,9 +8,11 @@ user = "%(user)s"
password = "%(password)s"
host = "%(host)s"
site_id = "%(site_id)s"
erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
mysql_url = "%(sql_connection_string)s"
protocol = "%(protocol)s"
scalability = True
erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
header_dict = {'Authorization': 'Basic %%s' %% \
base64.encodestring('%%s:%%s' %% (user, password)).strip()}
...
...
@@ -58,12 +60,11 @@ if result.status == 204: # and (result.read() == "False"):
# Scalability: Install and configure small buisiness
is_scalability_case = "%(scalability)s" == "True"
if is_scalability_case:
if scalability:
print "Scalability case"
# Here check if configurator is available
configurator_available = False
cancel_url = "https%3A%2F%2F192.168.241.110%3A2153%2Ferp5%2FERP5Site_viewCheckConsistency"
if not configurator_available:
if is_scalability_case:
import os
...
...
@@ -79,8 +80,7 @@ if is_scalability_case:
urllib.urlencode({
'update_method': 'ERP5Site_updateConfigurationConsistency',
'dialog_id'='ERP5Site_viewCheckConsistency',
# TODO: change ip
'cancel_url'='https%3A%2F%2F192.168.241.110%3A2153%2Ferp5%2FERP5Site_viewCheckConsistency',
'cancel_url'=cancel_url,
'dialog_method'='ERP5Site_fixConfigurationConsistency',
'dialog_category'='None',
'object_path'='%2Ferp5',
...
...
@@ -102,8 +102,8 @@ if is_scalability_case:
'listbox_uid%3Alist'='599',
'Base_callDialogMethod%3Amethod'='',
}),
headers=header_dict
)
headers=header_dict
)
print "POST sent"
result = zope_connection.getresponse()
print result.read()
...
...
stack/erp5/buildout.cfg
View file @
1dd50804
...
...
@@ -329,7 +329,7 @@ md5sum = 0b401bb15c1b2b6e346fe667e082b1bc
[template-scalability]
< = download-base
filename = instance-scalability.cfg.in
md5sum =
86562c997e9309f84405ada96c9ffbd5
md5sum =
3395d97450b0e92b0682acef39ca531c
[template-zeo]
< = download-base
...
...
stack/erp5/instance-scalability.cfg.in
View file @
1dd50804
...
...
@@ -101,6 +101,7 @@ zope-username = zope
zope-password = insecure
zope-site-id = {{ site_id }}
zope-url = ${erp5-cluster:connection-family-scalability}
scalability = True
[erp5-promise]
recipe = slapos.cookbook:erp5.promise
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment