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
Boxiang Sun
slapos
Commits
58fcb121
Commit
58fcb121
authored
Oct 19, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate tidstorage entry.
parent
98eefa9a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+7
-3
software/erp5/snippet-master.cfg
software/erp5/snippet-master.cfg
+15
-0
software/erp5/software.cfg
software/erp5/software.cfg
+1
-1
No files found.
slapos/recipe/generate_erp5_tidstorage.py
View file @
58fcb121
...
...
@@ -71,8 +71,8 @@ class Recipe(GenericSlapRecipe):
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}'
,
ip
=
'${zeo-instance-%
s:ip}'
%
zeo_id
,
port
=
'${zeo-instance-%
s:port}'
%
zeo_id
,
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
(
...
...
@@ -145,7 +145,11 @@ class Recipe(GenericSlapRecipe):
output
+=
'
\
n
'
.
join
(
publish_url_list
)
part_list
.
append
(
'publish-apache-backend-list'
)
prepend
=
open
(
self
.
options
[
'snippet-master'
]).
read
()
%
dict
(
part_list
=
'
\
n
'
.
join
([
' '
+
q
for
q
in
part_list
]))
part_list
=
'
\
n
'
.
join
([
' '
+
q
for
q
in
part_list
]),
known_tid_storage_identifier_dict
=
known_tid_storage_identifier_dict
,
site_id
=
site_id
,
haproxy_section
=
"haproxy-%s"
%
backend_name
,
)
output
=
prepend
+
output
with
open
(
self
.
options
[
'output'
],
'w'
)
as
f
:
f
.
write
(
output
)
...
...
software/erp5/snippet-master.cfg
View file @
58fcb121
...
...
@@ -16,12 +16,26 @@ parts =
cron
cron-entry-logrotate
certificate-authority
tidstorage
%(part_list)s
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[tidstorage]
recipe = slapos.cookbook:tidstorage
known-tid-storage-identifier-dict = %(known_tid_storage_identifier_dict)s
site-id = %(site_id)s
base_url = 'http://$${%(haproxy_section)s:ip}:$${%(haproxy_section)s:port}/$${:site-id}/serialize'
configuration-path = $${rootdirectory:etc}/tidstorage.py
ip = $${slap-network-information:local-ipv4}
port = 6001
timestamp-file-path = $${directory:tidstorage}/repozo_tidstorage_timestamp.log
logfile-name = $${basedirectory:log}/tidstorage.log
pidfile-name = $${basedirectory:run}/tidstorage.pid
status-file = $${directory:tidstorage}/tidstorage.tid
[directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = $${rootdirectory:etc}/cron.d/
...
...
@@ -113,6 +127,7 @@ backup = $${rootdirectory:srv}/backup/
[directory]
recipe = slapos.cookbook:mkdirectory
tidstorage = $${rootdirectory:srv}/tidstorage/
zodb = $${rootdirectory:srv}/zodb/
zodb-backup = $${basedirectory:backup}/zodb
instance = $${rootdirectory:srv}/erp5shared/
...
...
software/erp5/software.cfg
View file @
58fcb121
...
...
@@ -88,7 +88,7 @@ mode = 0644
[template-snippet-master]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-master.cfg
md5sum =
4061555651d15cd050f4e00736877a33
md5sum =
d510b8ebbb3325ed7a6a9b6005f78e37
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