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
b76207ac
Commit
b76207ac
authored
Apr 27, 2017
by
Hardik Juneja
Committed by
Rafael Monnerat
Jun 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack: Use monitor-base-url-dict section to collect monitor-urls and fix password storage_path
parent
485a875b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
18 deletions
+25
-18
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+1
-1
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+10
-14
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/monitor/buildout.hash.cfg
stack/monitor/buildout.hash.cfg
+1
-1
stack/monitor/instance-monitor.cfg.jinja2.in
stack/monitor/instance-monitor.cfg.jinja2.in
+4
-0
stack/monitor/templates/monitor.conf.in
stack/monitor/templates/monitor.conf.in
+8
-1
No files found.
stack/erp5/buildout.hash.cfg
View file @
b76207ac
...
...
@@ -79,7 +79,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = b
bb6ae266bf906690513c9996bc17fbc
md5sum = b
78f17dbef151a65a37924b4613e772d
[template-zeo]
filename = instance-zeo.cfg.in
...
...
stack/erp5/instance-erp5.cfg.in
View file @
b76207ac
...
...
@@ -8,7 +8,7 @@
{% set jupyter_dict = slapparameter_dict.get('jupyter', {}) -%}
{% set has_jupyter = jupyter_dict.get('enable', jupyter_enable_default.lower() in ('true', 'yes')) -%}
{% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%}
{% set monitor_base_url_
list = []
-%}
{% set monitor_base_url_
dict = {}
-%}
[request-common]
<= request-common-base
config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
...
...
@@ -26,7 +26,7 @@ return = {{ ' '.join(ret) }}
{% do publish_dict.__setitem__(name ~ '-' ~ ret, '${' ~ section ~ ':connection-' ~ ret ~ '}') %}
{% endif -%}
{% if ret == "monitor-base-url" -%}
{% do monitor_base_url_
list.append(
'${' ~ section ~ ':connection-' ~ ret ~ '}') -%}
{% do monitor_base_url_
dict.__setitem__(section,
'${' ~ section ~ ':connection-' ~ ret ~ '}') -%}
{% endif -%}
{% endfor -%}
{{ root_common.sla(name) }}
...
...
@@ -182,7 +182,7 @@ software-type = zope
[{{ section_name }}]
<= request-zope-base
name = {{ partition_name }}
{% do monitor_base_url_
list.append(
'${' ~ section_name ~ ':connection-monitor-base-url}') -%}
{% do monitor_base_url_
dict.__setitem__(section_name,
'${' ~ section_name ~ ':connection-monitor-base-url}') -%}
{{ root_common.sla(partition_name) }}
config-name = {{ dumps(custom_name) }}
config-instance-count = {{ dumps(zope_parameter_dict.get('instance-count', 1)) }}
...
...
@@ -247,7 +247,7 @@ return =
{{ family }}
{{ family }}-v6
{% endfor -%}
{% do monitor_base_url_
list.append(
'${' ~ 'request-balancer' ~ ':connection-monitor-base-url}') -%}
{% do monitor_base_url_
dict.__setitem__('request-balancer',
'${' ~ 'request-balancer' ~ ':connection-monitor-base-url}') -%}
config-zope-family-dict = {{ dumps(zope_family_parameter_dict) }}
config-tcpv4-port = {{ dumps(balancer_dict.get('tcpv4-port', 2150)) }}
...
...
@@ -283,6 +283,7 @@ return = site_url
{% endif -%}{# if zope_partition_dict -#}
[publish]
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
-extends = publish-early
{% if 'neo' in storage_dict -%}
...
...
@@ -300,26 +301,17 @@ hosts-dict = {{ '${' ~ zope_address_list_id_dict.keys()[0] ~ ':connection-hosts-
{{ name }} = {{ value }}
{% endfor -%}
[buildout]
extends = {{ monitor_template }}
parts +=
monitor-base
[monitor-instance-parameter]
monitor-httpd-port = 8386
{{ root_common.common_section() }}
[buildout]
extends =
{{ template_monitor }}
extends = {{ template_monitor }}
parts +=
monitor-base
[publish-connection-information]
<= monitor-publish
[monitor-conf-parameters]
monitor-title = ERP5 monitor
password = ${monitor-htpasswd:passwd}
...
...
@@ -329,3 +321,7 @@ password = ${monitor-htpasswd:passwd}
{{ key }} = {{ value }}
{% endfor %}
[monitor-base-url-dict]
{% for key, value in monitor_base_url_dict.items() -%}
{{ key }} = {{ value }}
{% endfor %}
stack/monitor/buildout.cfg
View file @
b76207ac
...
...
@@ -72,7 +72,7 @@ md5sum = 1695c9a06a2b11ccfe893d7a224e489d
[monitor-conf]
<= monitor-template-base
filename = monitor.conf.in
md5sum =
c8f024d741c6494d7c9ba01601d0b917
md5sum =
fc65084dd1c2fe2487b58a003b576f61
[monitor-instance-info]
<= monitor-template-base
...
...
stack/monitor/buildout.hash.cfg
View file @
b76207ac
...
...
@@ -15,4 +15,4 @@
# not need these here).
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
md5sum =
628cc0b2b6104d9d2df8408028bad694
md5sum =
5027f0b1abcc28ce3817cd70fb667a3b
stack/monitor/instance-monitor.cfg.jinja2.in
View file @
b76207ac
...
...
@@ -122,12 +122,16 @@ command =
echo "20" > ${:file}
fi
[monitor-base-url-dict]
# place holder to be used to collect erp5 monitor urls
[monitor-conf]
recipe = slapos.recipe.template:jinja2
template = {{ monitor_conf_template }}
rendered = ${directory:etc}/${:filename}
filename = monitor.conf
context = section parameter_dict monitor-conf-parameters
section monitor_base_urls monitor-base-url-dict
[instance-info-parameters]
name = ${monitor-instance-parameter:monitor-title}
...
...
stack/monitor/templates/monitor.conf.in
View file @
b76207ac
[monitor]
{% for key, value in parameter_dict.items() -%}
{% if key == "monitor-url-list" and monitor_base_urls is defined -%}
{{ key }} =
{% for key, value in monitor_base_urls.items() -%}
{{ ' ' ~ value }}
{% endfor -%}
{% else -%}
{{ key }} = {{ value.strip().replace("\n", "\n ") }}
{% endfor -%}
\ No newline at end of file
{% endif -%}
{% endfor -%}
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