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
Ivan Tyagov
slapos
Commits
d50c6b8e
Commit
d50c6b8e
authored
Oct 20, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-add support for timeserver selection.
parent
c3114b9e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
14 deletions
+16
-14
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+10
-7
slapos/recipe/generic_zope_zeo_client/__init__.py
slapos/recipe/generic_zope_zeo_client/__init__.py
+3
-0
slapos/recipe/generic_zope_zeo_client/template/zope.conf.in
slapos/recipe/generic_zope_zeo_client/template/zope.conf.in
+0
-6
software/erp5/snippet-zope.cfg
software/erp5/snippet-zope.cfg
+2
-0
software/erp5/software.cfg
software/erp5/software.cfg
+1
-1
No files found.
slapos/recipe/generate_erp5_tidstorage.py
View file @
d50c6b8e
...
...
@@ -100,23 +100,23 @@ class Recipe(GenericSlapRecipe):
zope_id
=
'zope-distribution'
part_list
.
append
(
zope_id
)
part_list
.
append
(
'logrotate-entry-%s'
%
zope_id
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
**
zope_dict
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
zope_timeserver
=
True
,
**
zope_dict
)
# always one admin node
current_zope_port
+=
1
zope_id
=
'zope-admin'
part_list
.
append
(
zope_id
)
part_list
.
append
(
'logrotate-entry-%s'
%
zope_id
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
**
zope_dict
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
zope_timeserver
=
False
,
**
zope_dict
)
# handle activity key
for
q
in
range
(
1
,
json_data
[
'activity'
][
'zopecount'
]
+
1
):
current_zope_port
+=
1
part_name
=
'zope-activity-%s'
%
q
part_list
.
append
(
part_name
)
part_list
.
append
(
'logrotate-entry-%s'
%
part_name
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
zope_timeserver
=
True
,
**
zope_dict
)
# handle backend key
snippet_backend
=
open
(
self
.
options
[
'snippet-backend'
]).
read
()
publish_url_list
=
[]
...
...
@@ -127,7 +127,10 @@ class Recipe(GenericSlapRecipe):
part_name
=
'zope-%s-%s'
%
(
backend_name
,
q
)
part_list
.
append
(
part_name
)
part_list
.
append
(
'logrotate-entry-%s'
%
part_name
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
backend_configuration
[
'thread-amount'
],
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
backend_configuration
[
'thread-amount'
],
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
zope_timeserver
=
False
,
**
zope_dict
)
haproxy_backend_list
.
append
(
'${%(part_name)s:ip}:${%(part_name)s:port}'
%
dict
(
part_name
=
part_name
))
# now generate backend access
current_apache_port
+=
1
...
...
slapos/recipe/generic_zope_zeo_client/__init__.py
View file @
d50c6b8e
...
...
@@ -140,6 +140,9 @@ class Recipe(GenericBaseRecipe):
zope_wrapper_template_location
=
self
.
getTemplateFilename
(
'zope.conf.in'
)
zope_conf_content
=
self
.
substituteTemplate
(
zope_wrapper_template_location
,
zope_config
)
if
self
.
isTrueValue
(
self
.
options
[
'timeserver'
]):
zope_conf_content
+=
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'zope.conf.timeserver.in'
),
{})
zope_conf_path
=
self
.
createFile
(
self
.
options
[
'configuration-file'
],
zope_conf_content
)
path_list
.
append
(
zope_conf_path
)
...
...
slapos/recipe/generic_zope_zeo_client/template/zope.conf.in
View file @
d50c6b8e
...
...
@@ -60,9 +60,3 @@ lock-filename %(lock-filename)s
dump_url %(dump_url)s
secret %(secret)s
</product-config>
# ERP5 Timer Service
%%import timerserver
<timer-server>
interval 5
</timer-server>
software/erp5/snippet-zope.cfg
View file @
d50c6b8e
...
...
@@ -16,6 +16,8 @@ timezone = %(timezone)s
zeo-connection-string =
%(zeo_connection_string)s
timeserver = %(zope_timeserver)s
# Paths
wrapper = $${basedirectory:services}/%(zope_id)s
instance-path = $${directory:instance}
...
...
software/erp5/software.cfg
View file @
d50c6b8e
...
...
@@ -88,7 +88,7 @@ mode = 0644
[template-snippet-zope]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-zope.cfg
md5sum =
b17eb5e49d0a08b22468dd51f89dc791
md5sum =
cca86232d644f0050f1f96c270867852
output = ${buildout:directory}/template-snippet-zope.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