instance.cfg.in 7.96 KB
Newer Older
1
[buildout]
2 3
extends =
  {{ instance_common_cfg }}
4 5

[jinja2-template-base]
6
mode = 644
7

8
[default-dynamic-template-parameters]
9
bin-directory = {{ bin_directory }}
10
buildout-bin-directory = {{ buildout_bin_directory }}
11 12 13 14
check-computer-memory-binary = {{ bin_directory }}/check-computer-memory

[dynamic-template-postfix-parameters]
<= default-dynamic-template-parameters
15 16
cyrus-sasl-location = {{ cyrus_sasl_location }}
openssl = {{ openssl_location }}
17
postfix-location = {{ postfix_location }}
18
template-postfix-aliases = {{ template_postfix_aliases }}
19 20 21 22 23 24 25 26 27 28
template-postfix-main-cf = {{ template_postfix_main_cf }}
template-postfix-master-cf = {{ template_postfix_master_cf }}

[dynamic-template-postfix]
< = jinja2-template-base
template = {{ template_postfix }}
filename = instance-postfix.cfg
extensions = jinja2.ext.do
extra-context =
    section parameter_dict dynamic-template-postfix-parameters
29
    import urllib urllib
30

31
[dynamic-template-erp5-parameters]
32
default-cloudooo-url =  {{ dumps(default_cloudooo_url) }}
33
jupyter-enable-default = {{ jupyter_enable_default }}
34
wcfs-enable-default = {{ wcfs_enable_default }}
35
local-bt5-repository = {{ ' '.join(local_bt5_repository.split()) }}
36

37 38 39
[context]
root-common = {{ root_common }}
caucase-jinja2-library = {{ caucase_jinja2_library }}
40
template-zodb-base = {{ template_zodb_base }}
41

42
[dynamic-template-erp5]
43
<= jinja2-template-base
44 45
template = {{ template_erp5 }}
filename = instance-erp5.cfg
46
extra-context =
47
    key default_cloudooo_url dynamic-template-erp5-parameters:default-cloudooo-url
48
    key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default
49
    key wcfs_enable_default dynamic-template-erp5-parameters:wcfs-enable-default
50
    key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository
51
    key openssl_location :openssl-location
52
    import re re
53
    import urlparse urlparse
54
import-list =
55 56
    file root_common context:root-common
    file caucase context:caucase-jinja2-library
57

58 59
openssl-location = {{ openssl_location }}

60
[dynamic-template-balancer-parameters]
61
<= default-dynamic-template-parameters
62 63
openssl = {{ openssl_location }}
haproxy = {{ haproxy_location }}
64
rsyslogd = {{ rsyslogd_location }}
65
socat = {{ socat_location }}
66 67
apachedex-location = {{ bin_directory }}/apachedex
run-apachedex-location = {{ bin_directory }}/runApacheDex
68
promise-check-apachedex-result = {{ bin_directory }}/check-apachedex-result
69
template-haproxy-cfg = {{ template_haproxy_cfg }}
70 71 72
template-rsyslogd-cfg = {{ template_rsyslogd_cfg }}
# XXX: only used in software/slapos-master:
apache = {{ apache_location }}
73
template-apache-conf = {{ template_apache_conf }}
74 75

[dynamic-template-balancer]
76
<= jinja2-template-base
77 78 79 80
template = {{ template_balancer }}
filename = instance-balancer.cfg
extra-context =
    section parameter_dict dynamic-template-balancer-parameters
81
    import itertools itertools
82
    import hashlib hashlib
83 84
import-list =
    file caucase context:caucase-jinja2-library
85 86

[dynamic-template-zeo-parameters]
87
<= default-dynamic-template-parameters
88 89

[dynamic-template-zeo]
90
<= jinja2-template-base
91 92 93 94 95 96
template = {{ template_zeo }}
filename = instance-zeo.cfg
extra-context =
    key buildout_directory buildout:directory
    section parameter_dict dynamic-template-zeo-parameters
    import json_module json
97
    import itertools itertools
98

99
[dynamic-template-zope-parameters]
100
<= default-dynamic-template-parameters
101
zope-conf-template = {{ template_zope_conf }}
102
run-zelenium-template = {{ template_run_zelenium }}
103
6tunnel = {{ sixtunnel_location }}
104
coreutils = {{ coreutils_location }}
105 106
sqlbench_path = {{ mariadb_location }}/sql-bench
perl_dbd_mariadb_path = {{ perl_dbd_mariadb_path }}
107 108
dash = {{ dash_location }}
jsl = {{ jsl_location }}
109
link-binary = {{ dumps(zope_link_binary) }}
110 111 112
fonts = {{ dumps(zope_fonts) }}
fontconfig-includes = {{ dumps(zope_fontconfig_includes) }}
template-fonts-conf = {{ dumps(template_fonts_conf) }}
113
userhosts = {{ userhosts_location }}/lib/userhosts.so
114
site-zcml = {{ site_zcml }}
115
extra-path-list = {{ dumps(extra_path_list) }}
116
matplotlibrc = {{ matplotlibrc_location }}
117
erp5-location = {{ erp5_location }}
118
egg-interpreter = {{egg_interpreter}}
119

120
[dynamic-template-zope]
121
<= jinja2-template-base
122 123
template = {{ template_zope }}
filename = instance-zope.cfg
124 125
extra-context =
    key buildout_directory buildout:directory
126
    key root_common context:root-common
127
    section parameter_dict dynamic-template-zope-parameters
128
    import urlparse urlparse
129
    import hashlib hashlib
130
    import itertools itertools
131
    import json json
132 133
import-list =
    file instance_zodb_base context:template-zodb-base
134 135

[dynamic-template-kumofs-parameters]
136
<= default-dynamic-template-parameters
137 138 139 140 141 142 143
dash-location = {{ dash_location }}
dcron-location = {{ dcron_location }}
gzip-location = {{ gzip_location }}
kumo-location = {{ kumo_location }}
logrotate-location = {{ logrotate_location }}

[dynamic-template-kumofs]
144
<= jinja2-template-base
145 146 147 148 149 150
template = {{ template_kumofs }}
filename = instance-kumofs.cfg
extra-context =
    section parameter_dict dynamic-template-kumofs-parameters

[dynamic-template-mariadb-parameters]
151
<= default-dynamic-template-parameters
152
bash = {{ bash_location }}
153
coreutils-location = {{ coreutils_location }}
154
dash-location = {{ dash_location }}
155 156
findutils-location = {{ findutils_location }}
gzip-location = {{ gzip_location }}
157
xz-utils-location = {{ xz_utils_location }}
158 159 160
mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
161
template-mysqld-wrapper = {{ template_mysqld_wrapper }}
162
link-binary = {{ dumps(mariadb_link_binary) }}
163
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
164
mariadb-slow-query-report-script = {{ mariadb_slow_query_report_script }}
165
mariadb-start-clone-from-backup = {{ mariadb_start_clone_from_backup }}
166
promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-queries-digest-result
167
percona-tools-location = {{ percona_toolkit_location }}
168
unixodbc-location = {{ unixodbc_location }}
169
mroonga-mariadb-install-sql = {{ mroonga_mariadb_install_sql }}
170 171
mroonga-mariadb-plugin-dir = {{ mroonga_mariadb_plugin_dir }}
groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plugin_dir }}
172 173

[dynamic-template-mariadb]
174
<= jinja2-template-base
175 176 177 178
template = {{ template_mariadb }}
filename = instance-mariadb.cfg
extra-context =
    section parameter_dict dynamic-template-mariadb-parameters
179

180
# Keep a section for backward compatibility for removed types
181 182
# Once the section is removed, ghost instances will keep failing until
# garbage collection be implemented.
183
[dynamic-template-legacy]
184 185 186 187 188 189 190
recipe = collective.recipe.template
input = inline:[buildout]
  eggs-directory = ${buildout:eggs-directory}
  develop-eggs-directory = ${buildout:develop-eggs-directory}
  offline = true
  parts =

191
output = ${directory:directory/instance-legacy.cfg
192 193
mode = 644

194 195 196 197 198
# we need this value to be present in a section,
# for slapos.cookbook:switch-softwaretype to work
[dynamic-template-jupyter]
rendered = {{ template_jupyter_cfg }}

199 200 201 202 203 204 205 206 207
[dynamic-template-wcfs]
<= jinja2-template-base
template = {{ instance_wcfs_cfg_in }}
filename = instance_wcfs.cfg
extra-context =
    section parameter_dict dynamic-template-zope-parameters
import-list =
    file instance_zodb_base context:template-zodb-base

208
[switch-softwaretype]
209
recipe = slapos.cookbook:switch-softwaretype
210
override = {{ dumps(override_switch_softwaretype |default) }}
211

212
# Public software types
213
default = dynamic-template-erp5:rendered
Julien Muchembled's avatar
Julien Muchembled committed
214 215
# BBB
RootSoftwareInstance = ${:default}
216
# Internal software types
217
kumofs = dynamic-template-kumofs:rendered
218
caucase = dynamic-template-caucase:rendered
219 220
mariadb = dynamic-template-mariadb:rendered
balancer = dynamic-template-balancer:rendered
221
postfix = dynamic-template-postfix:rendered
222
zodb-zeo = dynamic-template-zeo:rendered
223
zodb-neo = neo:rendered
224
zope = dynamic-template-zope:rendered
225
jupyter = dynamic-template-jupyter:rendered
226
wcfs = dynamic-template-wcfs:rendered
227 228

# Keep cloudooo backward compatibility
229 230
cloudooo = dynamic-template-legacy:output
caucase = dynamic-template-legacy:output