Merge branch 'master' into erp5-component
[slapos.git] / stack / 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   promise
9   promise-openoffice
10 eggs-directory = {{ eggs_directory }}
11 develop-eggs-directory = {{ develop_eggs_directory }}
12 offline = true
13
14 [publish-cloudooo-connection-information]
15 recipe = slapos.cookbook:publishurl
16 url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/
17
18 [cloudooo-instance]
19 recipe = slapos.cookbook:generic.cloudooo
20
21 # Network options
22 ip = ${slap-network-information:local-ipv4}
23 port = 23000
24 openoffice-port = 23060
25
26 # Paths
27 configuration-file = ${directory:etc}/cloudooo.cfg
28 wrapper = ${directory:service}/cloudooo
29
30 # Paths: Data
31 data-directory = ${directory:cloudooo-data}
32
33 environment =
34   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
35   FONTCONFIG_FILE = ${fontconfig-instance:conf-path}
36
37 # Binary information
38 # cloudooo specific configuration
39 ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program
40 ooo-paster = {{ bin_directory }}/cloudooo_paster
41 ooo-uno-path = {{ parameter_dict['libreoffice-bin'] }}/basis-link/program
42
43 [fontconfig-instance]
44 recipe = slapos.cookbook:fontconfig
45 conf-path = ${directory:etc}/font.conf
46 font-system-folder = {{ parameter_dict['fonts'] }}
47 font-folder = ${directory:font}
48 url-list = {{ json.get('font_url_list', []) | join(' ') }}
49 service-folder = ${directory:service}
50 onetimedownload_path = {{ bin_directory }}/onetimedownload
51
52 [promise]
53 recipe = slapos.cookbook:check_port_listening
54 path = ${directory:promise}/cloudooo
55 hostname = ${cloudooo-instance:ip}
56 port = ${cloudooo-instance:port}
57
58 [promise-openoffice]
59 recipe = slapos.cookbook:check_port_listening
60 path = ${directory:promise}/openoffice
61 hostname = ${cloudooo-instance:ip}
62 port = ${cloudooo-instance:openoffice-port}
63
64 # rest of parts are candidates for some generic stuff
65 [directory]
66 recipe = slapos.cookbook:mkdirectory
67 etc = ${buildout:directory}/etc
68 srv = ${buildout:directory}/srv
69 service = ${:etc}/run
70 promise = ${:etc}/promise
71 cloudooo-data = ${:srv}/cloudooo
72 font = ${:srv}/font
73 {% endif %}