[buildout]

extends =
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# Releases
  ../../stack/slapos.cfg
# Extend here component profiles, like openssl, apache, mariadb, curl...
# Or/and extend a stack (lamp, tomcat) that does most of the work for you
# In this example we don't need anything more than python which is provided by
# above stack/slapos.cfg
# ../../component/component1/buildout.cfg
# ../../component/component2/buildout.cfg

parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# in 99,9% of Slapos Software Releases)
  slapos-cookbook
# Call creation of instance.cfg file that will be called for deployment of
# instance
  instance-profile

# "build" python program (install + correct shebang for our python)
  hello-web-bin


# Download instance.cfg.in (buildout profile used to deployment of instance),
# replace all ${foo:bar} parameters by real values, and change $${foo:bar} to
# ${foo:bar}
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = 968bea0fc81dc604a874c53648b7d13f
mode = 0644


# install hello-web with correct python_executable
[hello-web-bin]
recipe = slapos.recipe.template:jinja2
filename = hello-web
md5sum = da4a93ff679d40c6682859476dcf4ce0
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${buildout:bin-directory}/${:filename}
mode = 0755
# XXX python_executable should be ${${buildout:python}:executable}
#     but buildout cannot support such indirection.
#
# in real-cases, python software is usually installed with zc.recipe.egg
# which cares about correctly specifiing python interpreter for
# entry-points automatically.
context =
    raw python_executable ${buildout:executable}