Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SlapOS Develop
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Zheng
SlapOS Develop
Commits
8c7dc9b2
Commit
8c7dc9b2
authored
Aug 19, 2011
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure cache_size
On each zope, configure the zodb_cache_size and zeo_client_cache_size
parent
29139afb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
slapos/recipe/bef_erp5/__init__.py
slapos/recipe/bef_erp5/__init__.py
+14
-10
slapos/recipe/erp5/template/zope-zeo-snippet.conf.in
slapos/recipe/erp5/template/zope-zeo-snippet.conf.in
+2
-0
No files found.
slapos/recipe/bef_erp5/__init__.py
View file @
8c7dc9b2
...
@@ -67,16 +67,16 @@ class Recipe(slapos.recipe.erp5.Recipe):
...
@@ -67,16 +67,16 @@ class Recipe(slapos.recipe.erp5.Recipe):
r
=
self
.
_requestZeoFileStorage
r
=
self
.
_requestZeoFileStorage
s
=
lambda
x
:
site_path
+
x
s
=
lambda
x
:
site_path
+
x
z1
=
lambda
x
:
r
(
'Zeo Server 1'
,
x
),
None
z1
=
lambda
x
:
r
(
'Zeo Server 1'
,
x
),
None
,
5000
,
'20MB'
z2
=
lambda
x
:
r
(
'Zeo Server 2'
,
x
),
None
z2
=
lambda
x
:
r
(
'Zeo Server 2'
,
x
),
None
,
5000
,
'20MB'
z3
=
lambda
x
:
r
(
'Zeo Server 3'
,
x
),
None
z3
=
lambda
x
:
r
(
'Zeo Server 3'
,
x
),
None
,
5000
,
'20MB'
z4
=
lambda
x
:
r
(
'Zeo Server 4'
,
x
),
None
z4
=
lambda
x
:
r
(
'Zeo Server 4'
,
x
),
None
,
5000
,
'20MB'
z5
=
lambda
x
:
r
(
'Zeo Server 5'
,
x
),
None
z5
=
lambda
x
:
r
(
'Zeo Server 5'
,
x
),
None
,
5000
,
'20MB'
return
{
return
{
# Zeo server 1
# Zeo server 1
'/'
:
r
(
'Zeo Server 1'
,
'main'
),
s
(
'account_module'
),
'/'
:
r
(
'Zeo Server 1'
,
'main'
),
s
(
'account_module'
),
2000
,
'400MB'
s
(
'portal_activities'
):
z1
(
'portal_activities'
),
s
(
'portal_activities'
):
z1
(
'portal_activities'
),
s
(
'task_report_module'
):
z1
(
'task_report_module'
),
s
(
'task_report_module'
):
z1
(
'task_report_module'
),
s
(
'video_request_module'
):
z1
(
'video_request_module'
),
s
(
'video_request_module'
):
z1
(
'video_request_module'
),
...
@@ -87,7 +87,7 @@ class Recipe(slapos.recipe.erp5.Recipe):
...
@@ -87,7 +87,7 @@ class Recipe(slapos.recipe.erp5.Recipe):
s
(
'task_module'
):
z1
(
'task_module'
),
s
(
'task_module'
):
z1
(
'task_module'
),
# Zeo server 2
# Zeo server 2
s
(
'video_module'
):
z2
(
'video_module'
),
s
(
'video_module'
):
r
(
'Zeo Server 2'
,
'video_module'
),
None
,
2000
,
'400MB'
# Zeo server 3
# Zeo server 3
s
(
'event_module'
):
z3
(
'event_module'
),
s
(
'event_module'
):
z3
(
'event_module'
),
...
@@ -98,7 +98,8 @@ class Recipe(slapos.recipe.erp5.Recipe):
...
@@ -98,7 +98,8 @@ class Recipe(slapos.recipe.erp5.Recipe):
s
(
'organisation_module'
):
z4
(
'organisation_module'
),
s
(
'organisation_module'
):
z4
(
'organisation_module'
),
# Zeo server 5
# Zeo server 5
s
(
'scanned_document_module'
):
z5
(
'scanned_document_module'
),
s
(
'scanned_document_module'
):
r
(
'Zeo Server 5'
,
'scanned_document_module'
),
None
,
2000
,
'400MB'
s
(
'item_module'
):
z5
(
'item_module'
),
s
(
'item_module'
):
z5
(
'item_module'
),
s
(
'document_module'
):
z5
(
'document_module'
),
s
(
'document_module'
):
z5
(
'document_module'
),
s
(
'image_module'
):
z5
(
'image_module'
),
s
(
'image_module'
):
z5
(
'image_module'
),
...
@@ -132,7 +133,9 @@ class Recipe(slapos.recipe.erp5.Recipe):
...
@@ -132,7 +133,9 @@ class Recipe(slapos.recipe.erp5.Recipe):
zeo_conf
=
self
.
installZeo
(
ip
)
zeo_conf
=
self
.
installZeo
(
ip
)
zodb_configuration_list
=
[]
zodb_configuration_list
=
[]
known_tid_storage_identifier_dict
=
{}
known_tid_storage_identifier_dict
=
{}
for
mount_point
,
(
storage_dict
,
check_path
)
in
mount_point_zeo_dict
.
iteritems
():
for
mount_point
,
\
(
storage_dict
,
check_path
,
zodb_cache_size
,
zeo_client_cache_size
)
in
mount_point_zeo_dict
.
iteritems
():
known_tid_storage_identifier_dict
[
known_tid_storage_identifier_dict
[
(((
storage_dict
[
'ip'
],
storage_dict
[
'port'
]),),
storage_dict
[
'storage_name'
])
(((
storage_dict
[
'ip'
],
storage_dict
[
'port'
]),),
storage_dict
[
'storage_name'
])
]
=
(
zeo_conf
[
storage_dict
[
'storage_name'
]][
'path'
],
check_path
or
mount_point
)
]
=
(
zeo_conf
[
storage_dict
[
'storage_name'
]][
'path'
],
check_path
or
mount_point
)
...
@@ -140,7 +143,8 @@ class Recipe(slapos.recipe.erp5.Recipe):
...
@@ -140,7 +143,8 @@ class Recipe(slapos.recipe.erp5.Recipe):
self
.
getTemplateFilename
(
'zope-zeo-snippet.conf.in'
),
dict
(
self
.
getTemplateFilename
(
'zope-zeo-snippet.conf.in'
),
dict
(
storage_name
=
storage_dict
[
'storage_name'
],
storage_name
=
storage_dict
[
'storage_name'
],
address
=
'%s:%s'
%
(
storage_dict
[
'ip'
],
storage_dict
[
'port'
]),
address
=
'%s:%s'
%
(
storage_dict
[
'ip'
],
storage_dict
[
'port'
]),
mount_point
=
mount_point
mount_point
=
mount_point
,
zodb_cache_size
=
zodb_cache_size
,
zeo_client_cache_size
=
zeo_client_cache_size
,
)))
)))
tidstorage_config
=
dict
(
host
=
self
.
getLocalIPv4Address
(),
port
=
'6001'
)
tidstorage_config
=
dict
(
host
=
self
.
getLocalIPv4Address
(),
port
=
'6001'
)
zodb_configuration_string
=
'
\
n
'
.
join
(
zodb_configuration_list
)
zodb_configuration_string
=
'
\
n
'
.
join
(
zodb_configuration_list
)
...
...
slapos/recipe/erp5/template/zope-zeo-snippet.conf.in
View file @
8c7dc9b2
<zodb_db %(storage_name)s>
<zodb_db %(storage_name)s>
cache-size %(zodb_cache_size)d
mount-point %(mount_point)s
mount-point %(mount_point)s
<zeoclient>
<zeoclient>
cache-size %(zeo_client_cache_size)s
server %(address)s
server %(address)s
storage %(storage_name)s
storage %(storage_name)s
name %(storage_name)s
name %(storage_name)s
...
...
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