Commit 74f5a8d9 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Drop unneeded parameter public-ipv4

The public-ipv4 comes from the historical usage of the system, but since
new implementation came into place it was never needed, so now it's time to
say goodbye.

Test has been updated to do in-house mimic of the used IP to access.
parent a4d59ef5
...@@ -60,14 +60,12 @@ This is to deploy an entire frontend server with a public IPv4. If you want to ...@@ -60,14 +60,12 @@ This is to deploy an entire frontend server with a public IPv4. If you want to
First, you will need to request a "master" instance of Caddy Frontend with: First, you will need to request a "master" instance of Caddy Frontend with:
* A ``domain`` parameter where the frontend will be available * A ``domain`` parameter where the frontend will be available
* A ``public-ipv4`` parameter to state which public IPv4 will be used
like:: like::
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<instance> <instance>
<parameter id="domain">moulefrite.org</parameter> <parameter id="domain">moulefrite.org</parameter>
<parameter id="public-ipv4">xxx.xxx.xxx.xxx</parameter>
</instance> </instance>
Then, it is possible to request many slave instances (currently only from slapconsole, UI doesn't work yet) of Caddy Frontend, like:: Then, it is possible to request many slave instances (currently only from slapconsole, UI doesn't work yet) of Caddy Frontend, like::
...@@ -189,10 +187,6 @@ Name of the domain to be used (example: mydomain.com). Sub domains of this domai ...@@ -189,10 +187,6 @@ Name of the domain to be used (example: mydomain.com). Sub domains of this domai
Using the IP given by the Master Instance. "domain" is a mandatory Parameter. Using the IP given by the Master Instance. "domain" is a mandatory Parameter.
public-ipv4
~~~~~~~~~~~
Public ipv4 of the frontend (the one Caddy will be indirectly listening to)
port port
~~~~ ~~~~
Port used by Caddy. Optional parameter, defaults to 4443. Port used by Caddy. Optional parameter, defaults to 4443.
......
...@@ -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 = 28bf0c4c75c028bed79fc38786831b3e md5sum = 04015a7a552285984d091293ef573fb9
[profile-common] [profile-common]
filename = instance-common.cfg.in filename = instance-common.cfg.in
...@@ -26,11 +26,11 @@ md5sum = a6a626fd1579fd1d4b80ea67433ca16a ...@@ -26,11 +26,11 @@ md5sum = a6a626fd1579fd1d4b80ea67433ca16a
[profile-caddy-replicate] [profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 5fb1da6ff50234870f25a86ae51f5d5e md5sum = b7eeb3268b32b9fceb9a6f3c248a7bbf
[profile-slave-list] [profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in _update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = eadc3ee8927461fe9475e8b01667bbfe md5sum = e61477243ed7405b1d8b746287a8f03b
[profile-replicate-publish-slave-information] [profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in _update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
'enable-http2-by-default', 'enable-http2-by-default',
'global-disable-http2', 'global-disable-http2',
'mpm-graceful-shutdown-timeout', 'mpm-graceful-shutdown-timeout',
'public-ipv4',
're6st-verification-url', 're6st-verification-url',
'backend-connect-timeout', 'backend-connect-timeout',
'backend-connect-retries', 'backend-connect-retries',
...@@ -271,7 +270,7 @@ config-monitor-username = ${monitor-instance-parameter:username} ...@@ -271,7 +270,7 @@ config-monitor-username = ${monitor-instance-parameter:username}
config-monitor-password = ${monitor-htpasswd:passwd} config-monitor-password = ${monitor-htpasswd:passwd}
software-type = {{frontend_type}} software-type = {{frontend_type}}
return = private-ipv4 public-ipv4 slave-instance-information-list monitor-base-url backend-client-csr_id-url csr_id-url csr_id-certificate backend-haproxy-statistic-url return = private-ipv4 slave-instance-information-list monitor-base-url backend-client-csr_id-url csr_id-url csr_id-certificate backend-haproxy-statistic-url
{#- Send only needed parameters to frontend nodes #} {#- Send only needed parameters to frontend nodes #}
{%- set base_node_configuration_dict = {} %} {%- set base_node_configuration_dict = {} %}
......
...@@ -50,11 +50,6 @@ ...@@ -50,11 +50,6 @@
"title": "Duration of the graceful shutdown period. Warning: Changing the parameter will result in restarting Caddy process.", "title": "Duration of the graceful shutdown period. Warning: Changing the parameter will result in restarting Caddy process.",
"type": "integer" "type": "integer"
}, },
"public-ipv4": {
"description": "Public ipv4 of the frontend (the one Caddy will be indirectly listening to).",
"title": "Public IPv4",
"type": "string"
},
"re6st-verification-url": { "re6st-verification-url": {
"description": "Url to verify if the internet and/or re6stnet is working.", "description": "Url to verify if the internet and/or re6stnet is working.",
"title": "Test Verification URL", "title": "Test Verification URL",
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
"description": "List of URLs to access logs", "description": "List of URLs to access logs",
"type": "array" "type": "array"
}, },
"public-ipv4": {
"description": "Public IPv4 to be included on DNS",
"type": "string"
},
"replication_number": { "replication_number": {
"description": "Number of nodes the slave is replicated", "description": "Number of nodes the slave is replicated",
"type": "integer" "type": "integer"
......
...@@ -78,7 +78,6 @@ cert = ${slap-connection:cert-file} ...@@ -78,7 +78,6 @@ cert = ${slap-connection:cert-file}
# All parameters are available through the configuration.XX syntax. # All parameters are available through the configuration.XX syntax.
# All possible parameters should have a default. # All possible parameters should have a default.
configuration.domain = example.org configuration.domain = example.org
configuration.public-ipv4 =
configuration.port = 4443 configuration.port = 4443
configuration.plain_http_port = 8080 configuration.plain_http_port = 8080
configuration.plain_nginx_port = 8081 configuration.plain_nginx_port = 8081
......
...@@ -178,7 +178,6 @@ context = ...@@ -178,7 +178,6 @@ context =
{%- set slave_log_access_url = urlparse_module.unquote(furled.tostr()) %} {%- set slave_log_access_url = urlparse_module.unquote(furled.tostr()) %}
{%- do slave_publish_dict.__setitem__('log-access', slave_log_access_url) %} {%- 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__('slave-reference', slave_reference) %}
{%- do slave_publish_dict.__setitem__('public-ipv4', configuration['public-ipv4']) %}
{%- do slave_publish_dict.__setitem__('backend-client-caucase-url', backend_client_caucase_url) %} {%- do slave_publish_dict.__setitem__('backend-client-caucase-url', backend_client_caucase_url) %}
{#- Set slave domain if none was defined #} {#- Set slave domain if none was defined #}
{%- if slave_instance.get('custom_domain', None) == None %} {%- if slave_instance.get('custom_domain', None) == None %}
...@@ -435,7 +434,6 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -435,7 +434,6 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
{#- Publish information for the instance #} {#- Publish information for the instance #}
[publish-caddy-information] [publish-caddy-information]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
public-ipv4 = {{ configuration['public-ipv4'] }}
private-ipv4 = {{ instance_parameter_dict['ipv4-random'] }} private-ipv4 = {{ instance_parameter_dict['ipv4-random'] }}
{%- if configuration['extra_slave_instance_list'] %} {%- if configuration['extra_slave_instance_list'] %}
{#- sort_keys are important in order to avoid shuffling parameters on each run #} {#- sort_keys are important in order to avoid shuffling parameters on each run #}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment