Commit c6bbfdd8 authored by Jérome Perrin's avatar Jérome Perrin

software/cloudooo: reorganise

 - merge software-common.cfg in software.cfg
 - use inline templates instead of a recipe for cloudooo.cfg
parent 6b33b82e
......@@ -18,7 +18,11 @@ md5sum = d1e4d7306c39f2ebc64d0407860d4301
[template-cloudooo-instance]
filename = instance-cloudooo.cfg.in
md5sum = 13759bf9720f0e7109fc35a8ad8a50a9
md5sum = 839b3952c045fca7c8363ad8d10885e9
[template-cloudooo-cfg]
filename = cloudooo.cfg.in
md5sum = e55a5dd239a8a107cbdadb0e4c086d07
[template-haproxy-cfg]
filename = haproxy.cfg.in
......
[app:main]
use = egg:cloudooo
#
## System config
#
debug_mode = True
# Folder where pid files, lock files and virtual frame buffer mappings
# are stored. In this folder is necessary create a folder tmp, because this
# folder is used to create all temporary documents.
working_path = {{ cloudooo['data-directory'] }}
# Folder where UNO library is installed
uno_path = {{ cloudooo['ooo-uno-path'] }}
# Folder where soffice.bin is installed
office_binary_path = {{ cloudooo['ooo-binary-path'] }}
#
## Monitor Settings
#
# Limit to use the Openoffice Instance. if pass of the limit, the instance is
# stopped and another is started.
limit_number_request = 100
# Interval to check the factory
monitor_interval = 10
timeout_response = 180
enable_memory_monitor = True
# Set the limit in MB
# e.g 1000 = 1 GB, 100 = 100 MB
limit_memory_used = 3000
#
## OOFactory Settings
#
# The pool consist of several OpenOffice.org instances
application_hostname = {{ cloudooo['ip'] }}
# OpenOffice Port
openoffice_port = {{ cloudooo['openoffice-port'] }}
# LD_LIBRARY_PATH and other environment variables
# passed to OpenOffice
{% for k, v in cloudooo_environment.items() %}
env-{{ k }} = {{ v }}
{%- endfor %}
#
# Mimetype Registry
# It is used to select the handler that will be used in conversion.
# Priority matters, first match take precedence on next lines.
mimetype_registry =
{{ cloudooo['mimetype-entry-addition'] }}
application/csv * ooo
application/emf * ooo
application/msword * ooo
application/octet* * ooo
application/ogg * ffmpeg
application/ogv * ffmpeg
application/pdf text/* pdf
application/pdf * ooo
application/postscript * ooo
application/vnd.oasis.opendocument.presentation application/x-asc-presentation x2t
application/vnd.oasis.opendocument.spreadsheet application/x-asc-spreadsheet x2t
application/vnd.oasis.opendocument.text application/x-asc-text x2t
application/vnd.oasis.opendocument* * ooo
application/vnd.openxmlformats-officedocument.presentationml.presentation application/x-asc-presentation x2t
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet application/x-asc-spreadsheet x2t
application/vnd.openxmlformats-officedocument.wordprocessingml.document application/x-asc-text x2t
application/vnd.sun.xml* * ooo
application/vnd* * ooo
application/wmf * ooo
application/x-asc-presentation application/vnd.oasis.opendocument.presentation x2t
application/x-asc-presentation application/vnd.openxmlformats-officedocument.presentationml.presentation x2t
application/x-asc-spreadsheet application/vnd.oasis.opendocument.spreadsheet x2t
application/x-asc-spreadsheet application/vnd.openxmlformats-officedocument.spreadsheetml.sheet x2t
application/x-asc-text application/vnd.oasis.opendocument.text x2t
application/x-asc-text application/vnd.openxmlformats-officedocument.wordprocessingml.document x2t
application/x-emf * ooo
application/x-openoffice-gdimetafile * ooo
application/x-shockwave-flash * ffmpeg
application/x-vnd* * ooo
application/zip * ooo
audio/* * ffmpeg
image/png image/jpeg imagemagick
image/png * ooo
image/* image/* imagemagick
text/* * ooo
video/* * ffmpeg
* application/vnd.oasis.opendocument* ooo
[server:main]
use = egg:PasteScript#wsgiutils
host = {{ cloudooo['ip'] }}
port = {{ cloudooo['port'] }}
......@@ -151,33 +151,56 @@ includes =
{{ include }}
{% endfor%}
[cloudooo-base]
recipe = slapos.cookbook:generic.cloudooo
[cloudooo-config-base]
recipe = slapos.recipe.template:jinja2
output = ${:configuration-file}
url = {{ parameter_dict['template-cloudooo-cfg'] }}
[cloudooo-config-parameters]
ip = {{ ipv4 }}
environment =
LD_LIBRARY_PATH = {{ parameter_dict['avahi'] }}/lib:{{ parameter_dict['cairo'] }}/lib:{{ parameter_dict['cups'] }}/lib:{{ parameter_dict['cups'] }}/lib64:{{ parameter_dict['dbus'] }}/lib:{{ parameter_dict['dbus-glib'] }}/lib:{{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['gcc'] }}/lib:{{ parameter_dict['gcc'] }}/lib64:{{ parameter_dict['glib'] }}/lib:{{ parameter_dict['glu'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['libexpat'] }}/lib:{{ parameter_dict['libffi'] }}/lib:{{ parameter_dict['libffi'] }}/lib64:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['mesa'] }}/lib:{{ parameter_dict['nss'] }}/lib:{{ parameter_dict['nspr'] }}/lib:{{ parameter_dict['pixman'] }}/lib:{{ parameter_dict['xdamage'] }}/lib:{{ parameter_dict['xfixes'] }}/lib:{{ parameter_dict['zlib'] }}/lib
FONTCONFIG_FILE = ${fontconfig-conf:output}
PATH = ${binary-link:target-directory}
LANG = C.UTF-8
mimetype_entry_addition =
mimetype-entry-addition =
{% for entry in mimetype_entry_addition.splitlines() -%}
{{ " " ~ entry.strip() }}
{% endfor -%}
# 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
[cloudooo-environment]
LD_LIBRARY_PATH = {{ parameter_dict['avahi'] }}/lib:{{ parameter_dict['cairo'] }}/lib:{{ parameter_dict['cups'] }}/lib:{{ parameter_dict['cups'] }}/lib64:{{ parameter_dict['dbus'] }}/lib:{{ parameter_dict['dbus-glib'] }}/lib:{{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['gcc'] }}/lib:{{ parameter_dict['gcc'] }}/lib64:{{ parameter_dict['glib'] }}/lib:{{ parameter_dict['glu'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['libexpat'] }}/lib:{{ parameter_dict['libffi'] }}/lib:{{ parameter_dict['libffi'] }}/lib64:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['mesa'] }}/lib:{{ parameter_dict['nss'] }}/lib:{{ parameter_dict['nspr'] }}/lib:{{ parameter_dict['pixman'] }}/lib:{{ parameter_dict['xdamage'] }}/lib:{{ parameter_dict['xfixes'] }}/lib:{{ parameter_dict['zlib'] }}/lib
FONTCONFIG_FILE = ${fontconfig-conf:output}
PATH = ${binary-link:target-directory}
LANG = C.UTF-8
{% for index in range(1, backend_count + 1) -%}
{% set name = 'cloudooo-' ~ index -%}
[{{ cloudooo(name) }}]
< = cloudooo-base
port = {{ next_port() }}
openoffice-port = {{ next_port() }}
<= cloudooo-config-base
configuration-file = ${directory:etc}/{{ name }}.cfg
context =
section cloudooo cloudoo-config-parameters-{{ index }}
section cloudooo_environment cloudooo-environment
ip = {{ '${cloudoo-config-parameters-' ~ index ~ ':ip}' }}
port = {{ '${cloudoo-config-parameters-' ~ index ~ ':port}' }}
service = {{ '${cloudoo-service-' ~ index ~ ':wrapper-path}' }}
[cloudoo-config-parameters-{{ index }}]
<= cloudooo-config-parameters
data-directory = ${directory:srv}/{{ name }}
wrapper = ${directory:services}/{{ name }}
port = {{ next_port() }}
openoffice-port = {{ next_port() }}
[cloudoo-bin-{{ index }}]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/{{ name }}
command-line = {{ bin_directory }}/cloudooo_paster serve ${:configuration-file}
configuration-file = {{ '${' ~ name ~ ':configuration-file}'}}
[cloudoo-service-{{ index }}]
recipe = slapos.cookbook:signalwrapper
wrapper-path = ${directory:services}/{{ name }}
wrapped-path = {{ '${cloudoo-bin-' ~ index ~ ':wrapper-path}' }}
{% endfor -%}
......@@ -212,7 +235,7 @@ prepend-path = ${buildout:bin-directory}
run-unit-test = ${buildout:bin-directory}/runUnitTest
run-test-suite = ${buildout:bin-directory}/runTestSuite
ooo-paster = ${cloudooo-1:ooo-paster}
ooo-paster = {{ bin_directory }}/cloudooo_paster
configuration-file = ${cloudooo-1:configuration-file}
run-unit-test-binary = {{ bin_directory }}/runCloudoooUnitTest
......
[buildout]
extends =
buildout.hash.cfg
../../stack/cloudooo.cfg
../../stack/logrotate/buildout.cfg
../../stack/monitor/buildout.cfg
../../component/defaults.cfg
parts =
${cloudooo-buildout:parts}
[cloudooo-buildout]
parts =
${stack-cloudooo-buildout:parts}
# Local development
cloudooo-develop
slapos-cookbook
[slap-parameters]
recipe = slapos.cookbook:slapconfiguration
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}
[template-cloudooo]
< = template-cloudooo-base
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
[template-cloudooo-base]
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key template_cloudooo_instance template-cloudooo-instance:target
section dynamic_template_cloudooo_instance_parameter_dict dynamic-template-cloudooo-instance-parameter-dict
section cloudooo_parameter_dict cloudooo-software-parameter-dict
[dynamic-template-cloudooo-instance-parameter-dict]
apache = ${apache:location}
avahi = ${avahi:location}
buildout-bin-directory = ${buildout:bin-directory}
cairo = ${cairo:location}
coreutils = ${coreutils:location}
cups = ${cups:location}
dash = ${dash:location}
dbus = ${dbus:location}
dbus-glib = ${dbus-glib:location}
file = ${file:location}
fontconfig = ${fontconfig:location}
template-fonts-conf = ${template-fonts-conf:output}
fonts =
${android-fonts:location}
${ipa-fonts:location}
${ipaex-fonts:location}
${liberation-fonts:location}
${ocrb-fonts:location}
${dejavu-fonts:location}
${libreoffice-bin:location}/share/fonts/
fontconfig-includes =
${fontconfig:location}/etc/fonts/conf.d
freetype = ${freetype:location}
gcc = ${gcc:prefix}
glib = ${glib:location}
glu = ${glu:location}
haproxy = ${haproxy:location}
imagemagick = ${imagemagick:location}
libICE = ${libICE:location}
libSM = ${libSM:location}
libX11 = ${libX11:location}
libXau = ${libXau:location}
libXdmcp = ${libXdmcp:location}
libXext = ${libXext:location}
libXrender = ${libXrender:location}
libexpat = ${libexpat:location}
libffi = ${libffi:location}
libpng12 = ${libpng12:location}
libreoffice-bin = ${libreoffice-bin:location}
libxcb = ${libxcb:location}
mesa = ${mesa:location}
nss = ${nss:location}
nspr = ${nspr:location}
openssl = ${openssl:location}
onlyoffice-core = ${onlyoffice-core:location}
poppler = ${poppler:location}
pixman = ${pixman:location}
wkhtmltopdf = ${wkhtmltopdf:location}
xdamage = ${xdamage:location}
xfixes = ${xfixes:location}
xserver = ${xserver:location}
zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target}
template-logrotate-base = ${template-logrotate-base:output}
template-monitor = ${monitor2-template:output}
template-haproxy-cfg = ${template-haproxy-cfg:target}
[template-cloudooo-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[template-haproxy-cfg]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[versions]
argparse = 1.4.0
pypdf = 3.16.4:whl
[buildout]
extends =
software-common.cfg
buildout.hash.cfg
../../stack/cloudooo.cfg
../../stack/logrotate/buildout.cfg
../../stack/monitor/buildout.cfg
../../component/defaults.cfg
parts =
${cloudooo-buildout:parts}
${stack-cloudooo-buildout:parts}
# Local development
cloudooo-develop
slapos-cookbook
template-cloudooo
[template-cloudooo]
< = template-cloudooo-base
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
[template-cloudooo-base]
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key template_cloudooo_instance template-cloudooo-instance:target
section dynamic_template_cloudooo_instance_parameter_dict dynamic-template-cloudooo-instance-parameter-dict
section cloudooo_parameter_dict cloudooo-software-parameter-dict
[dynamic-template-cloudooo-instance-parameter-dict]
apache = ${apache:location}
avahi = ${avahi:location}
buildout-bin-directory = ${buildout:bin-directory}
cairo = ${cairo:location}
coreutils = ${coreutils:location}
cups = ${cups:location}
dash = ${dash:location}
dbus = ${dbus:location}
dbus-glib = ${dbus-glib:location}
file = ${file:location}
fontconfig = ${fontconfig:location}
template-fonts-conf = ${template-fonts-conf:output}
fonts =
${android-fonts:location}
${ipa-fonts:location}
${ipaex-fonts:location}
${liberation-fonts:location}
${ocrb-fonts:location}
${dejavu-fonts:location}
${libreoffice-bin:location}/share/fonts/
fontconfig-includes =
${fontconfig:location}/etc/fonts/conf.d
freetype = ${freetype:location}
gcc = ${gcc:prefix}
glib = ${glib:location}
glu = ${glu:location}
haproxy = ${haproxy:location}
imagemagick = ${imagemagick:location}
libICE = ${libICE:location}
libSM = ${libSM:location}
libX11 = ${libX11:location}
libXau = ${libXau:location}
libXdmcp = ${libXdmcp:location}
libXext = ${libXext:location}
libXrender = ${libXrender:location}
libexpat = ${libexpat:location}
libffi = ${libffi:location}
libpng12 = ${libpng12:location}
libreoffice-bin = ${libreoffice-bin:location}
libxcb = ${libxcb:location}
mesa = ${mesa:location}
nss = ${nss:location}
nspr = ${nspr:location}
openssl = ${openssl:location}
onlyoffice-core = ${onlyoffice-core:location}
poppler = ${poppler:location}
pixman = ${pixman:location}
wkhtmltopdf = ${wkhtmltopdf:location}
xdamage = ${xdamage:location}
xfixes = ${xfixes:location}
xserver = ${xserver:location}
zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target}
template-cloudooo-cfg = ${template-cloudooo-cfg:target}
template-logrotate-base = ${template-logrotate-base:output}
template-monitor = ${monitor2-template:output}
template-haproxy-cfg = ${template-haproxy-cfg:target}
[template-cloudooo-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[template-cloudooo-cfg]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[template-haproxy-cfg]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[cloudooo-software-parameter-dict]
publish-url-name = cloudooo
port-parameter-name = tcpv4-port
......@@ -20,3 +115,7 @@ ssl-dict-parameter-name = ssl
mimetype-entry-addition-parameter-name = mimetype-entry-addition
#mimetype-entry-addition =
# text/html application/pdf wkhtmltopdf
[versions]
argparse = 1.4.0
pypdf = 3.16.4:whl
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment