# 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.",
"patternProperties":{
"type":"string"
".*":{
},
"properties":{
"check-status-code":{
"state":{
"default":"200",
"title":"State",
"title":"Default Check HTTP Code",
"description":"State of the node of the region. Can be used to destroy not needed regions.",
"description":"Default HTTP code to check against (default: 200).",
"type":"string",
"type":"string"
"default":"started",
},
"enum":[
"check-http-header-dict":{
"started",
"default":"{}",
"stopped",
"title":"HTTP header dict to check",
"destroyed"
"description":"JSON dict of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}",
]
},
"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"
"type":"object"
},
},
"check-frontend-ip":{
"nameserver-list":{
"default":"",
"default":[],
"title":"Default space separated list of Frontend IPs to check",
"title":"Nameservers (backward compatibility)",
"description":"Default list of Frontend IPs to check, if empty no constraint is used.",
"description":"List of nameservers to use. Note: This is backward compatibility, use region-dict for full configuration control.",
"type":"string"
"type":"array"
},
"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"
},
},
"failure-amount":{
"check-frontend-ip-list":{
"default":"1",
"default":[],
"title":"Default amount of failures to consider URL as in bad state",
"title":"Default Frontend IPs to check (backward compatibility)",
"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).",
"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"
"type":"string"
},
},
"check-status-code":{
"region-dict":{
"default":"Master default",
"title":"Applicable Regions",
"title":"Default Check HTTP Code.",
"description":"Puts the check on the defined regions. No definition will result with presence in all regions.",
"description":"HTTP code to check against (default: comes from master partition).",
"patternProperties":{
"type":"string"
".*":{
},
"properties":{
"check-http-header-dict":{
"state":{
"default":"Master default",
"title":"State",
"title":"HTTP header dict to check",
"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.",
"description":"JSON dict of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}",
"type":"string",
"type":"object"
"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":{
"check-status-code":{
"default":"Master default",
"title":"HTTP Code Check",
"title":"Space separated list of Frontend IPs to check",
"description":"Expected response HTTP Code.",
"description":"List of Frontend IPs to check, if empty no constraint is used (default: comes from master partition).",
"type":"number",
"type":"string"
"default":200,
"minimum":100,
"maximum":599
},
},
"check-certificate-expiration-days":{
"check-certificate-expiration-days":{
"default":"Master default",
"title":"Certificate Expiration Check (days)",
"title":"Certificate expiration days check",
"description":"Amount of days to consider certificate as being to-be-expired.",
"description":"Amount of days to consider certificate as being to-be-expired (default: comes from master partition).",
"type":"number",
"type":"string"
"default":15,
"minimum":1
},
},
"check-maximum-elapsed-time":{
"check-maximum-elapsed-time":{
"default":"Master default",
"title":"Maximum Elapsed Check (seconds)",
"title":"Maximum elapsed time for a site to reply (seconds)",
"description":"Maximum elapsed time for a site to reply to be considered good.",
"description":"Maximum elapsed time for a site to reply to be considered good.(default: comes from master partition).",
"type":"number",
"type":"string"
"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":{
"failure-amount":{
"default":"Master default",
"title":"Failure Amount",
"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.",
"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":"number",
"type":"string"
"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') %}
{%- 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 %}
{%- endfor %}
{%- set monitor_base_port = int(slap_configuration['configuration.monitor-base-port']) %}
{%- set monitor_base_port = int(slap_configuration['configuration.monitor-base-port']) %}
{%- for i in range(1, edgebot_quantity + 1) %}
{%- set number = {'i': 1} %}
{%- set edgebot_name = "%s-%s" % (namebase, i) %}
{%- for region_name in sorted(slapparameter_dict['region-dict']) %}
{%- set request_section_title = 'request-%s' % edgebot_name %}
{%- set region_parameter_dict = slapparameter_dict['region-dict'][region_name] %}
{%- do edgebot_list.append(edgebot_name) %}
{%- set edgebot_name = "%s-%s" % (namebase, region_name) %}
{%- do edgebot_section_list.append(request_section_title) %}
{%- set request_section_title = 'request-%s' % (hashlib_module.md5(edgebot_name.encode('utf-8')).hexdigest(),) %}
{%- do part_list.append(request_section_title) %}
{%- do part_list.append(request_section_title) %}
{%- do request_dict.__setitem__(request_section_title,
{#- Note: monitor-httpd-port will vary on regions being added and removed,
{
but this is accepted, as it's only internal trick #}
"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":{
"additionalProperties":{
"type":"array",
"type":"array",
"items":{
"items":{
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
"type":"integer"
"type":"integer"
},
},
"storage-count":{
"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.",