sed -i 's#!${python2.7:location}/bin/python2.7#!/opt/slapos/parts/python2.7/bin/python2.7#' ${python2.7:location}/bin/python-config
sed -i 's#!${python:location}/bin/python${python:version}#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#' ${python:location}/bin/python-config
rm -rf ${bison-go:location}
[pygobject3]
pre-configure +=
sed -i 's#!/opt/slapos/parts/python2.7/bin/python2.7#!${python2.7:location}/bin/python2.7#' ${python2.7:location}/bin/python-config
sed -i 's#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#!${python:location}/bin/python${python:version}#' ${python:location}/bin/python-config
sed -i 's#!${python2.7:location}/bin/python2.7#!/opt/slapos/parts/python2.7/bin/python2.7#' ${python2.7:location}/bin/python-config
sed -i 's#!${python:location}/bin/python${python:version}#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#' ${python:location}/bin/python-config
@@ -237,14 +237,6 @@ Will append the specified path to the "VirtualHostRoot" of the zope's VirtualHos
"path" is an optional parameter, ignored if not specified.
Example of value: "/erp5/web_site_module/hosting/"
caddy_custom_https
~~~~~~~~~~~~~~~~~~
Raw Caddy configuration in python template format (i.e. write "%%" for one "%") for the slave listening to the https port. Its content will be templatified in order to access functionalities such as cache access, ssl certificates... The list is available above.
caddy_custom_http
~~~~~~~~~~~~~~~~~
Raw Caddy configuration in python template format (i.e. write "%%" for one "%") for the slave listening to the http port. Its content will be templatified in order to access functionalities such as cache access, ssl certificates... The list is available above
url
~~~
Necessary to activate cache. ``url`` of backend to use.
...
...
@@ -359,33 +351,6 @@ Request slave frontend instance so that https://[1:2:3:4:5:6:7:8]:1234 will be::
Note: QUIC support in Caddy is really experimental. It can result with silently having problems with QUIC connections or hanging Caddy process. So in case of QUIC error ``QUIC_NETWORK_IDLE_TIMEOUT`` or ``QUIC_PEER_GOING_AWAY`` it is required to restart caddy process.
Note: Chrome will refuse to connect to QUIC on different port then HTTPS has been served. As Caddy binds to high ports, if QUIC is wanted, the browser need to connect to high port too.
Experimental QUIC available in Caddy is not configurable. If caddy is configured to bind to HTTPS port ``${port}``, QUIC is going to be advertised on this port only. It is not possible to configure another public port in case of port rewriting.
So it is required to ``DNAT`` from ``${public IP}`` of the computer to the computer partition running caddy ``${local IP}`` with configured port::
@@ -621,3 +488,8 @@ Each `caddy-frontend-N` partition downloads certificates from the kedifa server.
Caucase (exposed by ``kedifa-caucase-url`` in master partition parameters) is used to handle certificates for authentication to kedifa server.
If ``automatic-internal-kedifa-caucase-csr`` is enabled (by default it is) there are scripts running on master partition to simulate human to sign certificates for each caddy-frontend-N node.
Support for X-Real-Ip and X-Forwarded-For
-----------------------------------------
X-Forwarded-For and X-Real-Ip are transmitted to the backend, but only for IPv4 access to the frontend. In case of IPv6 access, the provided IP will be wrong, because of using 6tunnel.
"description":"List of SOFTINST-XXX of Slaves, separated by space which is allowed to use custom configuration.",
"title":"Authorized Slave String",
"type":"string"
},
"-frontend-quantity":{
"description":"Quantity of Frontends Replicate.",
"title":"Frontend Replication Quantity",
...
...
@@ -71,16 +66,6 @@
"title":"Test Verification URL",
"type":"string"
},
"enable-quic":{
"default":"false",
"description":"Enables QUIC - Quick UDP Internet Connections. Note that this is experimental feature, thus can result in undefined behaviour. Warning: Changing the parameter will result in restarting Caddy process.",
"enum":[
"true",
"false"
],
"title":"Enable QUIC",
"type":"string"
},
"proxy-try-duration":{
"default":5,
"description":"A time during which Caddy will try to establish connection with a backend. Setting it to 0 will result with immediate return of 502 EOF error to the browser, even if it would be possible to (re)connect to the backend during few moments. More info in https://caddyserver.com/docs/proxy try_durtion.",
"description":"Raw http configuration in python template format. Your site will be rejected if you use it without notification and approval of frontend administrators",
"textarea":true,
"title":"HTTP configuration",
"type":"string"
},
"caddy_custom_https":{
"default":"",
"description":"Raw https configuration in python template format. Your site will be rejected if you use it without notification and approval of frontend administrators",
"textarea":true,
"title":"HTTPS configuration",
"type":"string"
},
"default-path":{
"default":"",
"description":"Provide default path to redirect user to when user access / (the site root)",
...
...
@@ -153,12 +139,6 @@
"title":"Prefer gzip Encoding for Backend",
"type":"string"
},
"re6st-optimal-test":{
"default":"",
"description":"IPv6 and IPv6 Address for the frontend test if re6st is on the optimal status (use ipv6,ipv4)",
"title":"IPv6 and IPv4 Address to test Re6st",
"type":"string"
},
"server-alias":{
"default":"",
"description":"Server Alias List separated by space",
{% do slave_publish_dict.__setitem__('log-access', slave_log_access_url) %}
{% do slave_publish_dict.__setitem__('slave-reference', slave_reference) %}
{% do slave_publish_dict.__setitem__('public-ipv4', public_ipv4) %}
{# Set slave domain if none was defined #}
{% if slave_instance.get('custom_domain', None) == None %}
{% set domain_prefix = slave_instance.get('slave_reference').replace("-", "").replace("_", "").lower() %}
{% do slave_instance.__setitem__('custom_domain', "%s.%s" % (domain_prefix, slapparameter_dict.get('domain'))) %}
{% endif %}
{% if enable_cache and 'url' in slave_instance %}
{% if 'domain' in slave_instance %}
{% if not slave_instance.get('custom_domain') %}
{% do slave_instance.__setitem__('custom_domain', slave_instance.get('domain')) %}
{% endif %}
{% endif %}
{% do slave_instance.__setitem__('backend_url', slave_instance.get('url')) %}
{% do slave_instance.__setitem__('https_backend_url', slave_instance.get('https-url', slave_instance.get('url'))) %}
{% do slave_instance.__setitem__('url', cache_access) %}
{% do slave_instance.__setitem__('https-url', ssl_cache_access) %}
{% do cached_server_dict.__setitem__(slave_reference, slave_configuration_section_name) %}
{% endif %}
{# BBB: apache_custom_https and apache_custom_http #}
{% if not slave_instance.has_key('caddy_custom_http') and not slave_instance.has_key('caddy_custom_https') and not slave_instance.has_key('apache_custom_http') and not slave_instance.has_key('apache_custom_https') %}
{% do slave_publish_dict.__setitem__('domain', slave_instance.get('custom_domain')) %}
{% do slave_publish_dict.__setitem__('url', "http://%s" % slave_instance.get('custom_domain')) %}
{% do slave_publish_dict.__setitem__('site_url', "http://%s" % slave_instance.get('custom_domain')) %}
{% do slave_publish_dict.__setitem__('secure_access', 'https://%s' % slave_instance.get('custom_domain')) %}
{% endif %}
{#- Loop thought slave list to set up slaves #}
{%- for slave_instance in slave_instance_list %}
{#- Manage ciphers #}
{%- set slave_ciphers = slave_instance.get('ciphers', '').strip().split() %}
{%- if slave_ciphers %}
{%- set slave_cipher_list = ' '.join(slave_ciphers) %}
{%- else %}
{%- set slave_cipher_list = ciphers.strip() %}
{%- endif %}
{%- do slave_instance.__setitem__('cipher_list', slave_cipher_list) %}
{%- set slave_type = slave_instance.get('type', '') %}
{%- set enable_cache = (('' ~ slave_instance.get('enable_cache', '')).lower() in TRUE_VALUES and slave_type != 'redirect') %}
{%- set slave_reference = slave_instance.get('slave_reference') %}
{%- set slave_kedifa = slave_kedifa_information.get(slave_reference) %}
{%- if slave_kedifa %}
{%- set key_download_url = slave_kedifa.get('key-download-url') %}
{%- else %}
{%- set key_download_url = 'notreadyyet' %}
{%- endif %}
{%- set slave_section_title = 'dynamic-template-slave-instance-%s' % slave_reference %}
{%- set slave_parameter_dict = generic_instance_parameter_dict.copy() %}
{%- set slave_publish_dict = {} %}
{%- set slave_configuration_section_name = 'slave-instance-%s-configuration' % slave_reference %}
{%- set slave_logrotate_section = slave_reference + "-logs" %}
{%- set slave_logrotate_cache_direct_section = slave_reference + "-cache-direct-logs" %}
{%- set slave_password_section = slave_reference + "-password" %}
{%- set slave_ln_section = slave_reference + "-ln" %}
{#- extend parts #}
{%- do part_list.extend([slave_ln_section]) %}
{%- do part_list.extend([slave_logrotate_section, slave_section_title]) %}
{%- set slave_log_folder = '${logrotate-directory:logrotate-backup}/' + slave_reference + "-logs" %}
{%- if enable_cache %}
{%- set slave_log_cache_direct_folder = '${logrotate-directory:logrotate-backup}/' + slave_logrotate_cache_direct_section %}
{%- do part_list.extend([slave_logrotate_cache_direct_section]) %}
{%- endif %}
{#- Pass HTTP2 switch #}
{%- do slave_instance.__setitem__('enable_http2_by_default', enable_http2_by_default) %}
{%- do slave_instance.__setitem__('global_disable_http2', global_disable_http2) %}
{#- Pass proxy_try_duration and proxy_try_interval #}
{%- do slave_instance.__setitem__('proxy_try_duration', proxy_try_duration) %}
{%- do slave_instance.__setitem__('proxy_try_interval', proxy_try_interval) %}
{#- Set Up log files #}
{%- do slave_parameter_dict.__setitem__('access_log', '/'.join([caddy_log_directory, '%s_access_log' % slave_reference])) %}
{%- do slave_parameter_dict.__setitem__('error_log', '/'.join([caddy_log_directory, '%s_error_log' % slave_reference])) %}
{%- do slave_instance.__setitem__('access_log', slave_parameter_dict.get('access_log')) %}
{%- do slave_instance.__setitem__('error_log', slave_parameter_dict.get('error_log')) %}
{%- if enable_cache %}
{%- do slave_parameter_dict.__setitem__('access_log_cache_direct', '/'.join([caddy_log_cache_direct_directory, '%s_access_log' % slave_reference])) %}
{%- do slave_parameter_dict.__setitem__('error_log_cache_direct', '/'.join([caddy_log_cache_direct_directory, '%s_error_log' % slave_reference])) %}
{%- do slave_instance.__setitem__('access_log_cache_direct', slave_parameter_dict.get('access_log_cache_direct')) %}
{%- do slave_instance.__setitem__('error_log_cache_direct', slave_parameter_dict.get('error_log_cache_direct')) %}
{%- endif %}
{#- Add slave log directory to the slave log access dict #}
{%- do slave_log_dict.__setitem__(slave_reference, slave_log_folder) %}
{# header_upstream -X-Forwarded-For - caddy behaviour while removing and setting header is unstable, so for now original header has to be kept, even if in that case it comes from after ATS caddy itself #}
{# header_upstream -X-Forwarded-For - caddy behaviour while removing and setting header is unstable, so for now original header has to be kept, even if in that case it comes from after ATS caddy itself #}
"description":"Front-end's software type. If this parameter is empty, no front-end instance is requested. Else, sla-dict must specify 'frontend' which is a special value matching all frontends (e.g. {\"instance_guid=bar\": [\"frontend\"]}).",
"default":"",
"type":"string"
"type":"string",
"format":"uri"
},
"domain":{
"description":"The domain name to request front-end to respond as.",
...
...
@@ -225,7 +226,8 @@
"cloudooo-url":{
"description":"Format conversion service URL",
"pattern":"^https?://",
"type":"string"
"type":"string",
"format":"uri"
},
"cloudooo-retry-count":{
"description":"Define retry count for cloudooo in network error case in test",
"description":"Used to qualify RR in the configuration. i.e.: if your origin is a.example.com and the RR for Europe is 'eu' the european clients will use eu.a.exmple.com",
"description":"Used to qualify RR in the configuration. i.e.: if your origin is a.example.com and the RR for Europe is 'eu' the european clients will use eu.a.example.com",
"type":"string"
},
"default":{
"title":"Default RR",
"description":"Defautl record to use when the ip is not regognized",
"description":"Default record to use when the ip is not recognized",
"description":"Percent memory allocted per threads. Default: [\"tmp:70\", \"join:20\", \"sort:10\"]",
"type":"array",
"items":{
"type":"string"
},
"default":[
"tmp:70",
"join:20",
"sort:10"
]
},
"innodb-file-per-table":{
"title":"enable Innodb file per table",
"description":"enable Innodb file per table. Possible value: 0=disabled, 1=enabled",
"type":"integer",
"default":1,
"minimum":0,
"maximum":1
},
"use-ipv6":{
"title":"Mariadb server listen on IPv6",
"description":"Listen on IPv6 instead of IPv4.",
"type":"boolean",
"default":true
},
"failover-mode":{
"title":"Failover mode",
"description":"Failover is manual or automatic (default \"manual\").",
"type":"string",
"default":"manual",
"enum":[
"manual",
"automatic"
]
},
"failover-limit":{
"title":"Failover amount limit",
"description":"Failover is canceld if already failover this number of time (0: unlimited) (default 5).",
"type":"integer",
"default":5
},
"failover-falsepositive-heartbeat":{
"title":"Failover check slaves do not receive heartbeat",
"description":"Failover checks that slaves do not receive heartbeat (default true).",
"type":"boolean",
"default":true
},
"failover-falsepositive-heartbeat-timeout":{
"title":"Failover check slaves do not receive heartbeat timeout",
"description":"Failover checks that slaves do not receive heartbeat detection timeout (default 3).",
"type":"integer",
"default":3
},
"failover-falsepositive-ping-counter":{
"title":"Failover amount of ping failures",
"description":"Failover after this number of ping failures (interval 1s) (default 5).",
"type":"integer",
"default":5
},
"failover-max-slave-delay":{
"title":"Failover election ignore slave with replication delay",
"description":"Election ignore slave with replication delay over this time in sec (default 30).",
"type":"integer",
"default":30
},
"failover-readonly-state":{
"title":"Failover Switchover set slaves as read-only",
"description":"Failover Switchover set slaves as read-only (default true).",
"type":"boolean",
"default":true
},
"failover-restart-unsafe":{
"title":"Failover when cluster down if a slave is start first",
"description":"Failover when cluster down if a slave is start first.",
"type":"boolean",
"default":false
},
"failover-time-limit":{
"title":"Cancel failover if time in sec not passed after previous failover",
"description":"Failover is canceled if timer in sec is not passed with previous failover (0: do not wait).",
"type":"integer",
"default":0
},
"switchover-at-equal-gtid":{
"title":"Switchover only when slaves are fully in sync",
"description":"Switchover only when slaves are fully in sync.",
"type":"boolean",
"default":false
},
"switchover-slave-wait-catch":{
"title":"Switchover wait for slave to catch with replication",
"description":"Switchover wait for slave to catch with replication, not needed in GTID mode but enable to detect possible issues like witing on old master (default true).",
"type":"boolean",
"default":true
},
"switchover-wait-kill":{
"title":"Switchover wait ms before killing threads on demoted master",
"description":"Switchover wait this many milliseconds before killing threads on demoted master (default 5000).",
"type":"integer",
"default":5000
},
"switchover-wait-trx":{
"title":"Cancel switchover after timeout seconds if can't aquire FTWRL",
"description":"Switchover is cancel after this timeout in second if can't aquire FTWRL (default 10).",
"type":"integer",
"default":10
},
"switchover-wait-write-query":{
"title":"Cancel switchover after timeout if a write query is running",
"description":"Switchover is canceled if a write query is running for this time (default 10).",
"type":"integer",
"default":10
}
},
"type":"object"
}
},
"type":"object"
}
}
},
"failover-limit":{
"title":"Failover amount limit",
"description":"Failover is canceld if already failover this number of time (0: unlimited) (default 5).",
"type":"integer",
"default":5
},
"failover-falsepositive-heartbeat":{
"title":"Failover check slaves do not receive heartbeat",
"description":"Failover checks that slaves do not receive heartbeat (default true).",
"type":"boolean",
"default":true
},
"failover-falsepositive-heartbeat-timeout":{
"title":"Failover check slaves do not receive heartbeat timeout",
"description":"Failover checks that slaves do not receive heartbeat detection timeout (default 3).",
"type":"integer",
"default":3
},
"failover-falsepositive-ping-counter":{
"title":"Failover amount of ping failures",
"description":"Failover after this number of ping failures (interval 1s) (default 5).",
"type":"integer",
"default":5
},
"failover-max-slave-delay":{
"title":"Failover election ignore slave with replication delay",
"description":"Election ignore slave with replication delay over this time in sec (default 30).",
"type":"integer",
"default":30
},
"failover-readonly-state":{
"title":"Failover Switchover set slaves as read-only",
"description":"Failover Switchover set slaves as read-only (default true).",
"type":"boolean",
"default":true
},
"failover-restart-unsafe":{
"title":"Failover when cluster down if a slave is start first",
"description":"Failover when cluster down if a slave is start first.",
"type":"boolean",
"default":false
},
"failover-time-limit":{
"title":"Cancel failover if time in sec not passed after previous failover",
"description":"Failover is canceled if timer in sec is not passed with previous failover (0: do not wait).",
"type":"integer",
"default":0
},
"switchover-at-equal-gtid":{
"title":"Switchover only when slaves are fully in sync",
"description":"Switchover only when slaves are fully in sync.",
"type":"boolean",
"default":false
},
"switchover-slave-wait-catch":{
"title":"Switchover wait for slave to catch with replication",
"description":"Switchover wait for slave to catch with replication, not needed in GTID mode but enable to detect possible issues like witing on old master (default true).",
"type":"boolean",
"default":true
},
"switchover-wait-kill":{
"title":"Switchover wait ms before killing threads on demoted master",
"description":"Switchover wait this many milliseconds before killing threads on demoted master (default 5000).",
"type":"integer",
"default":5000
},
"switchover-wait-trx":{
"title":"Cancel switchover after timeout seconds if can't aquire FTWRL",
"description":"Switchover is cancel after this timeout in second if can't aquire FTWRL (default 10).",
"type":"integer",
"default":10
},
"switchover-wait-write-query":{
"title":"Cancel switchover after timeout if a write query is running",
"description":"Switchover is canceled if a write query is running for this time (default 10).",