Commit f37df893 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make tcpv4-port configurable and add json schemas.

parent c8d385fe
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going upward",
"default": 6001
}]
},
"backend-url": {
"description": "The backend url that varnish will cache",
"type": "string"
},
"web-checker-frontend-url": {
"description": "The entry-point-url that web checker will check the HTTP headers of all links in the web site",
"type": "string"
},
"web-checker-mail-address": {
"description": "Email address to which web checker result is sent",
"type": "string"
},
"web-checker-smtp-host": {
"description": "The smtp server to be used to send the web checker result",
"type": "string"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by Varnish instanciation",
"properties": {
"url": {
"description": "Varnish HTTP service access information",
"type": "string"
}
},
"type": "object"
}
{% set web_checker_parameter = slapparameter_dict['web-checker-mail-address'] -%} {% set web_checker_parameter = slapparameter_dict['web-checker-mail-address'] -%}
{% set tcpv4_port = slapparameter_dict.get('tcpv4_port', 6001) | int -%}
[buildout] [buildout]
parts = parts =
publish-varnish-connection-information publish-varnish-connection-information
...@@ -17,7 +18,7 @@ develop-eggs-directory = {{ develop_eggs_directory }} ...@@ -17,7 +18,7 @@ develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[publish-varnish-connection-information] [publish-varnish-connection-information]
recipe = slapos.cookbook:publishurl recipe = slapos.cookbook:publish.serialised
url = http://${varnish-instance:ip}:${varnish-instance:server-port}/ url = http://${varnish-instance:ip}:${varnish-instance:server-port}/
[varnish-instance] [varnish-instance]
...@@ -25,9 +26,9 @@ recipe = slapos.cookbook:generic.varnish ...@@ -25,9 +26,9 @@ recipe = slapos.cookbook:generic.varnish
# Network options # Network options
ip = ${slap-network-information:local-ipv4} ip = ${slap-network-information:local-ipv4}
server-port = 6001 server-port = {{ tcpv4_port }}
manager-port = 6002 manager-port = {{ tcpv4_port + 1 }}
stunnel-port = 6003 stunnel-port = {{ tcpv4_port + 2}}
# Paths: Running wrappers # Paths: Running wrappers
varnishd-wrapper = ${basedirectory:services}/varnishd varnishd-wrapper = ${basedirectory:services}/varnishd
......
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