Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
7c4ceb0a
Commit
7c4ceb0a
authored
Aug 21, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5/balancer: add entries for direct access to zopes
parent
e75f3152
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+1
-1
stack/erp5/instance-balancer.cfg.in
stack/erp5/instance-balancer.cfg.in
+17
-0
No files found.
stack/erp5/buildout.hash.cfg
View file @
7c4ceb0a
...
...
@@ -86,7 +86,7 @@ md5sum = d1257e7e942307be0a79e34aa4320e9f
[template-balancer]
filename = instance-balancer.cfg.in
md5sum =
f0fd49c7d6d9f7c6936afba0d18b7691
md5sum =
384d6f167836e98944860fb62158c4c7
[template-haproxy-cfg]
filename = haproxy.cfg.in
...
...
stack/erp5/instance-balancer.cfg.in
View file @
7c4ceb0a
...
...
@@ -99,6 +99,7 @@ ipv4 = {{ ipv4 }}
{% set apache_dict = {} -%}
{% set zope_virtualhost_monster_backend_dict = {} %}
{% set test_runner_url_dict = {} %} {# family_name => list of apache URLs #}
{% set direct_zope_url_dict = {} %} {# family_name => list of apache URLs #}
{% set next_port = itertools.count(slapparameter_dict['tcpv4-port']).next -%}
{% for family_name, parameter_id_list in sorted(
slapparameter_dict['zope-family-dict'].iteritems()) -%}
...
...
@@ -163,6 +164,18 @@ ipv6 = {{ zope_address.split(']:')[0][1:] }}
{% set external_scheme = 'https' -%}
{% endif -%}
{% do apache_dict.__setitem__(family_name, (next_port(), external_scheme, internal_scheme ~ '://' ~ ipv4 ~ ':' ~ haproxy_port ~ backend_path, ssl_authentication)) -%}
{# Direct access to backend zopes. #}
{% set external_port = next_port() %}
{% set direct_zope_url_list = [] %}
{% set direct_zope_backend_mapping = {} %}
{% for i, (zope_family_address, _, _) in enumerate(zope_family_address_list) %}
{% do direct_zope_url_list.append('https://[' ~ ipv6 ~ ']:' ~ external_port ~ '/' ~ family_name ~ '/zope-' ~ i ) %}
{% do direct_zope_backend_mapping.__setitem__(family_name ~ '/zope-' ~ i, 'http://' ~ zope_family_address ) %}
{% endfor -%}
{% do zope_virtualhost_monster_backend_dict.__setitem__(('[' ~ ipv6 ~ ']', external_port), (ssl_authentication, direct_zope_backend_mapping) ) -%}
{% do direct_zope_url_dict.__setitem__(family_name, direct_zope_url_list) %}
{% endfor -%}
[haproxy-cfg-parameter-dict]
...
...
@@ -250,6 +263,10 @@ recipe = slapos.cookbook:publish.serialised
{% for family_name, test_runner_url_list in test_runner_url_dict.items() -%}
{{ family_name ~ '-test-runner-url-list' }} = {{ dumps(test_runner_url_list) }}
{% endfor -%}
{% for family_name, direct_zope_url_list in direct_zope_url_dict.items() -%}
{{ family_name ~ '-direct-zope-url-list' }} = {{ dumps(direct_zope_url_list) }}
{% endfor -%}
monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
...
...
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