instance-cloudoo.cfg.in 3.36 KB
Newer Older
1
{% if software_type == slap_software_type -%}
2 3
{% set json = json_module.loads(parameter_dict.get('cloudooo-json', '{}')) -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
4
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
5 6 7 8
[buildout]
parts =
  publish-cloudooo-connection-information
  cloudooo-instance
9 10
  promise
  promise-openoffice
11 12 13
{% if use_ipv6 -%}
  promise-tunnel
{% endif -%}
14 15 16 17 18
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true

[publish-cloudooo-connection-information]
19 20 21 22
recipe = slapos.cookbook:publish.serialised
{% if use_ipv6 -%}
url = cloudooo://[${ipv6toipv4:ipv6}]:${ipv6toipv4:ipv6-port}/
{% else -%}
23
url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/
24
{% endif -%}
25 26 27 28 29 30 31 32 33 34

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

# Network options
ip = ${slap-network-information:local-ipv4}
port = 23000
openoffice-port = 23060

# Paths
35 36
configuration-file = ${directory:etc}/cloudooo.cfg
wrapper = ${directory:service}/cloudooo
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

# Paths: Data
data-directory = ${directory:cloudooo-data}

environment =
  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
  FONTCONFIG_FILE = ${fontconfig-instance:conf-path}

# Binary information
# cloudooo specific configuration
ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program
ooo-paster = {{ bin_directory }}/cloudooo_paster
ooo-uno-path = {{ parameter_dict['libreoffice-bin'] }}/basis-link/program

[fontconfig-instance]
recipe = slapos.cookbook:fontconfig
53
conf-path = ${directory:etc}/font.conf
54 55 56
font-system-folder = {{ parameter_dict['fonts'] }}
font-folder = ${directory:font}
url-list = {{ json.get('font_url_list', []) | join(' ') }}
57
service-folder = ${directory:service}
58 59
onetimedownload_path = {{ bin_directory }}/onetimedownload

60 61 62 63 64
[promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/cloudooo
hostname = ${cloudooo-instance:ip}
port = ${cloudooo-instance:port}
65

66 67 68 69 70
[promise-openoffice]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/openoffice
hostname = ${cloudooo-instance:ip}
port = ${cloudooo-instance:openoffice-port}
71

72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
{% if use_ipv6 -%}
[promise-tunnel]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/tunnel
hostname = ${ipv6toipv4:ipv6}
port = ${ipv6toipv4:ipv6-port}

[ipv6toipv4]
recipe = slapos.cookbook:ipv6toipv4
runner-path = ${directory:service}/${:base-name}
6tunnel-path = {{ parameter_dict['6tunnel'] }}/bin/6tunnel
shell-path = {{ parameter_dict['dash'] }}/bin/dash
ipv4 = ${cloudooo-instance:ip}
ipv6 = {{ (ipv6_set | list)[0] }}
ipv6-port = ${cloudooo-instance:port}
ipv4-port = ${cloudooo-instance:port}
base-name = cloudooo-tunnel

{% endif -%}
91 92
# rest of parts are candidates for some generic stuff
[directory]
93 94 95
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
srv = ${buildout:directory}/srv
96 97 98 99
service = ${:etc}/run
promise = ${:etc}/promise
cloudooo-data = ${:srv}/cloudooo
font = ${:srv}/font
100
{% endif %}