Commit f2dc2f7e authored by Tristan Cavelier's avatar Tristan Cavelier

cloudooo: make software extensible

parent d2ea6268
...@@ -25,59 +25,24 @@ context = ...@@ -25,59 +25,24 @@ context =
key slapparameter_dict slap-parameters:configuration key slapparameter_dict slap-parameters:configuration
${:extra-context} ${:extra-context}
[dynamic-template-cloudooo-parameters] [cloudooo-dynamic-template-parameter-dict]
apache = {{ apache_location }} {% for key, value in dynamic_template_cloudooo_instance_parameter_dict.items() -%}
buildout-bin-directory = {{ buildout_bin_directory }} {{ key }} = {{ dumps(value) }}
cairo = {{ cairo_location }} {% endfor -%}
coreutils = {{ coreutils_location }}
cups = {{ cups_location }}
dash = {{ dash_location }}
dbus = {{ dbus_location }}
dbus-glib = {{ dbus_glib_location }}
file = {{ file_location }}
fontconfig = {{ fontconfig_location }}
fonts = {{ fonts_location }}
freetype = {{ freetype_location }}
glib = {{ glib_location }}
glu = {{ glu_location }}
haproxy = {{ haproxy_location }}
imagemagick = {{ imagemagick_location }}
instance-parameter-dict = {{ dumps(cloudooo_parameter_dict) }} instance-parameter-dict = {{ dumps(cloudooo_parameter_dict) }}
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 }}
openssl = {{ openssl_location }}
poppler = {{ poppler_location }}
pixman = {{ pixman_location }}
template-apache-conf = {{ template_apache_conf }}
wkhtmltopdf = {{ wkhtmltopdf_location }}
xdamage = {{ xdamage_location }}
xfixes = {{ xfixes_location }}
xserver = {{ xserver_location }}
zlib = {{ zlib_location }}
[dynamic-template-cloudooo] [cloudooo-dynamic-template]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_cloudooo }} template = {{ template_cloudooo_instance }}
filename = instance-cloudoo.cfg filename = instance-cloudooo.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
section parameter_dict dynamic-template-cloudooo-parameters section parameter_dict cloudooo-dynamic-template-parameter-dict
key ipv4_set slap-parameters:ipv4 key ipv4_set slap-parameters:ipv4
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${dynamic-template-cloudooo:rendered} default = ${cloudooo-dynamic-template:rendered}
[slap-connection] [slap-connection]
# part to migrate to new - separated words # part to migrate to new - separated words
......
[buildout]
extends =
../../stack/cloudooo.cfg
[cloudooo-buildout]
parts =
# Local development
cloudooo-develop
slapos-cookbook-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
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 4543e62c41726ef074454252c4951ac8
mode = 640
[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}
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}
fonts = ${fonts:location}
freetype = ${freetype:location}
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}
openssl = ${openssl: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-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = d0e1fcdef8103cce227473b2a6fc33ca
mode = 640
[buildout]
extends =
software-common.cfg
parts +=
${cloudooo-buildout:parts}
template-cloudooo
[cloudooo-software-parameter-dict] [cloudooo-software-parameter-dict]
publish-url-name = cloudooo publish-url-name = cloudooo
port-parameter-name = tcpv4-port port-parameter-name = tcpv4-port
...@@ -12,95 +20,3 @@ ssl-dict-parameter-name = ssl ...@@ -12,95 +20,3 @@ ssl-dict-parameter-name = ssl
mimetype-entry-addition-parameter-name = mimetype-entry-addition mimetype-entry-addition-parameter-name = mimetype-entry-addition
mimetype-entry-addition = mimetype-entry-addition =
text/html application/pdf wkhtmltopdf text/html application/pdf wkhtmltopdf
[buildout]
extends =
../../stack/cloudooo.cfg
parts +=
# Local development
cloudooo-develop
slapos-cookbook-develop
slapos-cookbook
# Create instance template
template
[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-jinja2-base]
recipe = slapos.recipe.template:jinja2
mode = 640
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${buildout:directory}/${:filename}
# XXX: extra-context is needed because we cannot append to a key of an extended
# section.
extra-context =
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
section cloudooo_parameter_dict cloudooo-software-parameter-dict
${:extra-context}
[template]
< = template-jinja2-base
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 918c97636fa56768ac01eb20cee6b7bc
extra-context =
key apache_location apache:location
key buildout_bin_directory buildout:bin-directory
key coreutils_location coreutils:location
key cairo_location cairo:location
key cups_location cups:location
key dash_location dash:location
key dbus_glib_location dbus-glib:location
key dbus_location dbus:location
key dcron_location dcron:location
key file_location file:location
key fontconfig_location fontconfig:location
key fonts_location fonts:location
key freetype_location freetype:location
key git_location git:location
key glib_location glib:location
key glu_location glu:location
key haproxy_location haproxy:location
key imagemagick_location imagemagick:location
key libICE_location libICE:location
key libSM_location libSM:location
key libX11_location libX11:location
key libXau_location libXau:location
key libXdmcp_location libXdmcp:location
key libXext_location libXext:location
key libXrender_location libXrender:location
key libexpat_location libexpat:location
key libffi_location libffi:location
key libpng12_location libpng12:location
key libreoffice_bin_location libreoffice-bin:location
key libxcb_location libxcb:location
key mesa_location mesa:location
key openssl_location openssl:location
key pixman_location pixman:location
key poppler_location poppler:location
key template_cloudooo template-cloudooo:target
key template_apache_conf template-apache-backend-conf:target
key wkhtmltopdf_location wkhtmltopdf:location
key xdamage_location xdamage:location
key xfixes_location xfixes:location
key xserver_location xserver:location
key zlib_location zlib:location
[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = 7134b253ab5dfba520a31739fa611de6
mode = 640
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