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
Paul Graydon
slapos
Commits
274e336d
Commit
274e336d
authored
Nov 16, 2023
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix slave parameters
parent
1eb696a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
21 deletions
+13
-21
software/sozu/buildout.hash.cfg
software/sozu/buildout.hash.cfg
+2
-2
software/sozu/config.toml.in
software/sozu/config.toml.in
+3
-3
software/sozu/instance-sozu.cfg.jinja2.in
software/sozu/instance-sozu.cfg.jinja2.in
+8
-16
No files found.
software/sozu/buildout.hash.cfg
View file @
274e336d
...
...
@@ -18,11 +18,11 @@ md5sum = 5b6d18ff660516bf583cf4fe2c2b8059
[template-sozu]
filename = instance-sozu.cfg.jinja2.in
md5sum =
54c9b0eee8b29d2a8084291ca4e9b643
md5sum =
ea453374e67377ce5b9acda7976a0a0e
[config.toml]
filename = config.toml.in
md5sum =
f5551578f81b01eadc68fe3da219101
3
md5sum =
6d15b97ae88f6a6529cc7d993a58a16
3
[publish-sozu-slave-parameters.cfg]
filename = publish-sozu-slave-parameters.cfg.in
...
...
software/sozu/config.toml.in
View file @
274e336d
...
...
@@ -242,13 +242,13 @@ certificate_chain = "{{ parameter_dict['cert-chain-file'] }}"
# the protocol option indicates if we will use HTTP or TCP proxying
# possible options are "http" or "tcp"
protocol = "{{ cluster_dict
['protocol']
}}"
protocol = "{{ cluster_dict
.get('protocol', 'http')
}}"
# per cluster load balancing algorithm. The possible values are
# "ROUND_ROBIN", "RANDOM", "LEAST_LOADED" and "POWER_OF_TWO". Defaults to "ROUND_ROBIN"
load_balancing = "{{ cluster_dict
['load-balancing']
}}"
load_balancing = "{{ cluster_dict
.get('load-balancing', 'ROUND_ROBIN')
}}"
# metric evaluating the load on the backend. available options: connections, requests, connection_time
load_metric = "{{ cluster_dict
['load-metric']
}}"
load_metric = "{{ cluster_dict
.get('load-metric', 'connections')
}}"
# frontends configuration
# this specifies which listeners; domains, certificates that will be configured for a cluster
...
...
software/sozu/instance-sozu.cfg.jinja2.in
View file @
274e336d
...
...
@@ -45,36 +45,28 @@ wrapper = ${directory:tmp}/ca-${:name}
{% set name = instance_dict['slave_reference'] -%}
{% set cert_section_name = '${' ~ name ~ '-ssl:cert-file}' -%}
{% set key_section_name = '${' ~ name ~ '-ssl:key-file}' -%}
{% set slave_dict = {
'name': name.replace('-', '_').lower(),
'protocol': instance_dict.get('protocol', 'http'),
'load-balancing': instance_dict.get('load-balancing', 'ROUND_ROBIN'),
'load-metric': instance_dict.get('load-metric', 'connections'),
'frontend-dict': instance_dict['frontend-dict'],
'backend-dict': instance_dict['backend-dict']
} -%}
[{{ name }}-ssl]
<= ca-certificate-base
name = {{ name }}
{% for cluster_name, cluster_dict in
slav
e_dict['frontend-dict'].items() %}
{% for cluster_name, cluster_dict in
instanc
e_dict['frontend-dict'].items() %}
{% if cluster_dict.get('deploy-certificate') -%}
{% do
slav
e_dict['frontend-dict'][cluster_name].__setitem__('certificate', '${' ~ name ~ '-ssl:cert-file}') -%}
{% do
slav
e_dict['frontend-dict'][cluster_name].__setitem__('key', '${' ~ name ~ '-ssl:key-file}') -%}
{% do
slav
e_dict['frontend-dict'][cluster_name].__setitem__('certificate-chain', '${' ~ name ~ '-ssl:chain-file}') -%}
{% do
instanc
e_dict['frontend-dict'][cluster_name].__setitem__('certificate', '${' ~ name ~ '-ssl:cert-file}') -%}
{% do
instanc
e_dict['frontend-dict'][cluster_name].__setitem__('key', '${' ~ name ~ '-ssl:key-file}') -%}
{% do
instanc
e_dict['frontend-dict'][cluster_name].__setitem__('certificate-chain', '${' ~ name ~ '-ssl:chain-file}') -%}
{% elif cluster_dict.get('certificate') and cluster_dict.get('key') and cluster_dict.get('certificate-chain') -%}
{{ createfile(name ~ cluster_name ~ "-crt", "${directory:dssl}/" ~ name ~ cluster_name ~ ".crt", cluster_dict['certificate']) }}
{{ createfile(name ~ cluster_name ~ "-key", "${directory:dssl}/" ~ name ~ cluster_name ~ ".key", cluster_dict['key']) }}
{{ createfile(name ~ cluster_name ~ "-chain", "${directory:dssl}/" ~ name ~ cluster_name ~ "-chain.crt", cluster_dict['certificate-chain']) }}
{% do
slav
e_dict['frontend-dict'][cluster_name].__setitem__('certificate', '${' ~ name ~ cluster_name~ '-crt:output}') -%}
{% do
slav
e_dict['frontend-dict'][cluster_name].__setitem__('key', '${' ~ name ~ cluster_name~ '-key:output}') -%}
{% do
slav
e_dict['frontend-dict'][cluster_name].__setitem__('certificate-chain', '${' ~ name ~ cluster_name~ '-chain:output}') -%}
{% do
instanc
e_dict['frontend-dict'][cluster_name].__setitem__('certificate', '${' ~ name ~ cluster_name~ '-crt:output}') -%}
{% do
instanc
e_dict['frontend-dict'][cluster_name].__setitem__('key', '${' ~ name ~ cluster_name~ '-key:output}') -%}
{% do
instanc
e_dict['frontend-dict'][cluster_name].__setitem__('certificate-chain', '${' ~ name ~ cluster_name~ '-chain:output}') -%}
{% endif -%}
{% endfor -%}
{% do cluster_definition_dict.__setitem__(
slave_dict['name'], slav
e_dict) -%}
{% do cluster_definition_dict.__setitem__(
instance_dict['name'], instanc
e_dict) -%}
{% endfor -%}
[sozu-parameters]
...
...
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