instance-neo-master.cfg.in 1.49 KB
Newer Older
Vincent Pelletier's avatar
Vincent Pelletier committed
1
[buildout]
2 3
extends = {{ logrotate_cfg }}
parts +=
Vincent Pelletier's avatar
Vincent Pelletier committed
4
  neo-master-promise
5
  logrotate-master
Vincent Pelletier's avatar
Vincent Pelletier committed
6 7 8 9

[neo-master]
recipe = slapos.cookbook:neoppod.master
binary = {{bin_directory}}/neomaster
10
wrapper = ${directory:run}/neomaster
Vincent Pelletier's avatar
Vincent Pelletier committed
11 12 13
logfile = ${directory:log}/neomaster.log
ip = ${publish:ip}
port = ${publish:port}
14 15 16 17 18 19 20 21
cluster = {{ dumps(slapparameter_dict['cluster']) }}
partitions = {{ dumps(slapparameter_dict.get('partitions', 12)) }}
replicas = {{ dumps(slapparameter_dict.get('replicas', 0)) }}
# "masters" parameter is not provided when just requesting a partition.
# No actuall installation takes place at that time
# (slapos.cookbook:neoppod.master raises), but cfg expansion must succeed. So
# this default value is required.
masters = {{ dumps(slapparameter_dict.get('masters', '')) }}
Vincent Pelletier's avatar
Vincent Pelletier committed
22 23 24 25

[publish]
recipe = slapos.cookbook:publish
# TODO: make port a partition parameter
26
ip = {{ (ipv4_set | list)[0] }}
Vincent Pelletier's avatar
Vincent Pelletier committed
27 28 29 30 31
port = 10000
master = ${:ip}:${:port}

[directory]
recipe = slapos.cookbook:mkdirectory
32
promises = ${buildout:directory}/etc/promises
Vincent Pelletier's avatar
Vincent Pelletier committed
33 34 35 36 37 38 39 40
run = ${buildout:directory}/etc/run
log = ${buildout:directory}/var/log

[neo-master-promise]
recipe = slapos.cookbook:check_port_listening
hostname = ${neo-master:ip}
port = ${neo-master:port}
path = ${directory:promises}/neo-master-promise
41 42 43 44 45 46 47 48

[logrotate-master]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
name = neo-master
log = ${neo-master:logfile}
post = {{ bin_directory }}/slapos-kill -n neomaster -s RTMIN+1 ${:log}