Commit da94199f authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

runner: update request of a custom frontend so it can use backend-type parameter

parent d1bd1b3a
......@@ -112,12 +112,15 @@ The way to do that is to send a new parameter to your runner instance, using the
To create the frontend, you now have to wait the slaprunner to be processed.
You can define the type of your backend using "custom-frontend-backend-type". eg: zope
If you deploy a server, which uses basic auth, you also have to declare the parameter "custom-frontend-basic-auth" as true, or your slaprunner instance won't show as correctly instanciated.
Example :
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="custom-frontend-backend-url">http(s)://[THE_IPV6_ADDRESS]:PORT</parameter>
<parameter id="custom-frontend-backend-type">zope</parameter>
<parameter id="custom-frontend-basic-auth">true</parameter>
</instance>
......
......@@ -59,7 +59,7 @@ offline = true
# Internaly, the frontend will be asked to listen on the IPv6
# with port X + 10000, to match NAT rules of Qemu.
[request-custom-frontend]
recipe = slapos.cookbook:request
recipe = slapos.cookbook:requestoptional
software-url = {{ slapparameter_dict.get('custom-frontend-software-url', 'http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg') }}
software-type = {{ slapparameter_dict.get('custom-frontend-software-type', 'RootSoftwareInstance') }}
slave = true
......@@ -71,12 +71,18 @@ cert-file = $${slap-connection:cert-file}
computer-id = $${slap-connection:computer-id}
partition-id = $${slap-connection:partition-id}
{% if slapparameter_dict.get('custom-frontend-instance-guid') -%}
{%- if slapparameter_dict.get('custom-frontend-instance-guid') -%}
sla = instance_guid
sla-instance_guid = $${slap-parameter:frontend-instance-guid}
{% endif -%}
{% set custom_frontend_backend_type = slapparameter_dict.get('custom-frontend-backend-type')%}
{% if custom_frontend_backend_type %}
config = url type
config-type = {{ custom_frontend_backend_type }}
{% else %}
config = url
{% endif -%}
config-url = {{ slapparameter_dict.get('custom-frontend-backend-url') }}
return = site_url domain
......@@ -92,7 +98,7 @@ curl_path = {{ curl_executable_location }}
[publish-connection-informations]
custom-frontend-url = https://$${request-custom-frontend:connection-domain}
{% endif -%}
{% endif %}
# Create all needed directories
[directory]
......
......@@ -46,11 +46,30 @@
"description": "return an ipv4 frontend of the given ipv6(+optional port)",
"type": "string"
},
"custom-frontend-backend-type": {
"description": "The type of the frontend slave instance to ask",
"type": "string"
},
"custom-frontend-basic-auth": {
"description": "if the ip given with 'custom-frontend-backend-url' is secure, set it to true for the promise do not fail",
"type": "boolean",
"default": "false"
}
},
"custom-frontend-instance-guid": {
"description": "Instance guid of the frontend you whish to use",
"type": "string",
"default": "none"
},
"custom-frontend-software-type": {
"description": "SoftwareType of the frontend you request",
"default": "RootSoftwareInstance",
"type": "string"
},
"custom-frontend-software-url": {
"description": "Software Url of the frontend you request",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
"type": "string"
},
"monitor-port": {
"description": "allow to manually change the port on wich the apache server running monitoring interface is listening. The default value for the webrunner is different from the default value of the standalone stack-monitor server",
"type": "integer",
......
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