instance-kumofs.cfg.in 3.1 KB
Newer Older
1
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
2
[buildout]
3 4
extends = {{ logrotate_cfg }}
parts +=
5 6 7
  publish-kumofs-connection-information
  kumofs-instance
  logrotate-entry-kumofs
8 9 10 11
  promise-kumofs-server
  promise-kumofs-server-listen
  promise-kumofs-gateway
  promise-kumofs-manager
12 13

[publish-kumofs-connection-information]
14 15 16 17
recipe = slapos.cookbook:publish.serialised
{% if use_ipv6 -%}
url = memcached://[${kumofs-instance:ip}]:${kumofs-instance:gateway-port}/
{% else -%}
18
url = memcached://${kumofs-instance:ip}:${kumofs-instance:gateway-port}/
19
{% endif -%}
20 21 22 23 24

[kumofs-instance]
recipe = slapos.cookbook:generic.kumofs

# Network options
25
{% if use_ipv6 -%}
26
ip = {{ (ipv6_set | list)[0] }}
27 28
address-family = inet6
{% else -%}
29
ip = {{ (ipv4_set | list)[0] }}
30 31 32 33 34 35 36 37 38 39 40 41
address-family = inet4
{% endif -%}
{% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%}
manager-port = {{ tcpv4_port }}
server-port = {{ tcpv4_port + 1 }}
server-listen-port = {{ tcpv4_port + 2 }}
gateway-port = {{ tcpv4_port + 3 }}
# Paths: Data
{% set ram_storage_size = slapparameter_dict.get('ram-storage-size') -%}
{% if ram_storage_size -%}
data-path = *#capsiz={{ ram_storage_size }}m
{% else -%}
42 43
# (with 10M buckets and HDBTLARGE option)
data-path = ${directory:kumofs-data}/kumodb.tch#bnum=10485760#opts=l
44
{% endif -%}
45 46

# Paths: Running wrappers
47 48 49
gateway-wrapper = ${directory:services}/kumofs_gateway
manager-wrapper = ${directory:services}/kumofs_manager
server-wrapper = ${directory:services}/kumofs_server
50 51

# Paths: Logs
52 53 54
kumo-gateway-log = ${directory:log}/kumo-gateway.log
kumo-manager-log = ${directory:log}/kumo-manager.log
kumo-server-log = ${directory:log}/kumo-server.log
55 56

# Binary information
57 58 59 60
kumo-gateway-binary = {{ parameter_dict['kumo-location'] }}/bin/kumo-gateway
kumo-manager-binary = {{ parameter_dict['kumo-location'] }}/bin/kumo-manager
kumo-server-binary = {{ parameter_dict['kumo-location'] }}/bin/kumo-server
shell-path = {{ parameter_dict['dash-location'] }}/bin/dash
61 62 63

[logrotate-entry-kumofs]
recipe = slapos.cookbook:logrotate.d
64 65
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
66
name = kumofs
67
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} ${kumofs-instance:kumo-server-log}
68 69 70

[directory]
recipe = slapos.cookbook:mkdirectory
71 72 73 74
log = ${buildout:directory}/var/log
services = ${buildout:directory}/etc/run
promise = ${buildout:directory}/etc/promise
kumofs-data = ${buildout:directory}/srv/kumofs
75 76 77 78 79 80 81 82 83

# Deploy zope promises scripts
[promise-template]
recipe = slapos.cookbook:check_port_listening
hostname = ${kumofs-instance:ip}
port = ${kumofs-instance:server-listen-port}

[promise-kumofs-server]
<= promise-template
84
path = ${directory:promise}/kumofs-server
85 86 87 88
port = ${kumofs-instance:server-port}

[promise-kumofs-server-listen]
<= promise-template
89
path = ${directory:promise}/kumofs-server-listen
90 91 92 93
port = ${kumofs-instance:server-listen-port}

[promise-kumofs-gateway]
<= promise-template
94
path = ${directory:promise}/kumofs-gateway
95 96 97 98
port = ${kumofs-instance:gateway-port}

[promise-kumofs-manager]
<= promise-template
99
path = ${directory:promise}/kumofs-manager
100
port = ${kumofs-instance:manager-port}