Commit 65db1075 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

apache-frontend: Add comment on Yakari

parent c0cf313e
...@@ -10,10 +10,12 @@ context = ...@@ -10,10 +10,12 @@ context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
${:extra-context} ${:extra-context}
# Go throught slave list to set their configuration
{% for slave_instance in slave_instance_list -%} {% for slave_instance in slave_instance_list -%}
{% set slave_reference = slave_instance.get('slave_reference') -%} {% set slave_reference = slave_instance.get('slave_reference') -%}
{% set slave_section_title = 'dynamic-template-slave-instance-%s' % slave_reference -%} {% set slave_section_title = 'dynamic-template-slave-instance-%s' % slave_reference -%}
{% set slave_parameter_dict = generic_instance_parameter_dict.copy() -%} {% set slave_parameter_dict = generic_instance_parameter_dict.copy() -%}
# Set slave domain if none was defined
{% if slave_instance.get('domain', None) == None -%} {% if slave_instance.get('domain', None) == None -%}
{% do slave_instance.__setitem__('domain', "%s.%s" % (slave_instance.get('slave_reference').replace("-", "").lower(), domain)) -%} {% do slave_instance.__setitem__('domain', "%s.%s" % (slave_instance.get('slave_reference').replace("-", "").lower(), domain)) -%}
{% endif -%} {% endif -%}
...@@ -23,6 +25,7 @@ context = ...@@ -23,6 +25,7 @@ context =
{% endif -%} {% endif -%}
{% do slave_instance.__setitem__('url', cache_access) -%} {% do slave_instance.__setitem__('url', cache_access) -%}
{% do part_list.append(slave_section_title) -%} {% do part_list.append(slave_section_title) -%}
# Set up slave configuration file
[{{ slave_section_title }}] [{{ slave_section_title }}]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_slave_configuration }} template = {{ template_slave_configuration }}
...@@ -44,6 +47,7 @@ extra-context = ...@@ -44,6 +47,7 @@ extra-context =
{% do part_list.append('cached-rewrite-rules') -%} {% do part_list.append('cached-rewrite-rules') -%}
# Set rewrite rules for second apache
[cached-rewrite-rules] [cached-rewrite-rules]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_rewrite_cached }} template = {{ template_rewrite_cached }}
...@@ -52,9 +56,11 @@ extra-context = ...@@ -52,9 +56,11 @@ extra-context =
import json_module json import json_module json
key server_dict rewrite-rules:rules key server_dict rewrite-rules:rules
# Store Rewrite rules for second apache
[rewrite-rules] [rewrite-rules]
rules = {{ dumps(cached_server_dict) }} rules = {{ dumps(cached_server_dict) }}
# Add parts generated by template
[buildout] [buildout]
parts += parts +=
{% for part in part_list -%} {% for part in part_list -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment