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
Carlos Ramos Carreño
slapos
Commits
98eefa9a
Commit
98eefa9a
authored
Oct 19, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare tidstorage configuration.
In order to stabilise it zodb path has to be calculated early.
parent
cca1a120
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+8
-1
slapos/recipe/zeo/__init__.py
slapos/recipe/zeo/__init__.py
+3
-4
software/erp5/snippet-master.cfg
software/erp5/snippet-master.cfg
+1
-1
software/erp5/software.cfg
software/erp5/software.cfg
+1
-1
No files found.
slapos/recipe/generate_erp5_tidstorage.py
View file @
98eefa9a
...
...
@@ -54,6 +54,7 @@ class Recipe(GenericSlapRecipe):
part_list
=
[]
zope_dict
=
{}
zope_connection_dict
=
{}
known_tid_storage_identifier_dict
=
{}
snippet_zeo
=
open
(
self
.
options
[
'snippet-zeo'
]).
read
()
for
zeo_id
,
zeo_configuration_list
in
json_data
[
'zeo'
].
iteritems
():
storage_list
=
[]
...
...
@@ -66,7 +67,13 @@ class Recipe(GenericSlapRecipe):
'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
)
zodb_path
=
os
.
path
.
join
(
'${directory:zodb}'
,
zeo_slave
[
'storage-name'
]
+
'.fs'
)
a
(
' storage-name=%(storage-name)s zodb-path=%(zodb-path)s'
%
{
'zodb-path'
:
zodb_path
,
'storage-name'
:
zeo_slave
[
'storage-name'
]})
known_tid_storage_identifier_dict
[
"((('%(ip)s', %(port)s),), '%(storage_name)s')"
%
dict
(
ip
=
'${zeo-instance-%(zeo-id)s:ip}'
,
port
=
'${zeo-instance-%(zeo-id)s:port}'
,
storage_name
=
zeo_slave
[
'storage-name'
])]
=
(
zodb_path
,
'${directory:zodb-backup}/%s/'
%
zeo_slave
[
'storage-name'
],
zeo_slave
[
'serialize-path'
]
%
{
'site-id'
:
site_id
})
current_zeo_port
+=
1
output
+=
snippet_zeo
%
dict
(
zeo_id
=
zeo_id
,
...
...
slapos/recipe/zeo/__init__.py
View file @
98eefa9a
...
...
@@ -65,11 +65,10 @@ class Recipe(GenericBaseRecipe):
for
q
in
storage_definition
.
split
():
if
'storage-name'
in
q
:
storage_name
=
q
.
split
(
'='
)[
1
].
strip
()
if
'zodb-name'
in
q
:
zodb_name
=
q
.
split
(
'='
)[
1
].
strip
()
storage_path
=
os
.
path
.
join
(
zodb_directory_path
,
'%s.fs'
%
zodb_name
)
if
'zodb-path'
in
q
:
zodb_path
=
q
.
split
(
'='
)[
1
].
strip
()
filestorage_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
dict
(
storage_name
=
storage_name
,
path
=
storage
_path
))
snippet_filename
,
dict
(
storage_name
=
storage_name
,
path
=
zodb
_path
))
config
=
dict
(
zeo_ip
=
self
.
options
[
'ip'
],
...
...
software/erp5/snippet-master.cfg
View file @
98eefa9a
...
...
@@ -74,7 +74,6 @@ create = true
[zeo-instance-entry-common]
recipe = slapos.cookbook:zeo
zodb-path = $${directory:zodb}
ip = $${slap-network-information:local-ipv4}
binary-path = ${buildout:bin-directory}/runzeo
...
...
@@ -115,6 +114,7 @@ backup = $${rootdirectory:srv}/backup/
[directory]
recipe = slapos.cookbook:mkdirectory
zodb = $${rootdirectory:srv}/zodb/
zodb-backup = $${basedirectory:backup}/zodb
instance = $${rootdirectory:srv}/erp5shared/
instance-etc = $${:instance}/etc
apache-conf = $${rootdirectory:etc}/apache
...
...
software/erp5/software.cfg
View file @
98eefa9a
...
...
@@ -88,7 +88,7 @@ mode = 0644
[template-snippet-master]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-master.cfg
md5sum =
c14f7eecea2603f53f1dd6e640ee671b
md5sum =
4061555651d15cd050f4e00736877a33
output = ${buildout:directory}/template-snippet-master.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