instance-kumofs.cfg.in 3.52 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
monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
24 25 26 27 28

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

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

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

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

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

[logrotate-entry-kumofs]
67
< = logrotate-entry-base
68
name = kumofs
69
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} ${kumofs-instance:kumo-server-log}
70 71 72

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

79 80
[resiliency-exclude-file]
# Generate rdiff exclude file in case of resiliency
81 82 83 84
recipe = slapos.recipe.template:jinja2
mode = 644
template = {{ 'inline:{{ "**\\n" }}' }}
rendered = ${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

[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 4 }}
115
monitor-title = {{ slapparameter_dict['name'] }}
116
password = {{ slapparameter_dict['monitor-passwd'] }}