Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
4e3ad90e
Commit
4e3ad90e
authored
Nov 17, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apache-frontent: remove section from the loop.
parent
802493b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
27 deletions
+21
-27
software/apache-frontend/common.cfg
software/apache-frontend/common.cfg
+2
-2
software/apache-frontend/templates/apache-custom-slave-list.cfg.in
...apache-frontend/templates/apache-custom-slave-list.cfg.in
+17
-23
software/apache-frontend/templates/custom-virtualhost.conf.in
...ware/apache-frontend/templates/custom-virtualhost.conf.in
+2
-2
No files found.
software/apache-frontend/common.cfg
View file @
4e3ad90e
...
...
@@ -66,13 +66,13 @@ mode = 0644
[template-slave-list]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/apache-custom-slave-list.cfg.in
md5sum =
8fd6f0277883d893e01e71238091e81e
md5sum =
a79c5d53baa335b89deeb8ce0b88b645
mode = 640
[template-slave-configuration]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/custom-virtualhost.conf.in
md5sum =
a7ad2e83b7f919fc45a7ef1e64344dcb
md5sum =
d103143e5d50682bd5ad43117d82e2fa
mode = 640
[template-replicate-publish-slave-information]
...
...
software/apache-frontend/templates/apache-custom-slave-list.cfg.in
View file @
4e3ad90e
...
...
@@ -177,15 +177,14 @@ key-content = {{ dumps(slave_instance.get('ssl_key')) }}
cert-content = {{ dumps(slave_instance.get('ssl_crt')) }}
{% endif -%}
{# Set apache configuration value for slave #}
{# ########################################## #}
{# Set Slave Configuration #}
[{{ slave_configuration_section_name }}]
{% set apache_custom_http = ((slave_instance.pop('apache_custom_http', '')) % slave_parameter_dict) -%}
{% set apache_custom_https = ((slave_instance.pop('apache_custom_https', '')) % slave_parameter_dict) -%}
apache_custom_http = {{ dumps(apache_custom_http) }}
apache_custom_https = {{ dumps(apache_custom_https) }}
{# ############################ #}
{# #### Set Slave Configuration #}
[{{ slave_section_title }}]
< = jinja2-template-base
{% if slave_instance.has_key('apache_custom_http') %}
...
...
@@ -199,8 +198,6 @@ extensions = jinja2.ext.do
extra-context =
raw https_port {{ https_port }}
raw http_port {{ http_port }}
key apache_custom_https {{ 'slave-instance-%s-configuration:apache_custom_https' % slave_reference }}
key apache_custom_http {{ 'slave-instance-%s-configuration:apache_custom_http' % slave_reference }}
section slave_parameter {{ slave_configuration_section_name }}
{{ '\n' }}
...
...
@@ -210,6 +207,21 @@ extra-context =
{% endfor %}
############################
#### Publish Slave Information
{% if not extra_slave_instance_list -%}
{% set publish_section_title = 'publish-%s-connection-information' % slave_instance.get('slave_reference') -%}
{% do part_list.append(publish_section_title) -%}
[{{ publish_section_title }}]
recipe = slapos.cookbook:publish
{% for key, value in slave_publish_dict.iteritems() %}
{{ key }} = {{ value }}
{% endfor %}
{% else -%}
{% do slave_instance_information_list.append(slave_publish_dict) -%}
{% endif -%}
{% endfor -%}
###############################################
### Prepare virtualhost for slaves using cache
{% for slave_reference, slave_configuration_section_name in cached_server_dict.iteritems() %}
...
...
@@ -228,24 +240,6 @@ extra-context =
{{ '\n' }}
{% endfor %}
############################
#### Publish Slave Information
# Publish slave information
{% if not extra_slave_instance_list -%}
{% set publish_section_title = 'publish-%s-connection-information' % slave_instance.get('slave_reference') -%}
{% do part_list.append(publish_section_title) -%}
[{{ publish_section_title }}]
recipe = slapos.cookbook:publish
{% for key, value in slave_publish_dict.iteritems() %}
{{ key }} = {{ value }}
{% endfor %}
{% else -%}
{% do slave_instance_information_list.append(slave_publish_dict) -%}
{% endif -%}
{% endfor -%}
[slave-log-directories]
recipe = slapos.cookbook:mkdirectory
{% for key, value in slave_log_dict.iteritems() -%}
...
...
software/apache-frontend/templates/custom-virtualhost.conf.in
View file @
4e3ad90e
<VirtualHost *:{{ https_port }}>
{{
apache_custom_https
}}
{{
slave_parameter.get('apache_custom_https', '')
}}
</VirtualHost>
<VirtualHost *:{{ http_port }}>
{{
apache_custom_http
}}
{{
slave_parameter.get('apache_custom_https', '')
}}
</VirtualHost>
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