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
Łukasz Nowak
slapos
Commits
95b08d34
Commit
95b08d34
authored
Jan 16, 2024
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX: Drop configuration parameter from instance slave list
parent
321d48b1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
38 deletions
+27
-38
software/rapid-cdn/buildout.hash.cfg
software/rapid-cdn/buildout.hash.cfg
+2
-2
software/rapid-cdn/instance-frontend.cfg.in
software/rapid-cdn/instance-frontend.cfg.in
+24
-35
software/rapid-cdn/instance-slave-list.cfg.in
software/rapid-cdn/instance-slave-list.cfg.in
+1
-1
No files found.
software/rapid-cdn/buildout.hash.cfg
View file @
95b08d34
...
@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
...
@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend]
[profile-frontend]
filename = instance-frontend.cfg.in
filename = instance-frontend.cfg.in
md5sum =
a051d9f32c1ea2bf5b67f4012f772124
md5sum =
00b7120eb652e6e4d04046591b156e31
[profile-master]
[profile-master]
filename = instance-master.cfg.in
filename = instance-master.cfg.in
...
@@ -30,7 +30,7 @@ md5sum = 291f73c3782040d02fd56a46f61c201b
...
@@ -30,7 +30,7 @@ md5sum = 291f73c3782040d02fd56a46f61c201b
[profile-slave-list]
[profile-slave-list]
filename = instance-slave-list.cfg.in
filename = instance-slave-list.cfg.in
md5sum =
e0e462bd94d2b468c88ff69c2156d0f5
md5sum =
348d6bd55ff9d94b634089a6c074695d
[profile-master-publish-slave-information]
[profile-master-publish-slave-information]
filename = instance-master-publish-slave-information.cfg.in
filename = instance-master-publish-slave-information.cfg.in
...
...
software/rapid-cdn/instance-frontend.cfg.in
View file @
95b08d34
{% import "caucase" as caucase with context %}
{% import "caucase" as caucase with context %}
{%- do instance_parameter_dict['configuration'].setdefault('user', {}) %}
{%- do instance_parameter_dict['configuration'].setdefault('user', {}) %}
{%- do instance_parameter_dict['configuration']['user'].setdefault('expert', {}) %}
{%- do instance_parameter_dict['configuration']['user'].update(FRONTEND_USER_DEFAULTS) %}
{%- do instance_parameter_dict['configuration']['user'].setdefault('global', {}) %}
{%- do instance_parameter_dict['configuration']['user']['global'].update(FRONTEND_GLOBAL_DEFAULTS) %}
{%- do instance_parameter_dict['configuration']['user']['global'].setdefault('expert', {}) %}
{%- set HTTP3_PORT = instance_parameter_dict['configuration']['user']['global']['expert']['advertised-http3-port'] %}
{%- set HTTP3_PORT = instance_parameter_dict['configuration']['user']['global']['expert'].get('advertised-http3-port', FRONTEND_GLOBAL_DEFAULTS['expert']['advertised-http3-port']) %}
{%- set FRONTEND_HTTP3 = instance_parameter_dict['configuration']['user']['global']['enable-http3'] %}
{%- set FRONTEND_HTTP3 = instance_parameter_dict['configuration']['user']['global'].get('enable-http3', FRONTEND_GLOBAL_DEFAULTS['enable-http3']) %}
{%- if FRONTEND_HTTP3 %}
{%- if FRONTEND_HTTP3 %}
{%- set FRONTEND_HAPROXY_EXECUTABLE = software_parameter_dict['haproxy_quic_executable'] %}
{%- set FRONTEND_HAPROXY_EXECUTABLE = software_parameter_dict['haproxy_quic_executable'] %}
{%- else %}
{%- else %}
...
@@ -191,7 +190,7 @@ single-custom-personal = dynamic-custom-personal-profile-slave-list:output
...
@@ -191,7 +190,7 @@ single-custom-personal = dynamic-custom-personal-profile-slave-list:output
[frontend-configuration]
[frontend-configuration]
ip-access-certificate = ${self-signed-ip-access:certificate}
ip-access-certificate = ${self-signed-ip-access:certificate}
slave-introspection-configuration = ${directory:etc}/slave-introspection-httpd-nginx.conf
slave-introspection-configuration = ${directory:etc}/slave-introspection-httpd-nginx.conf
slave-introspection-https-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('slave-introspection-https-port', FRONTEND_GLOBAL_DEFAULTS['expert']['slave-introspection-https-port'])
}}
slave-introspection-https-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['slave-introspection-https-port']
}}
slave-introspection-secure_access = ${slave-introspection-frontend:connection-secure_access}
slave-introspection-secure_access = ${slave-introspection-frontend:connection-secure_access}
[self-signed-ip-access]
[self-signed-ip-access]
...
@@ -382,6 +381,12 @@ template-frontend-haproxy-configuration = ${software-release-path:template-front
...
@@ -382,6 +381,12 @@ template-frontend-haproxy-configuration = ${software-release-path:template-front
template-frontend-haproxy-crt-list = ${software-release-path:template-frontend-haproxy-crt-list}
template-frontend-haproxy-crt-list = ${software-release-path:template-frontend-haproxy-crt-list}
## backend haproxy
## backend haproxy
template-backend-haproxy-configuration = ${software-release-path:template-backend-haproxy-configuration}
template-backend-haproxy-configuration = ${software-release-path:template-backend-haproxy-configuration}
{%- for key, value in instance_parameter_dict['configuration']['user'].items() %}
user-{{ key }} = {{ dumps(value) }}
{%- endfor %}
{%- for key, value in instance_parameter_dict['configuration']['user']['global'].items() %}
global-{{ key }} = {{ dumps(value) }}
{%- endfor %}
[dynamic-custom-personal-profile-slave-list]
[dynamic-custom-personal-profile-slave-list]
< = jinja2-template-base
< = jinja2-template-base
...
@@ -399,7 +404,6 @@ extra-context =
...
@@ -399,7 +404,6 @@ extra-context =
## Configuration passed by section
## Configuration passed by section
section dynamic_profile_configuration dynamic-custom-personal-profile-slave-list-config
section dynamic_profile_configuration dynamic-custom-personal-profile-slave-list-config
section frontend_directory frontend-directory
section frontend_directory frontend-directory
section configuration configuration
section frontend_haproxy_configuration frontend-haproxy-configuration
section frontend_haproxy_configuration frontend-haproxy-configuration
section backend_haproxy_configuration backend-haproxy-configuration
section backend_haproxy_configuration backend-haproxy-configuration
section instance_parameter_dict instance-parameter-section
section instance_parameter_dict instance-parameter-section
...
@@ -450,7 +454,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
...
@@ -450,7 +454,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
<= logrotate-entry-base
<= logrotate-entry-base
name = frontend-haproxy
name = frontend-haproxy
log = ${frontend-haproxy-rsyslogd-config:log-file}
log = ${frontend-haproxy-rsyslogd-config:log-file}
rotate-num = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('rotate-num', FRONTEND_GLOBAL_DEFAULTS['expert']['rotate-num'])
}}
rotate-num = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['rotate-num']
}}
# Note: Slaves do not define their own reload, as this would be repeated,
# Note: Slaves do not define their own reload, as this would be repeated,
# because sharedscripts work per entry, and each slave needs its own
# because sharedscripts work per entry, and each slave needs its own
# olddir
# olddir
...
@@ -470,8 +474,8 @@ frontend-graceful-command = ${frontend-haproxy-validate:output} && kill -USR2 $(
...
@@ -470,8 +474,8 @@ frontend-graceful-command = ${frontend-haproxy-validate:output} && kill -USR2 $(
not-found-file = {{ software_parameter_dict['template_not_found_html'] }}
not-found-file = {{ software_parameter_dict['template_not_found_html'] }}
master-certificate = ${frontend-directory:master-autocert-dir}/master.pem
master-certificate = ${frontend-directory:master-autocert-dir}/master.pem
self-signed-fallback-certificate = ${self-signed-fallback-access:certificate}
self-signed-fallback-certificate = ${self-signed-fallback-access:certificate}
http-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('frontend-haproxy-http-port', FRONTEND_GLOBAL_DEFAULTS['expert']['frontend-haproxy-http-port'])
}}
http-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['frontend-haproxy-http-port']
}}
https-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('frontend-haproxy-https-port', FRONTEND_GLOBAL_DEFAULTS['expert']['frontend-haproxy-https-port'])
}}
https-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['frontend-haproxy-https-port']
}}
# Communication with ATS
# Communication with ATS
cache-port = ${trafficserver-variable:input-port}
cache-port = ${trafficserver-variable:input-port}
# slave instrspection
# slave instrspection
...
@@ -538,10 +542,10 @@ hostname = ${slap-configuration:instance-title}
...
@@ -538,10 +542,10 @@ hostname = ${slap-configuration:instance-title}
plugin-config =
plugin-config =
ip-allow-config = src_ip=0.0.0.0-255.255.255.255 action=ip_allow
ip-allow-config = src_ip=0.0.0.0-255.255.255.255 action=ip_allow
cache-path = ${trafficserver-directory:cache-path}
cache-path = ${trafficserver-directory:cache-path}
disk-cache-size = {{ instance_parameter_dict['configuration']['user']['global']
.get('disk-cache-size', FRONTEND_GLOBAL_DEFAULTS['disk-cache-size'])
}}
disk-cache-size = {{ instance_parameter_dict['configuration']['user']['global']
['disk-cache-size']
}}
ram-cache-size = {{ instance_parameter_dict['configuration']['user']['global']
.get('ram-cache-size', FRONTEND_GLOBAL_DEFAULTS['ram-cache-size'])
}}
ram-cache-size = {{ instance_parameter_dict['configuration']['user']['global']
['ram-cache-size']
}}
templates-dir = {{ software_parameter_dict['trafficserver'] }}/etc/trafficserver/body_factory
templates-dir = {{ software_parameter_dict['trafficserver'] }}/etc/trafficserver/body_factory
request-timeout = {{ instance_parameter_dict['configuration']['user']['global']
.get('request-timeout', FRONTEND_GLOBAL_DEFAULTS['request-timeout'])
}}
request-timeout = {{ instance_parameter_dict['configuration']['user']['global']
['request-timeout']
}}
version-hash = ${version-hash:value}
version-hash = ${version-hash:value}
node-id = ${frontend-node-id:value}
node-id = ${frontend-node-id:value}
...
@@ -800,8 +804,8 @@ file = ${directory:etc}/backend-haproxy.cfg
...
@@ -800,8 +804,8 @@ file = ${directory:etc}/backend-haproxy.cfg
pid-file = ${directory:run}/backend-haproxy.pid
pid-file = ${directory:run}/backend-haproxy.pid
log-socket = ${backend-haproxy-rsyslogd-config:log-socket}
log-socket = ${backend-haproxy-rsyslogd-config:log-socket}
graceful-command = ${backend-haproxy-validate:output} && kill -USR2 $(cat ${:pid-file})
graceful-command = ${backend-haproxy-validate:output} && kill -USR2 $(cat ${:pid-file})
http-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('backend-haproxy-http-port', FRONTEND_GLOBAL_DEFAULTS['expert']['backend-haproxy-http-port'])
}}
http-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['backend-haproxy-http-port']
}}
https-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('backend-haproxy-https-port', FRONTEND_GLOBAL_DEFAULTS['expert']['backend-haproxy-https-port'])
}}
https-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['backend-haproxy-https-port']
}}
# Caucase related configuration
# Caucase related configuration
caucase-url = {{ instance_parameter_dict['configuration']['backend-client-caucase-url'] }}
caucase-url = {{ instance_parameter_dict['configuration']['backend-client-caucase-url'] }}
ca-certificate = ${backend-client-login-config:ca-certificate}
ca-certificate = ${backend-client-login-config:ca-certificate}
...
@@ -811,7 +815,7 @@ csr = ${backend-client-caucase-updater-csr:csr}
...
@@ -811,7 +815,7 @@ csr = ${backend-client-caucase-updater-csr:csr}
crl = ${backend-client-login-config:crl}
crl = ${backend-client-login-config:crl}
# the statistic page
# the statistic page
statistic-certificate = ${self-signed-ip-access:certificate}
statistic-certificate = ${self-signed-ip-access:certificate}
statistic-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('backend-haproxy-statistic-port', FRONTEND_GLOBAL_DEFAULTS['expert']['backend-haproxy-statistic-port'])
}}
statistic-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['backend-haproxy-statistic-port']
}}
statistic-username = ${monitor-instance-parameter:username}
statistic-username = ${monitor-instance-parameter:username}
statistic-password = ${monitor-htpasswd:passwd}
statistic-password = ${monitor-htpasswd:passwd}
statistic-identification = {{ instance_parameter_dict['instance-title'] + ' @ ' + instance_parameter_dict['configuration']['cluster-identification'] }}
statistic-identification = {{ instance_parameter_dict['instance-title'] + ' @ ' + instance_parameter_dict['configuration']['cluster-identification'] }}
...
@@ -858,7 +862,7 @@ extra-context =
...
@@ -858,7 +862,7 @@ extra-context =
<= logrotate-entry-base
<= logrotate-entry-base
name = backend-haproxy
name = backend-haproxy
log = ${backend-haproxy-rsyslogd-config:log-file}
log = ${backend-haproxy-rsyslogd-config:log-file}
rotate-num = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('rotate-num', FRONTEND_GLOBAL_DEFAULTS['expert']['rotate-num'])
}}
rotate-num = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['rotate-num']
}}
# Note: Slaves do not define their own reload, as this would be repeated,
# Note: Slaves do not define their own reload, as this would be repeated,
# because sharedscripts work per entry, and each slave needs its own
# because sharedscripts work per entry, and each slave needs its own
# olddir
# olddir
...
@@ -956,7 +960,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
...
@@ -956,7 +960,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
# Note: Workaround for monitor stack, which uses monitor-httpd-port parameter
# Note: Workaround for monitor stack, which uses monitor-httpd-port parameter
# directly, and in our case it can come from the network, thus resulting
# directly, and in our case it can come from the network, thus resulting
# with need to strip !py!'u'
# with need to strip !py!'u'
monitor-httpd-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('monitor-httpd-port', FRONTEND_GLOBAL_DEFAULTS['expert']['monitor-httpd-port'])
}}
monitor-httpd-port = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['monitor-httpd-port']
}}
password = {{ instance_parameter_dict['configuration']['monitor-password'] }}
password = {{ instance_parameter_dict['configuration']['monitor-password'] }}
[monitor-conf-parameters]
[monitor-conf-parameters]
...
@@ -992,7 +996,7 @@ context =
...
@@ -992,7 +996,7 @@ context =
<= monitor-promise-base
<= monitor-promise-base
promise = check_url_available
promise = check_url_available
name = re6st-connectivity.py
name = re6st-connectivity.py
config-url = {{ instance_parameter_dict['configuration']['user']['global']
.get('re6st-verification-url', FRONTEND_GLOBAL_DEFAULTS['re6st-verification-url'])
}}
config-url = {{ instance_parameter_dict['configuration']['user']['global']
['re6st-verification-url']
}}
[slave-introspection-frontend]
[slave-introspection-frontend]
<= slap-connection
<= slap-connection
...
@@ -1093,7 +1097,7 @@ config-port = ${frontend-configuration:slave-introspection-https-port}
...
@@ -1093,7 +1097,7 @@ config-port = ${frontend-configuration:slave-introspection-https-port}
<= logrotate-entry-base
<= logrotate-entry-base
name = slave-introspection
name = slave-introspection
log = ${frontend-haproxy-configuration:slave-introspection-access-log} ${frontend-haproxy-configuration:slave-introspection-error-log}
log = ${frontend-haproxy-configuration:slave-introspection-access-log} ${frontend-haproxy-configuration:slave-introspection-error-log}
rotate-num = {{ instance_parameter_dict['configuration']['user']['global']['expert']
.get('rotate-num', FRONTEND_GLOBAL_DEFAULTS['expert']['rotate-num'])
}}
rotate-num = {{ instance_parameter_dict['configuration']['user']['global']['expert']
['rotate-num']
}}
post = kill -USR2 $(cat ${frontend-haproxy-configuration:slave-introspection-pid-file})
post = kill -USR2 $(cat ${frontend-haproxy-configuration:slave-introspection-pid-file})
delaycompress =
delaycompress =
...
@@ -1120,21 +1124,6 @@ name = ${:_buildout_section_name_}.py
...
@@ -1120,21 +1124,6 @@ name = ${:_buildout_section_name_}.py
config-filename = ${logrotate-setup-validate:state-file}
config-filename = ${logrotate-setup-validate:state-file}
config-state = empty
config-state = empty
[configuration]
{% for key, value in instance_parameter_dict['configuration'].items() %}
{{ key }} = {{ dumps(value) }}
{%- endfor %}
[FRONTEND_USER_DEFAULTS]
{% for key, value in FRONTEND_USER_DEFAULTS.items() %}
{{ key }} = {{ dumps(value) }}
{%- endfor %}
[FRONTEND_GLOBAL_DEFAULTS]
{% for key, value in FRONTEND_GLOBAL_DEFAULTS.items() %}
{{ key }} = {{ dumps(value) }}
{%- endfor %}
[instance-parameter-section]
[instance-parameter-section]
{#- There are dangerous keys like recipe, etc #}
{#- There are dangerous keys like recipe, etc #}
{#- XXX: Some other approach would be useful #}
{#- XXX: Some other approach would be useful #}
...
...
software/rapid-cdn/instance-slave-list.cfg.in
View file @
95b08d34
...
@@ -86,7 +86,7 @@ context =
...
@@ -86,7 +86,7 @@ context =
{%- do slave_instance.__setitem__('path', slave_instance.get('path', SLAVE_DEFAULTS['path']).strip('/')) %}
{%- do slave_instance.__setitem__('path', slave_instance.get('path', SLAVE_DEFAULTS['path']).strip('/')) %}
{#- Manage ciphers #}
{#- Manage ciphers #}
{%- set slave_cipher_list = [] %}
{%- set slave_cipher_list = [] %}
{%- for cipher in slave_instance.get('ciphers',
configuration['
ciphers']).strip().split() %}
{%- for cipher in slave_instance.get('ciphers',
dynamic_profile_configuration['global-
ciphers']).strip().split() %}
{%- do slave_cipher_list.append(CIPHER_TRANSLATION_DICT.get(cipher, cipher)) %}
{%- do slave_cipher_list.append(CIPHER_TRANSLATION_DICT.get(cipher, cipher)) %}
{%- endfor %}
{%- endfor %}
{%- do slave_instance.__setitem__('ciphers', ':'.join(slave_cipher_list)) %}
{%- do slave_instance.__setitem__('ciphers', ':'.join(slave_cipher_list)) %}
...
...
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