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
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
Justin
slapos
Commits
e658d53f
Commit
e658d53f
authored
Oct 19, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow full zeo configuraiton.
Storage name does not map required file name.
parent
20c649eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+15
-13
software/erp5/snippet-zeo.cfg
software/erp5/snippet-zeo.cfg
+2
-1
software/erp5/software.cfg
software/erp5/software.cfg
+1
-1
No files found.
slapos/recipe/generate_erp5_tidstorage.py
View file @
e658d53f
...
...
@@ -52,31 +52,33 @@ class Recipe(GenericSlapRecipe):
zope_dict
=
{}
zope_connection_dict
=
{}
snippet_zeo
=
open
(
self
.
options
[
'snippet-zeo'
]).
read
()
for
zeo_id
,
zeo_configuration
in
json_data
[
'zeo'
].
iteritems
():
for
zeo_id
,
zeo_configuration_list
in
json_data
[
'zeo'
].
iteritems
():
storage_list
=
[]
a
=
storage_list
.
append
for
zeo_slave
in
zeo_configuration_list
:
zope_connection_dict
[
zeo_slave
[
'storage-name'
]]
=
{
'zope-cache-size'
:
zeo_slave
[
'zope-cache-size'
],
'zeo-cache-size'
:
zeo_slave
[
'zeo-cache-size'
],
'mount-point'
:
zeo_slave
[
'mount-point'
]
%
{
'site-id'
:
site_id
},
'storage-name'
:
zeo_slave
[
'storage-name'
],
'server'
:
'${zeo-instance-%(zeo-id)s:ip}:${zeo-instance-%(zeo-id)s:port}'
%
{
'zeo-id'
:
zeo_id
}
}
a
(
' storage-name=%(storage-name)s zodb-name=%(zodb-name)s'
%
zeo_slave
)
current_zeo_port
+=
1
output
+=
snippet_zeo
%
dict
(
zeo_id
=
zeo_id
,
zeo_port
=
current_zeo_port
,
storage_list
=
'
'
.
join
([
str
(
q
[
'zodb'
])
for
q
in
zeo_configuration
]
)
)
+
'
\
n
'
storage_list
=
'
\
n
'
.
join
(
storage_list
)
)
part_list
.
extend
([
"zeo-instance-%s"
%
zeo_id
,
"logrotate-entry-zeo-%s"
%
zeo_id
])
for
zeo_slave
in
zeo_configuration
:
zope_connection_dict
[
zeo_slave
[
'zodb'
]]
=
{
'zope-cache-size'
:
zeo_slave
[
'zope-cache-size'
],
'zeo-cache-size'
:
zeo_slave
[
'zeo-cache-size'
],
'mount-point'
:
zeo_slave
[
'mount-point'
]
%
{
'site-id'
:
site_id
},
'storage'
:
zeo_slave
[
'zodb'
],
'name'
:
zeo_slave
[
'zodb'
],
'server'
:
'${zeo-instance-%(zeo-id)s:ip}:${zeo-instance-%(zeo-id)s:port}'
%
{
'zeo-id'
:
zeo_id
}
}
zeo_connection_list
=
[]
a
=
zeo_connection_list
.
append
for
k
,
v
in
zope_connection_dict
.
iteritems
():
a
(
' zeo-cache-size=%(zeo-cache-size)s zope-cache-size=%(zope-cache-size)s server=%(server)s mount-point=%(mount-point)s '
%
v
)
a
(
' zeo-cache-size=%(zeo-cache-size)s zope-cache-size=%(zope-cache-size)s server=%(server)s mount-point=%(mount-point)s
storage-name=%(storage-name)s
'
%
v
)
zeo_connection_string
=
'
\
n
'
.
join
(
zeo_connection_list
)
zope_dict
.
update
(
timezone
=
json_data
[
'timezone'
],
...
...
software/erp5/snippet-zeo.cfg
View file @
e658d53f
...
...
@@ -4,7 +4,8 @@ log-path = $${basedirectory:log}/zeo-%(zeo_id)s.log
pid-path = $${basedirectory:run}/zeo-%(zeo_id)s.pid
conf-path = $${rootdirectory:etc}/zeo-%(zeo_id)s.conf
port = %(zeo_port)s
storage = %(storage_list)s
storage =
%(storage_list)s
wrapper-path = $${basedirectory:services}/zeo-%(zeo_id)s
[logrotate-entry-zeo-%(zeo_id)s]
...
...
software/erp5/software.cfg
View file @
e658d53f
...
...
@@ -81,7 +81,7 @@ mode = 0644
[template-snippet-zeo]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-zeo.cfg
md5sum =
83444a88b9df991941e35c1a56dd28a2
md5sum =
5295ea5ceedf861286bab16fc546a9c6
output = ${buildout:directory}/template-snippet-zeo.cfg
mode = 0644
...
...
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