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
Jean-Paul Smets
slapos
Commits
249e014b
Commit
249e014b
authored
Oct 19, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start backend templating.
parent
558106ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+6
-0
No files found.
slapos/recipe/generate_erp5_tidstorage.py
View file @
249e014b
...
...
@@ -101,12 +101,18 @@ class Recipe(GenericSlapRecipe):
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
# handle backend key
snippet_backend
=
open
(
self
.
options
[
'snippet-backend'
]).
read
()
for
backend_type
,
backend_configuration
in
json_data
[
'backend'
].
iteritems
():
for
q
in
range
(
1
,
backend_configuration
[
'zopecount'
]
+
1
):
current_zope_port
+=
1
part_name
=
'zope-%s-%s'
%
(
backend_type
,
q
)
part_list
.
append
(
part_name
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
backend_configuration
[
'thread-amount'
],
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
# now generate backend access
part_list
.
append
(
'apache-%(backend_name)s ca-apache-%(backend_name)s logrotate-entry-apache-%(backend_name)s haproxy-%(backend_name)s'
%
dict
(
backend_name
=
backend_type
))
backend_dict
=
dict
(
)
output
+=
snippet_backend
%
backend_dict
prepend
=
open
(
self
.
options
[
'snippet-master'
]).
read
()
%
dict
(
part_list
=
'
\
n
'
.
join
([
' '
+
q
for
q
in
part_list
]))
output
=
prepend
+
output
...
...
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