instance.cfg.in 11.8 KB
Newer Older
1 2 3 4 5 6 7 8
[buildout]
parts =
  switch-softwaretype

eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true

9 10
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
11 12 13 14 15 16 17 18 19 20 21
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}

[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context =
context =
22 23
    key ipv4_set slap-configuration:ipv4
    key ipv6_set slap-configuration:ipv6
24 25
    key eggs_directory buildout:eggs-directory
    key develop_eggs_directory buildout:develop-eggs-directory
26 27 28
    key slap_software_type slap-configuration:slap-software-type
    key slapparameter_dict slap-configuration:configuration
    key computer_id slap-configuration:computer
29
    key root_instance_state slap-configuration:instance-state
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    ${:extra-context}

[dynamic-template-cloudooo-parameters]
file = {{ file_location }}
fontconfig = {{ fontconfig_location }}
freetype = {{ freetype_location }}
libICE = {{ libICE_location }}
libpng12 = {{ libpng12_location }}
libSM = {{ libSM_location }}
libX11 = {{ libX11_location }}
libXau = {{ libXau_location }}
libXdmcp = {{ libXdmcp_location }}
libXext = {{ libXext_location }}
libxcb = {{ libxcb_location }}
libXrender = {{ libXrender_location }}
zlib = {{ zlib_location }}
libreoffice-bin = {{ libreoffice_bin_location }}
fonts = {{ fonts_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
49 50
6tunnel = {{ sixtunnel_location }}
dash = {{ dash_location }}
51 52 53

[dynamic-template-cloudooo]
< = jinja2-template-base
54
template = {{ template_cloudooo }}
55 56 57 58 59 60
filename = instance-cloudoo.cfg
extra-context =
    section parameter_dict dynamic-template-cloudooo-parameters
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type cloudooo

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
[dynamic-template-varnish-parameters]
dash = {{ dash_location }}
dcron = {{ dcron_location }}
gzip =  {{ gzip_location }}
logrotate = {{ logrotate_location }}
varnish = {{ varnish_location }}
wget = {{ wget_location }}
buildout-bin-directory = {{ buildout_bin_directory }}

[dynamic-template-varnish]
< = jinja2-template-base
template = {{ template_varnish }}
filename = instance-varnish.cfg
extra-context =
    section parameter_dict dynamic-template-varnish-parameters
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type varnish

79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
[dynamic-template-zope-parameters]
apache = {{ apache_location }}
aspell = {{ aspell_location }}
bin-directory = {{ bin_directory }}
coreutils = {{ coreutils_location }}
dcron = {{ dcron_location }}
dmtx-utils = {{ dmtx_utils_location }}
erp5 = {{ erp5_location }}
git = {{ git_location }}
graphviz = {{ graphviz_location }}
grep = {{ grep_location }}
gzip = {{ gzip_location }}
imagemagick = {{ imagemagick_location }}
librsvg = {{ librsvg_location }}
logrotate = {{ logrotate_location }}
mariadb = {{ mariadb_location }}
openssl = {{ openssl_location }}
poppler = {{ poppler_location }}
sed = {{ sed_location }}
tesseract = {{ tesseract_location }}
w3m = {{ w3m_location }}
100
jsl = {{ jsl_location }}
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129

[dynamic-template-zope]
< = jinja2-template-base
template = {{ template_zope }}
filename = instance-zope.cfg
extensions = jinja2.ext.do
# XXX: duplicates above section, so less is modified in template in this
# commit. Should be replaced by a single "section" line.
extra-context =
    key apache_location dynamic-template-zope-parameters:apache
    key aspell_location dynamic-template-zope-parameters:aspell
    key bin_directory dynamic-template-zope-parameters:bin-directory
    key coreutils_location dynamic-template-zope-parameters:coreutils
    key dcron_location dynamic-template-zope-parameters:dcron
    key dmtx_utils_location dynamic-template-zope-parameters:dmtx-utils
    key erp5_location dynamic-template-zope-parameters:erp5
    key git_location dynamic-template-zope-parameters:git
    key graphviz_location dynamic-template-zope-parameters:graphviz
    key grep_location dynamic-template-zope-parameters:grep
    key gzip_location dynamic-template-zope-parameters:gzip
    key imagemagick_location dynamic-template-zope-parameters:imagemagick
    key librsvg_location dynamic-template-zope-parameters:librsvg
    key logrotate_location dynamic-template-zope-parameters:logrotate
    key mariadb_location dynamic-template-zope-parameters:mariadb
    key openssl_location dynamic-template-zope-parameters:openssl
    key poppler_location dynamic-template-zope-parameters:poppler
    key sed_location dynamic-template-zope-parameters:sed
    key tesseract_location dynamic-template-zope-parameters:tesseract
    key w3m_location dynamic-template-zope-parameters:w3m
130
    key jsl_location dynamic-template-zope-parameters:jsl
131

132
[template-erp5-single-parameters]
133 134
bin-directory = {{ bin_directory }}
openssl = {{ openssl_location }}
135
local_bt5_repository = {{ local_bt5_repository  }}
136 137
dash = {{ dash_location }}
curl = {{ curl_location }}
138

139
[template-erp5-single]
140
< = jinja2-template-base
141 142
template = {{ template_erp5_single }}
filename = instance-erp5-single.cfg
143 144 145 146
# XXX: duplicates above section, so less is modified in template in this
# commit. Should be replaced by a "section" line (preserving template_zope
# definition).
extra-context =
147 148 149 150
    key bin_directory template-erp5-single-parameters:bin-directory
    key openssl_location template-erp5-single-parameters:openssl
    key curl_location template-erp5-single-parameters:curl
    key dash_location template-erp5-single-parameters:dash
151
    key template_zope dynamic-template-zope:rendered
152
    key local_bt5_repository template-erp5-single-parameters:local_bt5_repository
153

154
[dynamic-template-cluster-erp5-parameters]
155 156
local-bt5-repository = {{ local_bt5_repository }}

157
[dynamic-template-cluster-erp5]
158 159
< = jinja2-template-base
template = {{ template_erp5_cluster }}
160 161 162 163 164 165 166
filename = instance-cluster-erp5.cfg
extensions = jinja2.ext.do
extra-context =
    key local_bt5_repository dynamic-template-cluster-erp5-parameters:local-bt5-repository
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type cluster

Benjamin Blanc's avatar
UP  
Benjamin Blanc committed
167 168 169 170 171 172
[dynamic-template-scalability]
< = jinja2-template-base
template = {{ template_scalability }}
filename = instance-scalability.cfg
extensions = jinja2.ext.do
extra-context =
Benjamin Blanc's avatar
Benjamin Blanc committed
173
    key local_bt5_repository dynamic-template-cluster-erp5-parameters:local-bt5-repository
Benjamin Blanc's avatar
UP  
Benjamin Blanc committed
174 175 176
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type scalability

177 178 179 180 181 182 183 184 185 186 187 188 189 190
[dynamic-template-balancer-parameters]
apache = {{ apache_location }}
openssl = {{ openssl_location }}
haproxy = {{ haproxy_location }}
instance-logrotate-cfg = {{ template_logrotate_base }}
bin-directory = {{ bin_directory }}
6tunnel = {{ sixtunnel_location }}
dash = {{ dash_location }}

[dynamic-template-balancer]
< = jinja2-template-base
template = {{ template_balancer }}
extensions = jinja2.ext.do
filename = instance-balancer.cfg
191
extra-context =
192
    section parameter_dict dynamic-template-balancer-parameters
193
# Must match the key id in [switch-softwaretype] which uses this section.
194 195 196 197 198 199 200
    raw software_type balancer

[dynamic-template-zeo-parameters]
buildout-bin-directory = {{ buildout_bin_directory }}
instance-logrotate-cfg = {{ template_logrotate_base }}
6tunnel = {{ sixtunnel_location }}
dash = {{ dash_location }}
201

202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
[dynamic-template-zeo]
< = jinja2-template-base
template = {{ template_zeo }}
filename = instance-zeo.cfg
extensions = jinja2.ext.do
extra-context =
    key buildout_directory buildout:directory
    section parameter_dict dynamic-template-zeo-parameters
    import json_module json
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type zodb-zeo

[dynamic-template-cluster-zope-parameters]
zope-conf-template = {{ template_zope_conf }}
instance-logrotate-cfg = {{ template_logrotate_base }}
git = {{ git_location }}
graphviz = {{ graphviz_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
coreutils = {{ coreutils_location }}
grep = {{ grep_location }}
imagemagick = {{ imagemagick_location }}
sed = {{ sed_location }}
tesseract = {{ tesseract_location }}
w3m = {{ w3m_location }}
poppler = {{ poppler_location }}
dmtx-utils = {{ dmtx_utils_location }}
openssl = {{ openssl_location }}
6tunnel = {{ sixtunnel_location }}
dash = {{ dash_location }}
jsl = {{ jsl_location }}

[dynamic-template-cluster-zope]
< = jinja2-template-base
template = {{ template_cluster_zope }}
filename = instance-cluster-zope.cfg
extensions = jinja2.ext.do
extra-context =
    key buildout_directory buildout:directory
    section parameter_dict dynamic-template-cluster-zope-parameters
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type cluster-zope

Benjamin Blanc's avatar
Benjamin Blanc committed
244 245 246 247 248 249 250 251
[dynamic-template-scalability]
< = jinja2-template-base
template = {{ template_scalability }}
filename = instance-scalability.cfg
extensions = jinja2.ext.do
bin_directory = {{ bin_directory }}
extra-context =
    key bin_directory dynamic-template-scalability:bin_directory
252 253
    key curl_location template-erp5-single-parameters:curl
    key dash_location template-erp5-single-parameters:dash
Benjamin Blanc's avatar
Benjamin Blanc committed
254
    key local_bt5_repository dynamic-template-cluster-erp5-parameters:local-bt5-repository
Benjamin Blanc's avatar
Benjamin Blanc committed
255
    key template_zope dynamic-template-zope:rendered
256 257
    key template_cluster_zope dynamic-template-cluster-zope:rendered
    key template_erp5_cluster dynamic-template-cluster-erp5:rendered
Benjamin Blanc's avatar
Benjamin Blanc committed
258 259 260
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type scalability

261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
[dynamic-template-kumofs-parameters]
dash-location = {{ dash_location }}
dcron-location = {{ dcron_location }}
gzip-location = {{ gzip_location }}
kumo-location = {{ kumo_location }}
logrotate-location = {{ logrotate_location }}

[dynamic-template-kumofs]
< = jinja2-template-base
template = {{ template_kumofs }}
filename = instance-kumofs.cfg
extra-context =
    section parameter_dict dynamic-template-kumofs-parameters
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type kumofs

[dynamic-template-mariadb-parameters]
coreutils-location = {{ coreutils_location }}
dcron-location = {{ dcron_location }}
findutils-location = {{ findutils_location }}
gettext-location = {{ gettext_location }}
grep-location = {{ grep_location }}
gzip-location = {{ gzip_location }}
logrotate-location = {{ logrotate_location }}
mariadb-location = {{ mariadb_location }}
perl-location = {{ perl_location }}
perl-siteprefix = {{ perl_siteprefix }}
sed-location = {{ sed_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}

[dynamic-template-mariadb]
< = jinja2-template-base
template = {{ template_mariadb }}
filename = instance-mariadb.cfg
extensions = jinja2.ext.do
extra-context =
    section parameter_dict dynamic-template-mariadb-parameters
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type mariadb
301

302 303
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
304
default = ${template-erp5-single:rendered}
305
cluster = ${dynamic-template-cluster-erp5:rendered}
Benjamin Blanc's avatar
UP  
Benjamin Blanc committed
306
scalability = ${dynamic-template-scalability:rendered}
307
kumofs = ${dynamic-template-kumofs:rendered}
308
cloudooo = ${dynamic-template-cloudooo:rendered}
309
zope = ${dynamic-template-zope:rendered}
310
mariadb = ${dynamic-template-mariadb:rendered}
311
varnish = ${dynamic-template-varnish:rendered}
312 313 314
balancer = ${dynamic-template-balancer:rendered}
zodb-zeo = ${dynamic-template-zeo:rendered}
cluster-zope = ${dynamic-template-cluster-zope:rendered}
315 316 317 318 319 320 321 322 323

[slap-connection]
# part to migrate to new - separated words
computer-id = ${slap_connection:computer_id}
partition-id = ${slap_connection:partition_id}
server-url = ${slap_connection:server_url}
software-release-url = ${slap_connection:software_release_url}
key-file = ${slap_connection:key_file}
cert-file = ${slap_connection:cert_file}