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
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
Aurel
slapos
Commits
c57de240
Commit
c57de240
authored
Oct 07, 2020
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Simplify software.cfg and instance.cfg.in definitions
parent
2fa17e6d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
52 deletions
+49
-52
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/instance.cfg.in
software/caddy-frontend/instance.cfg.in
+15
-15
software/caddy-frontend/software.cfg
software/caddy-frontend/software.cfg
+33
-36
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
c57de240
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# not need these here).
# not need these here).
[template]
[template]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
bfb647325103640c19c38e7b7f6e2833
md5sum =
5870881f37b6aa0f112d68f24472c64d
[template-common]
[template-common]
filename = instance-common.cfg.in
filename = instance-common.cfg.in
...
...
software/caddy-frontend/instance.cfg.in
View file @
c57de240
[buildout]
[buildout]
extends = {{
common_profile
}}
extends = {{
template_frontend_parameter_dict['common_profile']
}}
parts =
parts =
dynamic-template-caddy-replicate
dynamic-template-caddy-replicate
...
@@ -30,28 +30,28 @@ single-custom-personal = ${dynamic-template-caddy-frontend:rendered}
...
@@ -30,28 +30,28 @@ single-custom-personal = ${dynamic-template-caddy-frontend:rendered}
replicate = ${dynamic-template-caddy-replicate:rendered}
replicate = ${dynamic-template-caddy-replicate:rendered}
kedifa = ${dynamic-template-kedifa:rendered}
kedifa = ${dynamic-template-kedifa:rendered}
[dynamic-
template-caddy-frontend-parameters
]
[dynamic-
parameter-section
]
{% for key,value in template_frontend_parameter_dict.iteritems() %}
{% for key,value in template_frontend_parameter_dict.iteritems() %}
{{ key }} = {{ dumps(value) }}
{{ key }} = {{ dumps(value) }}
{% endfor -%}
{% endfor -%}
[dynamic-template-caddy-frontend]
[dynamic-template-caddy-frontend]
< = jinja2-template-base
< = jinja2-template-base
template = {{ template_
caddy_frontend
}}
template = {{ template_
frontend_parameter_dict['template_caddy_frontend']
}}
filename = instance-caddy-frontend.cfg
filename = instance-caddy-frontend.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
extra-context =
extra-context =
import furl_module furl
import furl_module furl
section parameter_dict dynamic-
template-caddy-frontend-parameters
section parameter_dict dynamic-
parameter-section
raw software_type single-custom-personal
raw software_type single-custom-personal
caucase-jinja2-library = {{
caucase_jinja2_library
}}
caucase-jinja2-library = {{
template_frontend_parameter_dict['caucase_jinja2_library']
}}
import-list =
import-list =
file caucase :caucase-jinja2-library
file caucase :caucase-jinja2-library
[dynamic-template-caddy-replicate]
[dynamic-template-caddy-replicate]
< = jinja2-template-base
< = jinja2-template-base
depends = ${caddyprofiledeps:recipe}
depends = ${caddyprofiledeps:recipe}
template = {{ template_
caddy_replicate
}}
template = {{ template_
frontend_parameter_dict['template_caddy_replicate']
}}
filename = instance-caddy-replicate.cfg
filename = instance-caddy-replicate.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
extra-context =
extra-context =
...
@@ -59,26 +59,26 @@ extra-context =
...
@@ -59,26 +59,26 @@ extra-context =
import functools_module functools
import functools_module functools
import validators validators
import validators validators
key cluster_identification instance-parameter:root-instance-title
key cluster_identification instance-parameter:root-instance-title
raw caddy_backend_url_validator {{
caddy_backend_url_validator
}}
raw caddy_backend_url_validator {{
template_frontend_parameter_dict['caddy_backend_url_validator']
}}
raw template_publish_slave_information {{ template_
replicate_publish_slave_information
}}
raw template_publish_slave_information {{ template_
frontend_parameter_dict['template_replicate_publish_slave_information']
}}
# Must match the key id in [switch-softwaretype] which uses this section.
# Must match the key id in [switch-softwaretype] which uses this section.
raw software_type RootSoftwareInstance-default-custom-personal-replicate
raw software_type RootSoftwareInstance-default-custom-personal-replicate
raw template_monitor {{
monitor2_template
}}
raw template_monitor {{
template_frontend_parameter_dict['template_monitor2']
}}
raw common_profile {{
common_profile
}}
raw common_profile {{
template_frontend_parameter_dict['common_profile']
}}
section parameter_dict dynamic-
template-caddy-frontend-parameters
section parameter_dict dynamic-
parameter-section
caucase-jinja2-library = {{
caucase_jinja2_library
}}
caucase-jinja2-library = {{
template_frontend_parameter_dict['caucase_jinja2_library']
}}
import-list =
import-list =
file caucase :caucase-jinja2-library
file caucase :caucase-jinja2-library
[dynamic-template-kedifa]
[dynamic-template-kedifa]
< = jinja2-template-base
< = jinja2-template-base
template = {{ template_
kedifa
}}
template = {{ template_
frontend_parameter_dict['template_kedifa']
}}
filename = instance-kedifa.cfg
filename = instance-kedifa.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
extra-context =
extra-context =
section parameter_dict dynamic-
template-caddy-frontend-parameters
section parameter_dict dynamic-
parameter-section
raw software_type kedifa
raw software_type kedifa
caucase-jinja2-library = {{
caucase_jinja2_library
}}
caucase-jinja2-library = {{
template_frontend_parameter_dict['caucase_jinja2_library']
}}
import-list =
import-list =
file caucase :caucase-jinja2-library
file caucase :caucase-jinja2-library
...
...
software/caddy-frontend/software.cfg
View file @
c57de240
...
@@ -21,14 +21,8 @@ extends =
...
@@ -21,14 +21,8 @@ extends =
parts +=
parts +=
caucase-eggs
caucase-eggs
template
template
template-caddy-frontend
template-caddy-replicate
caddy
logrotate
rdiff-backup
rdiff-backup
caddyprofiledeps
caddyprofiledeps
kedifa-develop
kedifa-develop
kedifa
kedifa
...
@@ -89,11 +83,44 @@ context =
...
@@ -89,11 +83,44 @@ context =
key eggs_directory buildout:eggs-directory
key eggs_directory buildout:eggs-directory
[template-frontend-parameter-section]
[template-frontend-parameter-section]
# libraries
caucase_jinja2_library = ${caucase-jinja2-library:target}
# profiles
common_profile = ${template-common:rendered}
common_profile = ${template-common:rendered}
template_caddy_frontend = ${template-caddy-frontend:target}
template_caddy_replicate = ${template-caddy-replicate:target}
template_replicate_publish_slave_information = ${template-replicate-publish-slave-information:target}
template_slave_list = ${template-slave-list:target}
template_kedifa = ${template-kedifa:target}
# templates
logrotate_base_instance = ${template-logrotate-base:rendered}
logrotate_base_instance = ${template-logrotate-base:rendered}
monitor_template = ${monitor-template:output}
template_backend_haproxy_configuration = ${template-backend-haproxy-configuration:target}
template_backend_haproxy_rsyslogd_conf = ${template-backend-haproxy-rsyslogd-conf:target}
template_caddy_frontend_configuration = ${template-caddy-frontend-configuration:target}
template_caddy_lazy_script_call = ${template-caddy-lazy-script-call:target}
template_configuration_state_script = ${template-configuration-state-script:target}
template_default_slave_virtualhost = ${template-default-slave-virtualhost:target}
template_empty = ${template-empty:target}
template_graceful_script = ${template-graceful-script:target}
template_log_access = ${template-log-access:target}
template_monitor2 = ${monitor2-template:rendered}
template_not_found_html = ${template-not-found-html:target}
template_rotate_script = ${template-rotate-script:target}
template_slave_introspection_httpd_nginx = ${template-slave-introspection-httpd-nginx:target}
template_trafficserver_logging_yaml = ${template-trafficserver-logging-yaml:target}
template_trafficserver_records_config = ${template-trafficserver-records-config:target}
template_trafficserver_storage_config = ${template-trafficserver-storage-config:target}
template_validate_script = ${template-validate-script:target}
template_wrapper = ${template-wrapper:output}
caddy_backend_url_validator = ${caddy-backend-url-validator:output}
# directories
bin_directory = ${buildout:bin-directory}
bin_directory = ${buildout:bin-directory}
# files
sixtunnel = ${6tunnel:location}
sixtunnel = ${6tunnel:location}
nginx = ${nginx-output:nginx}
nginx = ${nginx-output:nginx}
nginx_mime = ${nginx-output:mime}
nginx_mime = ${nginx-output:mime}
...
@@ -115,43 +142,13 @@ kedifa-csr = ${:bin_directory}/kedifa-csr
...
@@ -115,43 +142,13 @@ kedifa-csr = ${:bin_directory}/kedifa-csr
xz_location = ${xz-utils:location}
xz_location = ${xz-utils:location}
htpasswd = ${:bin_directory}/htpasswd
htpasswd = ${:bin_directory}/htpasswd
monitor_template = ${monitor-template:output}
template_backend_haproxy_configuration = ${template-backend-haproxy-configuration:target}
template_backend_haproxy_rsyslogd_conf = ${template-backend-haproxy-rsyslogd-conf:target}
template_caddy_frontend_configuration = ${template-caddy-frontend-configuration:target}
template_graceful_script = ${template-graceful-script:target}
template_validate_script = ${template-validate-script:target}
template_rotate_script = ${template-rotate-script:target}
template_configuration_state_script = ${template-configuration-state-script:target}
template_caddy_lazy_script_call = ${template-caddy-lazy-script-call:target}
template_default_slave_virtualhost = ${template-default-slave-virtualhost:target}
template_empty = ${template-empty:target}
template_log_access = ${template-log-access:target}
template_not_found_html = ${template-not-found-html:target}
template_slave_list = ${template-slave-list:target}
template_trafficserver_records_config = ${template-trafficserver-records-config:target}
template_trafficserver_storage_config = ${template-trafficserver-storage-config:target}
template_trafficserver_logging_yaml = ${template-trafficserver-logging-yaml:target}
template_wrapper = ${template-wrapper:output}
template_slave_introspection_httpd_nginx = ${template-slave-introspection-httpd-nginx:target}
[template]
[template]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg
rendered = ${buildout:directory}/template.cfg
mode = 0644
mode = 0644
context =
context =
key common_profile template-common:rendered
key monitor2_template monitor2-template:rendered
key template_caddy_frontend template-caddy-frontend:target
key template_caddy_replicate template-caddy-replicate:target
key template_kedifa template-kedifa:target
key template_replicate_publish_slave_information template-replicate-publish-slave-information:target
key caddy_backend_url_validator caddy-backend-url-validator:output
section template_frontend_parameter_dict template-frontend-parameter-section
section template_frontend_parameter_dict template-frontend-parameter-section
key caucase_jinja2_library caucase-jinja2-library:target
[template-caddy-frontend]
[template-caddy-frontend]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
...
...
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