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

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

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

# Network options
28
{% if use_ipv6 -%}
29
ip = {{ (ipv6_set | list)[0] }}
30 31
address-family = inet6
{% else -%}
32
ip = {{ (ipv4_set | list)[0] }}
33 34 35 36 37 38 39 40 41 42 43 44
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 -%}
45 46
# (with 10M buckets and HDBTLARGE option)
data-path = ${directory:kumofs-data}/kumodb.tch#bnum=10485760#opts=l
47
{% endif -%}
48 49

# Paths: Running wrappers
50 51 52
gateway-wrapper = ${directory:services}/kumofs_gateway
manager-wrapper = ${directory:services}/kumofs_manager
server-wrapper = ${directory:services}/kumofs_server
53 54

# Paths: Logs
55 56 57
kumo-gateway-log = ${directory:log}/kumo-gateway.log
kumo-manager-log = ${directory:log}/kumo-manager.log
kumo-server-log = ${directory:log}/kumo-server.log
58 59

# Binary information
60 61 62 63
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
64 65 66

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

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

80 81 82 83
[resiliency-exclude-file]
# Generate rdiff exclude file in case of resiliency
recipe = collective.recipe.template
input = inline: **
84
output = ${directory:srv}/exporter.exclude
85

86 87 88 89 90 91 92 93
# 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
94
path = ${directory:promise}/kumofs-server
95 96 97 98
port = ${kumofs-instance:server-port}

[promise-kumofs-server-listen]
<= promise-template
99
path = ${directory:promise}/kumofs-server-listen
100 101 102 103
port = ${kumofs-instance:server-listen-port}

[promise-kumofs-gateway]
<= promise-template
104
path = ${directory:promise}/kumofs-gateway
105 106 107 108
port = ${kumofs-instance:gateway-port}

[promise-kumofs-manager]
<= promise-template
109
path = ${directory:promise}/kumofs-manager
110
port = ${kumofs-instance:manager-port}
111 112 113 114 115

[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 4 }}
monitor-title = Kumofs monitor