Commit f0707d89 authored by Alain Takoudjou's avatar Alain Takoudjou

allow to input all re6st-registry parameters

parent 76f67bcf
...@@ -12,6 +12,66 @@ ...@@ -12,6 +12,66 @@
"type": "integer", "type": "integer",
"minimum": 1024, "minimum": 1024,
"default": 2048 "default": 2048
},
"prefix-length": {
"title": "Default length of allocated prefixes.",
"description": "Default length of allocated prefixes.",
"type": "integer",
"default": 16
},
"anonymous-prefix-length": {
"title": "Length of allocated anonymous prefixes.",
"description": "Length of allocated anonymous prefixes. 0 is unset.",
"type": "integer",
"default": 0
},
"mailhost": {
"title": "SMTP host to send confirmation emails.",
"description": "SMTP host to send confirmation emails. Not needed if when token is requested from slave instances.",
"type": "string",
"default": "127.0.0.1"
},
"ipv4-net": {
"title": "Enable ipv4 (ip/NET P_LENGTH).",
"description": "Enable ipv4 (ip/NET P_LENGTH). Each node is assigned a subnet of length PLEN, inside network IP/N. Ex: 10.42.0.0/16 8",
"type": "string",
"default": ""
},
"client-count": {
"title": "Number of client tunnels to set up.",
"description": "Number of client tunnels to set up.",
"type": "integer",
"default": 10
},
"tunnel-refresh": {
"title": "Interval in seconds between two tunnel refresh.",
"description": "Interval in seconds between two tunnel refresh: the worst tunnel is closed if the number of client tunnels has reached its maximum number (client-count).",
"type": "integer",
"default": 300
},
"max-clients": {
"title": "Maximum number of accepted clients per OpenVPN server.",
"description": "Maximum number of accepted clients per OpenVPN server. (if unset or 0: client-count * 2, which actually represents the average number of tunnels to other peers)",
"type": "integer",
"default": 0
},
"hello": {
"title": "Hello interval in seconds, for both wired and wireless connections.",
"description": "Hello interval in seconds, for both wired and wireless connections. OpenVPN ping-exit option is set to 4 times the hello interval. It takes between 3 and 4 times the hello interval for Babel to re-establish connection with a node for which the direct connection has been cut.",
"type": "integer",
"default": 15
},
"min-protocol": {
"title": "Reject nodes that are too old.",
"description": "Reject nodes that are too old. Default is unset.",
"type": "integer",
"default": -1
},
"encrypt": {
"title": "Specify that tunnels should be encrypted.",
"description": "Specify that tunnels should be encrypted.",
"type": "boolean",
"default": false
} }
} }
} }
\ No newline at end of file
...@@ -35,6 +35,7 @@ log = ${directory:log}/re6stnet ...@@ -35,6 +35,7 @@ log = ${directory:log}/re6stnet
conf = ${directory:etc}/re6stnet conf = ${directory:etc}/re6stnet
ssl = ${:conf}/ssl ssl = ${:conf}/ssl
token = ${:conf}/token token = ${:conf}/token
run = ${directory:run}/re6stnet
[certificate-authority] [certificate-authority]
recipe = slapos.cookbook:certificate_authority recipe = slapos.cookbook:certificate_authority
...@@ -116,11 +117,19 @@ db = ${re6stnet-dirs:registry}/registry.db ...@@ -116,11 +117,19 @@ db = ${re6stnet-dirs:registry}/registry.db
ca = ${re6stnet-dirs:ssl}/re6stnet.crt ca = ${re6stnet-dirs:ssl}/re6stnet.crt
key = ${re6stnet-dirs:ssl}/re6stnet.key key = ${re6stnet-dirs:ssl}/re6stnet.key
dh = ${re6stnet-dirs:ssl}/dh.pem dh = ${re6stnet-dirs:ssl}/dh.pem
mailhost = 127.0.0.1 verbose = 2
mailhost = {{ slapparameter_dict.get('mailhost', '127.0.0.1') }}
prefix-length = {{ slapparameter_dict.get('prefix-length', 16) }} prefix-length = {{ slapparameter_dict.get('prefix-length', 16) }}
anonymous-prefix-length = 32 anonymous-prefix-length = {{ slapparameter_dict.get('anonymous-prefix-length', 0) }}
logfile = ${re6stnet-dirs:log}/registry.log logfile = ${re6stnet-dirs:log}/registry.log
verbose = 2 run-dir = ${re6stnet-dirs:run}
ipv4-net = {{ slapparameter_dict.get('ipv4-net', '') }}
client-count = {{ slapparameter_dict.get('client-count', 10) }}
tunnel-refresh = {{ slapparameter_dict.get('tunnel-refresh', 300) }}
max-clients = {{ slapparameter_dict.get('max-clients', 0) }}
hello = {{ slapparameter_dict.get('hello', 15) }}
min-protocol = {{ slapparameter_dict.get('min-protocol', -1) }}
encrypt = {{ slapparameter_dict.get('encrypt', 'False') }}
[re6st-registry-conf] [re6st-registry-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -5,8 +5,24 @@ db {{ parameter_dict['db'] }} ...@@ -5,8 +5,24 @@ db {{ parameter_dict['db'] }}
ca {{ parameter_dict['ca'] }} ca {{ parameter_dict['ca'] }}
key {{ parameter_dict['key'] }} key {{ parameter_dict['key'] }}
dh {{ parameter_dict['dh'] }} dh {{ parameter_dict['dh'] }}
{% if parameter_dict.get('ipv4-net', '') -%}
ipv4 {{ parameter_dict['ipv4-net'] }}
{% endif -%}
client-count {{ parameter_dict['client-count'] }}
tunnel-refresh {{ parameter_dict['tunnel-refresh'] }}
hello {{ parameter_dict['hello'] }}
mailhost {{ parameter_dict['mailhost'] }} mailhost {{ parameter_dict['mailhost'] }}
prefix-length {{ parameter_dict['prefix-length'] }} prefix-length {{ parameter_dict['prefix-length'] }}
anonymous-prefix-length {{ parameter_dict['anonymous-prefix-length'] }} anonymous-prefix-length {{ parameter_dict['anonymous-prefix-length'] }}
logfile {{ parameter_dict['logfile'] }} logfile {{ parameter_dict['logfile'] }}
verbose {{ parameter_dict['verbose'] }} verbose {{ parameter_dict['verbose'] }}
\ No newline at end of file run {{ parameter_dict['run-dir'] }}
{% if parameter_dict.get('min-protocol', '-1') != '-1' -%}
min-protocol {{ parameter_dict['min-protocol'] }}
{% endif -%}
{% if parameter_dict.get('encrypt', 'False') in ('true', 'True', '1') -%}
encrypt
{% endif -%}
{% if parameter_dict.get('max-clients') != '0' -%}
max-clients {{ parameter_dict['max-clients'] }}
{% endif -%}
\ No newline at end of file
...@@ -95,7 +95,7 @@ extra-context = ...@@ -95,7 +95,7 @@ extra-context =
[template-re6stnet] [template-re6stnet]
< = download-base < = download-base
filename = instance-re6stnet.cfg.in filename = instance-re6stnet.cfg.in
md5sum = 3f72b0d5ef63b037e26e742e8eecaa1d md5sum = a5000a513877bdab10f160ac0aaac95f
[template-logrotate-base] [template-logrotate-base]
< = template-jinja2-base < = template-jinja2-base
...@@ -114,7 +114,7 @@ md5sum = 6fcf417f6b9651b1ed442f00c094f50c ...@@ -114,7 +114,7 @@ md5sum = 6fcf417f6b9651b1ed442f00c094f50c
[template-re6st-registry-conf] [template-re6st-registry-conf]
< = download-base < = download-base
filename = re6st-registry.conf.in filename = re6st-registry.conf.in
md5sum = 7760a213896755e707993d67d8d980bb md5sum = 5dc218f887faeffc466e41c7d6191e49
[template-wrapper] [template-wrapper]
< = download-base < = download-base
......
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