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
francois
slapos
Commits
a9e6e1c0
Commit
a9e6e1c0
authored
Jul 31, 2015
by
Tatuya Kamada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5: Add dynamic balancer's apache config template.
parent
a639e981
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+2
-2
stack/erp5/instance-balancer.cfg.in
stack/erp5/instance-balancer.cfg.in
+7
-1
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+1
-0
No files found.
stack/erp5/buildout.cfg
View file @
a9e6e1c0
...
@@ -296,7 +296,7 @@ extra-context =
...
@@ -296,7 +296,7 @@ extra-context =
[template-erp5]
[template-erp5]
< = download-base
< = download-base
filename = instance-erp5.cfg.in
filename = instance-erp5.cfg.in
md5sum =
4c552f915eb6549ce160a9ff5871ae74
md5sum =
ff8ecdc258e2529b3979fd6596a27b95
[template-zeo]
[template-zeo]
< = download-base
< = download-base
...
@@ -330,7 +330,7 @@ link-binary =
...
@@ -330,7 +330,7 @@ link-binary =
[template-balancer]
[template-balancer]
< = download-base
< = download-base
filename = instance-balancer.cfg.in
filename = instance-balancer.cfg.in
md5sum =
3628f0ba358e7ee96a8d0185c4775911
md5sum =
8f6e55a0972b086bed4e40d4f49608ca
[template-apache-conf]
[template-apache-conf]
< = download-base
< = download-base
...
...
stack/erp5/instance-balancer.cfg.in
View file @
a9e6e1c0
...
@@ -16,6 +16,12 @@ per partition. No more (undefined result), no less (IndexError).
...
@@ -16,6 +16,12 @@ per partition. No more (undefined result), no less (IndexError).
{% do apache_ip_list.append('[' ~ ipv6 ~ ']') -%}
{% do apache_ip_list.append('[' ~ ipv6 ~ ']') -%}
{% endif -%}
{% endif -%}
{% if slapparameter_dict.get('custom-template-apache-conf', None) -%}
{% set apache_conf_template = slapparameter_dict['custom-template-apache-conf'] -%}
{% else -%}
{% set apache_conf_template = parameter_dict['template-apache-conf'] -%}
{% endif -%}
[simplefile]
[simplefile]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = inline:{{ '{{ content }}' }}
template = inline:{{ '{{ content }}' }}
...
@@ -134,7 +140,7 @@ crl = ${apache-ssl-client:crl}
...
@@ -134,7 +140,7 @@ crl = ${apache-ssl-client:crl}
[apache-conf]
[apache-conf]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = {{
parameter_dict['template-apache-conf']
}}
template = {{
dumps(apache_conf_template)
}}
rendered = ${directory:apache-conf}/apache.conf
rendered = ${directory:apache-conf}/apache.conf
context = section parameter_dict apache-conf-parameter-dict
context = section parameter_dict apache-conf-parameter-dict
...
...
stack/erp5/instance-erp5.cfg.in
View file @
a9e6e1c0
...
@@ -178,6 +178,7 @@ config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list}
...
@@ -178,6 +178,7 @@ config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list}
config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-check-path', '/') % {'site-id': site_id}) }}
config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-check-path', '/') % {'site-id': site_id}) }}
config-backend-path = {{ dumps(balancer_dict.get('apache-backend-path', '/') % {'site-id': site_id}) }}
config-backend-path = {{ dumps(balancer_dict.get('apache-backend-path', '/') % {'site-id': site_id}) }}
config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }}
config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }}
config-custom-template-apache-conf = {{ dumps(balancer_dict.get('custom-template-apache-conf', None)) }}
[request-frontend-base]
[request-frontend-base]
{% if has_frontend -%}
{% if has_frontend -%}
...
...
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