Expose software type separately from partition parameters.
[slapos.git] / software / erp5 / instance-cloudoo.cfg.in
1 {% if software_type == slap_software_type -%}
2 {% set json = json_module.loads(parameter_dict.get('cloudooo-json', '{}')) -%}
3 {% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
4 [buildout]
5 parts =
6   publish-cloudooo-connection-information
7   cloudooo-instance
8 eggs-directory = {{ eggs_directory }}
9 develop-eggs-directory = {{ develop_eggs_directory }}
10 offline = true
11
12 [publish-cloudooo-connection-information]
13 recipe = slapos.cookbook:publishurl
14 url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/
15
16 [cloudooo-instance]
17 recipe = slapos.cookbook:generic.cloudooo
18
19 # Network options
20 ip = ${slap-network-information:local-ipv4}
21 port = 23000
22 openoffice-port = 23060
23
24 # Paths
25 configuration-file = ${rootdirectory:etc}/cloudooo.cfg
26 wrapper = ${basedirectory:services}/cloudooo
27
28 # Paths: Data
29 data-directory = ${directory:cloudooo-data}
30
31 environment =
32   LD_LIBRARY_PATH = {{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['zlib'] }}/lib
33   FONTCONFIG_FILE = ${fontconfig-instance:conf-path}
34
35 # Binary information
36 # cloudooo specific configuration
37 ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program
38 ooo-paster = {{ bin_directory }}/cloudooo_paster
39 ooo-uno-path = {{ parameter_dict['libreoffice-bin'] }}/basis-link/program
40
41 [fontconfig-instance]
42 recipe = slapos.cookbook:fontconfig
43 conf-path = ${rootdirectory:etc}/font.conf
44 font-system-folder = {{ parameter_dict['fonts'] }}
45 font-folder = ${directory:font}
46 url-list = {{ json.get('font_url_list', []) | join(' ') }}
47 service-folder = ${basedirectory:services}
48 onetimedownload_path = {{ bin_directory }}/onetimedownload
49
50 # rest of parts are candidates for some generic stuff
51 [basedirectory]
52 recipe = slapos.cookbook:mkdirectory
53 services = ${rootdirectory:etc}/run
54
55 [directory]
56 recipe = slapos.cookbook:mkdirectory
57 cloudooo-data = ${rootdirectory:srv}/cloudooo
58 font = ${rootdirectory:srv}/font
59
60 [rootdirectory]
61 recipe = slapos.cookbook:mkdirectory
62 etc = ${buildout:directory}/etc
63 srv = ${buildout:directory}/srv
64 {% endif %}