# It's very hard to put the username and password correctly, after schema://
# and before the host, as it's not the way how one can use monitor provided
# information, so just show the information in the URL
config-url = ${monitor-base:base-url}/private/virtual-hard-drive-url/${:filename} with username ${monitor-publish-parameters:monitor-user} and password ${monitor-publish-parameters:monitor-password}
"description":"Space separated list of name servers to use.",
"type":"string"
},
"check-status-code":{
"default":"200",
"title":"Default Check HTTP Code",
"description":"Default HTTP code to check against (default: 200).",
"type":"string"
},
"check-http-header-dict":{
"default":"{}",
"title":"HTTP header dict to check",
"description":"JSON dict of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}",
"region-dict":{
"title":"Regions",
"description":"Defines regions of the cluster",
"patternProperties":{
".*":{
"properties":{
"state":{
"title":"State",
"description":"State of the node of the region. Can be used to destroy not needed regions.",
"type":"string",
"default":"started",
"enum":[
"started",
"stopped",
"destroyed"
]
},
"sla-computer_guid":{
"title":"GUID of the computer on which this region shall be deployed",
"description":"Unique identifier of the computer, like \"COMP-1234\". By default, let Master choose a computer.",
"type":"string",
"default":""
},
"nameserver-list":{
"default":[],
"title":"Nameservers",
"description":"List of nameservers to use.",
"type":"array"
},
"check-frontend-ip-list":{
"default":[],
"title":"Default Frontend IPs to check",
"description":"List of default frontend IPs to check, if empty no constraint is used.",
"type":"array"
}
},
"type":"object"
}
},
"type":"object"
},
"check-frontend-ip":{
"default":"",
"title":"Default space separated list of Frontend IPs to check",
"description":"Default list of Frontend IPs to check, if empty no constraint is used.",
"type":"string"
},
"check-certificate-expiration-days":{
"default":"15",
"title":"Default certificate expiration days check",
"description":"Default amount of days to consider certificate as being to-be-expired (default: 15).",
"type":"string"
},
"check-maximum-elapsed-time":{
"default":"2",
"title":"Default maximum elapsed time for a site to reply (seconds)",
"description":"Default maximum elapsed time for a site to reply to be considered good (default: 2s).",
"type":"string"
"nameserver-list":{
"default":[],
"title":"Nameservers (backward compatibility)",
"description":"List of nameservers to use. Note: This is backward compatibility, use region-dict for full configuration control.",
"type":"array"
},
"failure-amount":{
"default":"1",
"title":"Default amount of failures to consider URL as in bad state",
"description":"Default amount of failures to consider URL as in bad state, can be set to higher value for endpoints with accepted short outages (default: 1).",
"type":"string"
"check-frontend-ip-list":{
"default":[],
"title":"Default Frontend IPs to check (backward compatibility)",
"description":"List of default frontend IPs to check, if empty no constraint is used. Note: This is backward compatibility, use region-dict for full configuration control.",
"description":"URL to check, like https://example.com",
"description":"URL to check, like https://example.com/",
"type":"string"
},
"check-status-code":{
"default":"Master default",
"title":"Default Check HTTP Code.",
"description":"HTTP code to check against (default: comes from master partition).",
"type":"string"
},
"check-http-header-dict":{
"default":"Master default",
"title":"HTTP header dict to check",
"description":"JSON dict of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}",
"type":"object"
"region-dict":{
"title":"Applicable Regions",
"description":"Puts the check on the defined regions. No definition will result with presence in all regions.",
"patternProperties":{
".*":{
"properties":{
"state":{
"title":"State",
"description":"State of the check of the region. Used only to make it correctly visible in the SlapOS Master UI if no other parameters are defined.",
"type":"string",
"default":"present",
"enum":[
"present"
]
},
"check-frontend-ip-list":{
"default":[],
"title":"Frontend IPs to check",
"description":"List of default frontend IPs to check, if empty no constraint is used. Defaults to region configuration.",
"type":"array"
}
},
"type":"object"
}
},
"type":"object",
"default":{}
},
"check-frontend-ip":{
"default":"Master default",
"title":"Space separated list of Frontend IPs to check",
"description":"List of Frontend IPs to check, if empty no constraint is used (default: comes from master partition).",
"type":"string"
"check-status-code":{
"title":"HTTP Code Check",
"description":"Expected response HTTP Code.",
"type":"number",
"default":200,
"minimum":100,
"maximum":599
},
"check-certificate-expiration-days":{
"default":"Master default",
"title":"Certificate expiration days check",
"description":"Amount of days to consider certificate as being to-be-expired (default: comes from master partition).",
"type":"string"
"title":"Certificate Expiration Check (days)",
"description":"Amount of days to consider certificate as being to-be-expired.",
"type":"number",
"default":15,
"minimum":1
},
"check-maximum-elapsed-time":{
"default":"Master default",
"title":"Maximum elapsed time for a site to reply (seconds)",
"description":"Maximum elapsed time for a site to reply to be considered good.(default: comes from master partition).",
"type":"string"
"title":"Maximum Elapsed Check (seconds)",
"description":"Maximum elapsed time for a site to reply to be considered good.",
"type":"number",
"default":2,
"minimum":1
},
"check-http-header-dict":{
"title":"HTTP Header Check",
"description":"JSON object of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}. Note: Shall be expressed directly as object, without any additional qouting.",
"type":"object",
"default":{}
},
"failure-amount":{
"default":"Master default",
"title":"Amount of failures to consider URL as in bad state",
"description":"Amount of failures to consider URL as in bad state, can be set to higher value for endpoints with accepted short outages (default: comes from master partition).",
"type":"string"
"title":"Failure Amount",
"description":"Amount of failures to consider URL as in bad state, can be set to higher value for endpoints with accepted short outages.",
"type":"number",
"default":2,
"minimum":1
},
"check-frontend-ip-list":{
"title":"Frontend IPs to check (backward compatibility)",
"description":"List of Frontend IPs to check, if empty no constraint is used. Defaults to region configuration. Note: Use region-dict's check-frontend-ip-list to ensure specific check on each region.",
{%- for region_name in sorted(slapparameter_dict['region-dict']) %}
{%- set region_parameter_dict = slapparameter_dict['region-dict'][region_name] %}
{%- if region_parameter_dict.get('state', 'started') == 'started' %}
{%- do active_region_list.append(region_name) %}
{%- endif %}
{%- endfor %}
{%- set authorized_slave_dict = {} %}
{%- set publish_slave_dict_dict = {} %}
{%- for slave in slave_instance_list | sort(attribute='slave_title') %}
{%- do authorized_slave_list.append(slave) %}
{%- set slave_reference = slave.pop('slave_reference') %}
{%- set publish_dict = {'assigned-region-dict': {}} %}
{%- if '_' in slave %}
{%- set base_slave_dict = json_module.loads(slave.pop('_')) %} {#- XXX: Unsafe! #}
{%- do base_slave_dict.__setitem__('-slave-title', slave['slave_title']) %}
{%- do base_slave_dict.__setitem__('-slave-reference', slave_reference) %}
{%- set slave_region_dict = base_slave_dict.pop('region-dict', {}) %}
{%- if slave_region_dict == {} %}
{%- for region in active_region_list %}
{%- do slave_region_dict.__setitem__(region, {}) %}
{%- endfor %}
{%- endif %}
{%- for region in slave_region_dict %}
{%- if region in active_region_list %}
{%- set region_info = {
'nameserver-list': slapparameter_dict['region-dict'][region].get('nameserver-list') or slapparameter_dict.get('slapparameter_dict') or [],
'check-frontend-ip-list': slave_region_dict[region].get('check-frontend-ip-list') or base_slave_dict.get('check-frontend-ip-list') or slapparameter_dict['region-dict'][region].get('check-frontend-ip-list') or slapparameter_dict.get('check-frontend-ip-list') or [],
} %}
{%- do publish_dict['assigned-region-dict'].__setitem__(region, region_info) %}
{%- set slave_dict = base_slave_dict.copy() %}
{%- do slave_dict.update(region_info) %}
{%- if region not in authorized_slave_dict %}
{%- do authorized_slave_dict.__setitem__(region, [slave_dict]) %}
{%- else %}
{%- do authorized_slave_dict[region].append(slave_dict) %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- do publish_slave_dict_dict.__setitem__(slave_reference, publish_dict) %}
{%- endfor %}
{%- set monitor_base_port = int(slap_configuration['configuration.monitor-base-port']) %}
{%- for i in range(1, edgebot_quantity + 1) %}
{%- set edgebot_name = "%s-%s" % (namebase, i) %}
{%- set request_section_title = 'request-%s' % edgebot_name %}
{%- do edgebot_list.append(edgebot_name) %}
{%- do edgebot_section_list.append(request_section_title) %}
{%- set number = {'i': 1} %}
{%- for region_name in sorted(slapparameter_dict['region-dict']) %}
{%- set region_parameter_dict = slapparameter_dict['region-dict'][region_name] %}
{%- set edgebot_name = "%s-%s" % (namebase, region_name) %}
{%- set request_section_title = 'request-%s' % (hashlib_module.md5(edgebot_name.encode('utf-8')).hexdigest(),) %}
{%- do part_list.append(request_section_title) %}
{%- do request_dict.__setitem__(request_section_title,
"description":"[NEO SR only] Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references ('node-0', 'node-1', ...). The prefix 'node-' is mandatory and the number must start from 0. The total number of nodes here must be equal to the length of node-list.",
"description":"[NEO SR only] Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references ('node-0', 'node-1', ...). The prefix 'node-' is mandatory and the number must start from 0. The total number of nodes here must be equal to the length of node-list. A node can be removed by requesting it without any admin, master and storage.",
"additionalProperties":{
"type":"array",
"items":{
...
...
@@ -95,7 +95,7 @@
"type":"integer"
},
"storage-count":{
"description":"Number of storage nodes to deploy. One master and one admin node is deployed with each storage.",
"description":"Number of storage nodes to deploy. One master and one admin node is deployed with each storage. 0 to disable.",