Start new NEO cluster automatically
[slapos.git] / software / neoppod / instance-neo-master.cfg.in
1 [buildout]
2 parts +=
3   neo-master-promise
4   logrotate-master
5
6 [neo-master]
7 recipe = slapos.cookbook:neoppod.master
8 binary = {{bin_directory}}/neomaster
9 wrapper = ${directory:etc_run}/neomaster
10 logfile = ${directory:log}/neomaster.log
11 ip = ${publish:ip}
12 port = ${publish:port-master}
13 cluster = {{ dumps(slapparameter_dict['cluster']) }}
14 partitions = {{ slapparameter_dict['partitions'] }}
15 replicas = {{ slapparameter_dict['replicas'] }}
16 upstream-cluster = {{ dumps(slapparameter_dict['upstream-cluster']) }}
17 upstream-masters = {{ dumps(slapparameter_dict['upstream-masters']) }}
18 autostart = {{ slapparameter_dict['autostart'] }}
19 # "masters" parameter is not provided when just requesting a partition.
20 # No actual installation takes place at that time
21 # (slapos.cookbook:neoppod.master raises), but cfg expansion must succeed. So
22 # this default value is required.
23 masters = ${publish:masters}
24
25 [neo-master-promise]
26 recipe = slapos.cookbook:check_port_listening
27 hostname = ${neo-master:ip}
28 port = ${neo-master:port}
29 path = ${directory:promises}/neo-master-promise
30
31 [logrotate-master]
32 recipe = slapos.cookbook:logrotate.d
33 logrotate-entries = ${logrotate:logrotate-entries}
34 backup = ${logrotate:backup}
35 name = neo-master
36 log = ${neo-master:logfile}
37 post = {{ bin_directory }}/slapos-kill -n neomaster -s RTMIN+1 ${:log}