[buildout] extends = # "slapos" stack describes basic things needed for 99.9% of SlapOS Software # Releases ../../stack/slapos.cfg ../../stack/monitor/buildout.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 # Logrotate service ../../component/dcron/buildout.cfg ../../component/logrotate/buildout.cfg ../../component/gzip/buildout.cfg parts = # Monitor parts monitor-eggs # 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 # Parts for cron and logrotate dcron logrotate # 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 # Template for default softwaretype [instance-default] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-default.cfg.in output = ${buildout:directory}/instance-default.cfg # Template for hello-world webservice softwaretype [instance-webservice] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-helloworld.cfg.in output = ${buildout:directory}/instance-helloworld.cfg # Dowloading helloweb service script in parts which would be later used in service [template-download] recipe = hexagonit.recipe.download url = ${:_profile_base_location_}/template/${:filename} location = ${buildout:parts-directory}/${:_buildout_section_name_} filename = rendered.in download-only = True mode = 0644 md5sum = 00686c63d981b0bdcfd22e9153f2590c # 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}