[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
    ${: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 = 2ad39c607cfa80bf87dd6258c29754c3
extra-context =
    key buildout_bin_directory buildout:bin-directory
    key coreutils_location coreutils:location
    key cups_location cups: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 poppler_location poppler:location
    key template_cloudooo template-cloudooo:target
    key xdamage_location xdamage:location
    key xfixes_location xfixes:location
    key zlib_location zlib:location

[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = 4bede3be20dbc2ecfdb5d49b3184742e
mode = 640
