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
Vincent Bechu
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
Show 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):
...
@@ -107,7 +107,7 @@ class Recipe(GenericBaseRecipe):
elif
self
.
options
.
get
(
'zope-url'
):
elif
self
.
options
.
get
(
'zope-url'
):
zope_port
=
zope_parsed
.
port
zope_port
=
zope_parsed
.
port
else
:
else
:
zope_port
=
8080
zope_port
=
"8080"
# Zope username and password
# Zope username and password
if
self
.
options
.
get
(
'zope-username'
)
and
self
.
options
.
get
(
'zope-password'
):
if
self
.
options
.
get
(
'zope-username'
)
and
self
.
options
.
get
(
'zope-password'
):
zope_username
=
self
.
options
[
'zope-username'
]
zope_username
=
self
.
options
[
'zope-username'
]
...
@@ -133,15 +133,21 @@ class Recipe(GenericBaseRecipe):
...
@@ -133,15 +133,21 @@ class Recipe(GenericBaseRecipe):
else
:
else
:
zope_site_id
=
'erp5'
zope_site_id
=
'erp5'
# Scalability
if
self
.
options
.
get
(
'scalability'
):
scalability
=
self
.
options
[
'scalability'
]
else
:
scalability
=
"False"
config
=
dict
(
config
=
dict
(
python_path
=
sys
.
executable
,
python_path
=
sys
.
executable
,
user
=
zope_username
,
user
=
zope_username
,
password
=
zope_password
,
password
=
zope_password
,
site_id
=
zope_site_id
,
site_id
=
zope_site_id
,
host
=
"%s:%s"
%
(
zope_hostname
,
zope_port
),
host
=
"%s:%s"
%
(
zope_hostname
,
str
(
zope_port
)
),
protocol
=
zope_protocol
,
protocol
=
zope_protocol
,
sql_connection_string
=
mysql_connection_string
,
sql_connection_string
=
mysql_connection_string
,
scalability
=
s
elf
.
options
.
get
(
'scalability'
,
'False'
)
,
scalability
=
s
calability
,
)
)
# Runners
# Runners
...
...
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
1dd50804
...
@@ -8,9 +8,11 @@ user = "%(user)s"
...
@@ -8,9 +8,11 @@ user = "%(user)s"
password = "%(password)s"
password = "%(password)s"
host = "%(host)s"
host = "%(host)s"
site_id = "%(site_id)s"
site_id = "%(site_id)s"
erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
mysql_url = "%(sql_connection_string)s"
mysql_url = "%(sql_connection_string)s"
protocol = "%(protocol)s"
protocol = "%(protocol)s"
scalability = True
erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
header_dict = {'Authorization': 'Basic %%s' %% \
header_dict = {'Authorization': 'Basic %%s' %% \
base64.encodestring('%%s:%%s' %% (user, password)).strip()}
base64.encodestring('%%s:%%s' %% (user, password)).strip()}
...
@@ -58,12 +60,11 @@ if result.status == 204: # and (result.read() == "False"):
...
@@ -58,12 +60,11 @@ if result.status == 204: # and (result.read() == "False"):
# Scalability: Install and configure small buisiness
# Scalability: Install and configure small buisiness
if scalability:
is_scalability_case = "%(scalability)s" == "True"
if is_scalability_case:
print "Scalability case"
print "Scalability case"
# Here check if configurator is available
# Here check if configurator is available
configurator_available = False
configurator_available = False
cancel_url = "https%3A%2F%2F192.168.241.110%3A2153%2Ferp5%2FERP5Site_viewCheckConsistency"
if not configurator_available:
if not configurator_available:
if is_scalability_case:
if is_scalability_case:
import os
import os
...
@@ -79,8 +80,7 @@ if is_scalability_case:
...
@@ -79,8 +80,7 @@ if is_scalability_case:
urllib.urlencode({
urllib.urlencode({
'update_method': 'ERP5Site_updateConfigurationConsistency',
'update_method': 'ERP5Site_updateConfigurationConsistency',
'dialog_id'='ERP5Site_viewCheckConsistency',
'dialog_id'='ERP5Site_viewCheckConsistency',
# TODO: change ip
'cancel_url'=cancel_url,
'cancel_url'='https%3A%2F%2F192.168.241.110%3A2153%2Ferp5%2FERP5Site_viewCheckConsistency',
'dialog_method'='ERP5Site_fixConfigurationConsistency',
'dialog_method'='ERP5Site_fixConfigurationConsistency',
'dialog_category'='None',
'dialog_category'='None',
'object_path'='%2Ferp5',
'object_path'='%2Ferp5',
...
@@ -102,8 +102,8 @@ if is_scalability_case:
...
@@ -102,8 +102,8 @@ if is_scalability_case:
'listbox_uid%3Alist'='599',
'listbox_uid%3Alist'='599',
'Base_callDialogMethod%3Amethod'='',
'Base_callDialogMethod%3Amethod'='',
}),
}),
headers=header_dict
headers=header_dict
)
)
print "POST sent"
print "POST sent"
result = zope_connection.getresponse()
result = zope_connection.getresponse()
print result.read()
print result.read()
...
...
stack/erp5/buildout.cfg
View file @
1dd50804
...
@@ -329,7 +329,7 @@ md5sum = 0b401bb15c1b2b6e346fe667e082b1bc
...
@@ -329,7 +329,7 @@ md5sum = 0b401bb15c1b2b6e346fe667e082b1bc
[template-scalability]
[template-scalability]
< = download-base
< = download-base
filename = instance-scalability.cfg.in
filename = instance-scalability.cfg.in
md5sum =
86562c997e9309f84405ada96c9ffbd5
md5sum =
3395d97450b0e92b0682acef39ca531c
[template-zeo]
[template-zeo]
< = download-base
< = download-base
...
...
stack/erp5/instance-scalability.cfg.in
View file @
1dd50804
...
@@ -101,6 +101,7 @@ zope-username = zope
...
@@ -101,6 +101,7 @@ zope-username = zope
zope-password = insecure
zope-password = insecure
zope-site-id = {{ site_id }}
zope-site-id = {{ site_id }}
zope-url = ${erp5-cluster:connection-family-scalability}
zope-url = ${erp5-cluster:connection-family-scalability}
scalability = True
[erp5-promise]
[erp5-promise]
recipe = slapos.cookbook: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