diff --git a/.gitignore b/.gitignore
index 5ca1dfd34a438111bd8e2cb5bcd305b9bd5f9d84..4cb18e24e075140cc2de739754d1e59856fb780d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ downloads/
 eggs/
 parts/
 slapos.cookbook.egg-info
+.*.swp
diff --git a/CHANGES.txt b/CHANGES.txt
index 6df8869baae019b51d8769cd70091c27c473c808..b25752d6d773c5dd704a84e9164d3d2191f850b6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,7 +1,25 @@
 Changes
 =======
 
-0.30 (unreleased)
+0.32 (Unreleased)
+-----------------
+
+  * No change yet.
+
+0.31 (2011-10-06)
+-----------------
+
+ * Split big redundant recipes into small ones. In order to factorize the code
+   and have everything in the buildout file. [Antoine Catton, Romain Courteaud,
+   艁ukasz Nowak]
+ * LAMP : Update apache and php configuration files to work with a lot of different
+   PHP software. [Alain Takoudjou Kamdem]
+ * LAMP : Recipe can launch scripts, move or remove files or directories
+   when a given condition is filled. Useful when PHP apps require you to
+   remove "admin" directory after configuration for example.
+   [Alain Takoudjou Kamdem]
+
+0.30 (2011-10-06)
 -----------------
 
  * LAMP : Update apache and php configuration files to work with a lot of different
diff --git a/component/apache-php/buildout.cfg b/component/apache-php/buildout.cfg
index 1dd19fbcc8cbaa466c5aef09f139aef06533be01..71ea1daa372e2eb23dec0e51d0c22c3a006b7624 100644
--- a/component/apache-php/buildout.cfg
+++ b/component/apache-php/buildout.cfg
@@ -3,49 +3,57 @@ parts = apache-php
 
 extends = 
   ../apache/buildout.cfg
-  ../mariadb/buildout.cfg
+  ../cclient/buildout.cfg
+  ../curl/buildout.cfg  
+  ../freetype/buildout.cfg
+  ../gettext/buildout.cfg
+  ../libiconv/buildout.cfg
+  ../libjpeg/buildout.cfg
+  ../libpng/buildout.cfg
   ../libtool/buildout.cfg
+  ../mariadb/buildout.cfg
+  ../openldap/buildout.cfg
+  ../pkgconfig/buildout.cfg
+  ../zip/buildout.cfg
 
 [apache-php]
 # Note: Shall react on each build of apache and reinstall itself
 recipe = hexagonit.recipe.cmmi
-url = http://fr2.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
-md5sum = 2286f5a82a6e8397955a0025c1c2ad98
+url = http://fr2.php.net/distributions/php-5.3.8.tar.gz
+md5sum = f4ce40d5d156ca66a996dbb8a0e7666a
 configure-options =
   --with-apxs2=${apache:location}/bin/apxs
   --with-libxml-dir=${libxml2:location}
   --with-mysql=${mariadb:location}
   --with-zlib-dir=${zlib:location}
   --with-mcrypt=${libmcrypt:location}
-  --enable-libxml
-  --enable-mbstring
-  --enable-session
-
-environment =
-  PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
-  PATH=${libxml2:location}/bin:%(PATH)s
-  LDFLAGS =-L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/lib
-
-[apache-php-xmlrpc-gd]
-# Note: Shall react on each build of apache and reinstall itself
-recipe = hexagonit.recipe.cmmi
-url = http://fr2.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
-md5sum = 2286f5a82a6e8397955a0025c1c2ad98
-configure-options =
-  --with-apxs2=${apache:location}/bin/apxs
-  --with-libxml-dir=${libxml2:location}
   --with-gd
-  --with-zlib-dir=${zlib:location}
-  --with-mcrypt=${libmcrypt:location}
-  --with-xmlrpc=${xml-rpc:location}
+  --with-jpeg-dir=${libjpeg:location}
+  --with-png-dir=${libpng:location}
+  --enable-gd-native-ttf
+  --with-ttf
+  --with-freetype-dir=${freetype:location}
+  --with-pdo-mysql=mysqlnd
+  --with-mysqli=mysqlnd
+  --with-curl=${curl:location}
+  --with-zip-dir=${zip:location}
+  --with-imap=${cclient:location}  
+  --with-iconv-dir=${libiconv:location}
+  --with-gettext=${gettext:location}
+  --with-ldap=${openldap:location}
+  --with-imap-ssl
+  --with-openssl=${openssl:location}
+  --enable-libxml
   --enable-mbstring
   --enable-session
-  --disable-all
+  --enable-exif
+  --enable-zip
+  --enable-ftp
 
 environment =
-  PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
-  PATH=${libxml2:location}/bin:%(PATH)s
-  LDFLAGS =-L${xml-rpc:location}/lib -Wl,-rpath -Wl,${xml-rpc:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/lib
+  PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
+  PATH=${pkgconfig:location}/bin:${libxml2:location}/bin:%(PATH)s
+  LDFLAGS =-L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/libblkid
 
 
 [libmcrypt]
diff --git a/component/cclient/buildout.cfg b/component/cclient/buildout.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..a8095323436aa2915cd2536a3f0dcd3689149a9b
--- /dev/null
+++ b/component/cclient/buildout.cfg
@@ -0,0 +1,40 @@
+# libc-client - UW IMAP server
+# ftp://ftp.cac.washington.edu/imap/
+
+[buildout]
+extends =
+  ../openssl/buildout.cfg
+
+parts =
+  cclient-patch
+  cclient
+
+[cclient-patch]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/imap-2007f.patch
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+filename = imap-2007f.patch
+
+[cclient]
+recipe = hexagonit.recipe.cmmi
+url = ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
+configure-command = true
+keep-compile-dir = true
+# cclient does not support parallel compilation
+make-options = 
+  slx
+  SSLTYPE=unix
+  SSLDIR=${openssl:location}
+  SSLCRYPTO=-lcrypto
+  IP=6
+  SSLLIB=${openssl:location}/lib
+  EXTRACFLAGS=-fPIC
+  CCLIENT=${buildout:parts-directory}
+  -j1
+
+patches = 
+  ${cclient-patch:location}/${cclient-patch:filename}
+
+patch-options = -p1
diff --git a/component/cclient/imap-2007f.patch b/component/cclient/imap-2007f.patch
new file mode 100644
index 0000000000000000000000000000000000000000..50b64970cdb305698f305ab9bf83a9741b66023c
--- /dev/null
+++ b/component/cclient/imap-2007f.patch
@@ -0,0 +1,32 @@
+--- old/Makefile	2011-09-22 13:19:53.000000000 +0100
++++ new/Makefile	2011-09-23 11:29:12.405271442 +0100
+@@ -580,7 +580,6 @@
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 	@echo
+ 	@echo Do you want to continue this build anyway?  Type y or n please:
+-	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
+ 
+ nounenc:
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+@@ -639,7 +638,7 @@
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 	@echo
+ 	@echo Do you want to build with IPv6 anyway?  Type y or n please:
+-	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make noip6;exit 1);; esac'
++	#@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make noip6;exit 1);; esac'
+ 	@echo OK, I will remember that you really want to build with IPv6.
+ 	@echo You will not see this message again.
+ 	@$(TOUCH) ip6
+@@ -731,6 +730,12 @@
+ 	$(SH) -c '$(RM) an ua OSTYPE SPECIALS c-client mtest imapd ipopd mailutil mlock dmail tmail || true'
+ 	$(CD) tools;$(MAKE) clean
+ 
++install:
++	install -v -d $(CCLIENT)/cclient/include
++	ln -svf $(CCLIENT)/cclient__compile__/imap-2007f/c-client $(CCLIENT)/cclient/include
++	install -v -d $(CCLIENT)/cclient/lib
++	ln -svf $(CCLIENT)/cclient__compile__/imap-2007f/c-client/c-client.a $(CCLIENT)/cclient/lib/libc-client.a
++
+ 
+ # A monument to a hack of long ago and far away...
+ love:
diff --git a/component/imagemagick/buildout.cfg b/component/imagemagick/buildout.cfg
index a54d5a37b934beacb1c5c3bc221f338265d7e6af..216d2389dfdef7b923e854a9be3f5d5b0559e491 100644
--- a/component/imagemagick/buildout.cfg
+++ b/component/imagemagick/buildout.cfg
@@ -35,8 +35,8 @@ filename = imagemagick-6.6.7-4-without-lzma.patch
 
 [imagemagick]
 recipe = hexagonit.recipe.cmmi
-url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.9-10.tar.bz2
-md5sum = 985bd453c3e502f2771af5329c1cc384
+url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.2-10.tar.bz2
+md5sum = 073ec5d7f2a22db96a0e87e4322b75f9
 configure-options =
   --disable-static
   --without-x
diff --git a/component/libiconv/buildout.cfg b/component/libiconv/buildout.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..23364aea78d48e94685ed1e04e749f3f9fdcaa68
--- /dev/null
+++ b/component/libiconv/buildout.cfg
@@ -0,0 +1,8 @@
+[buildout]
+parts =
+  libiconv
+
+[libiconv]
+recipe = hexagonit.recipe.cmmi
+url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
+md5sum = e34509b1623cec449dfeb73d7ce9c6c6
diff --git a/setup.py b/setup.py
index cffa35a1c49cb01c98d09d9987f22f8468a505b8..f38885a1487ebfc6aa6b3501023766fb8d456bbd 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 import glob
 import os
 
-version = '0.30-dev'
+version = '0.32-dev'
 name = 'slapos.cookbook'
 long_description = open("README.txt").read() + "\n" + \
     open("CHANGES.txt").read() + "\n"
@@ -39,8 +39,13 @@ setup(name=name,
       zip_safe=True,
       entry_points={
         'zc.buildout': [
+          'certificate_authority = slapos.recipe.certificate_authority:Recipe',
+          'certificate_authority.request = slapos.recipe.certificate_authority:Request',
+          'cron = slapos.recipe.dcron:Recipe',
+          'cron.d = slapos.recipe.dcron:Part',
           'download = slapos.recipe.download:Recipe',
           'davstorage = slapos.recipe.davstorage:Recipe',
+          'duplicity = slapos.recipe.duplicity:Recipe',
           'erp5 = slapos.recipe.erp5:Recipe',
           'erp5testnode = slapos.recipe.erp5testnode:Recipe',
           'helloworld = slapos.recipe.helloworld:Recipe',
@@ -51,16 +56,24 @@ setup(name=name,
           'libcloudrequest = slapos.recipe.libcloudrequest:Recipe',
           'memcached = slapos.recipe.memcached:Recipe',
           'mysql = slapos.recipe.mysql:Recipe',
+          'mkdirectory = slapos.recipe.mkdirectory:Recipe',
           'nbdserver = slapos.recipe.nbdserver:Recipe',
           'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
           'lamp = slapos.recipe.lamp:Request',
           'lamp.request = slapos.recipe.lamp:Request',
           'lamp.static = slapos.recipe.lamp:Static',
           'lamp.simple = slapos.recipe.lamp:Simple',
+          'logrotate = slapos.recipe.logrotate:Recipe',
+          'logrotate.d = slapos.recipe.logrotate:Part',
+          'publishurl = slapos.recipe.publishurl:Recipe',
           'proactive = slapos.recipe.proactive:Recipe',
+          'request = slapos.recipe.request:Recipe',
           'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
+          'softwaretype = slapos.recipe.softwaretype:Recipe',
           'siptester = slapos.recipe.siptester:SipTesterRecipe',
+          'simplelogger = slapos.recipe.simplelogger:Recipe',
           'slaprunner = slapos.recipe.slaprunner:Recipe',
+          'stunnel = slapos.recipe.stunnel:Recipe',
           'testnode = slapos.recipe.testnode:Recipe',
           'vifib = slapos.recipe.vifib:Recipe',
           'xwiki = slapos.recipe.xwiki:Recipe',
diff --git a/slapos/recipe/README.lamp.txt b/slapos/recipe/README.lamp.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7a75a2033a3ed733ff5198bbce92e65b3fcb21ab
--- /dev/null
+++ b/slapos/recipe/README.lamp.txt
@@ -0,0 +1,104 @@
+lamp
+=====
+
+the lamp recipe help you to deploy simply a php based application on slapos. This recipe is 
+able to setup mariadb, apache and apache-php for your php application, is also capable to
+configure your software during installation to ensure a full compatibility.
+
+
+How to use?
+-----------
+
+just add this part in your software.cfg to use the lamp.simple module
+
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+you also need to extend lamp.cfg
+
+extends =
+  http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.50:/stack/lamp.cfg
+
+
+lamp.runner
+=====
+
+When you install some software (such as prestashop) you need to remove or rename folder, with slapos you can not 
+access to the www-data directory. to do this, you need to tell to lamp recipe to remove or/and it when software 
+will be instantiated. Some software requires more than rename or delete a folder (manualy create database etc...)
+in this case you need to write a python script and lamp recipe must run it when installing your software.
+
+
+
+How to use?
+-----------
+
+CONDITION
+--------
+the action (move, rename, launch script) only starts when the condition is filled.
+in instance.cfg, add 
+
+file_token = path_of_file
+
+and the action will begin when path_of_www-data/path_of_file will be created
+you can also use database to check condition. add 
+
+table_name = name_of_table
+constraint = sql_where_condition
+
+name_of_table is the full or partial name(in some cases we can not know the prefix used to create tables) of table
+into mariadb databse for example table_name = admin. if you use
+name_of_table = **, the action will begin when database is ready. 
+constraint is the sql_condition to use when search entry into name_of_table for example constraint = `admin_id`=1
+
+you can no use file_token and table_name at the same time, otherwise file_token will be used in priority. attention 
+to the conditions that will never be satisfied.
+
+
+
+ACTION
+-------
+the action start when condition is true
+1- delete file or folder
+into instance.cfg, use 
+
+delete = file_or_folder1, file_or_folder2, file_or_folder3 ...
+
+for example delete = admin 
+
+2- rename file or folder
+into instance.cfg, use 
+
+rename = old_name1 => new_name1, old_name2 => new_name2, ... you can also use
+
+rename = old_name1, old_name2 => new_name2, ... in this case old_name1 will be rename and the new name will be chose
+by joining old_name1 and mysql_user: this should give 
+rename = old_name1 => old_name1-mysql_user, old_name2 => new_name2, ...
+
+3- launch python script
+
+use script = ${configure-script:location}/${configure-script:filename} into instance.cfg, add part configure-script
+into software.cfg
+
+parts = configure-script
+
+[configure-script]
+recipe = hexagonit.recipe.download
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+url = url_of_script_name.py
+filename = script_name.py
+download-only = True
+
+the script_name.py should contain a main module, sys.argv is passed to the main. you can write script_name.py like this
+....
+def setup(args):
+    base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args
+    .......
+
+if __name__ == '__main__':
+    setup(sys.argv[1:])
+
+base_url: is the url of php software
+htdocs: is the path of www-data directory
+mysql_user, mysql_password, mysql_database, mysql_host: is the mariadb parameters
diff --git a/slapos/recipe/README.mkdirectory.txt b/slapos/recipe/README.mkdirectory.txt
new file mode 100644
index 0000000000000000000000000000000000000000..426282a219dd9e230774b64334f8e8ecf8d6bb87
--- /dev/null
+++ b/slapos/recipe/README.mkdirectory.txt
@@ -0,0 +1,13 @@
+mkdirectory
+===========
+
+mkdirectory loops on its options and create the directory joined
+
+.. Note::
+
+   Use a slash ``/`` as directory separator. Don't use system dependent separator.
+   The slash will be parsed and replace by the operating system right separator.
+
+   Only use relative directory to the buildout root directory.
+
+The created directory won't be added to path list.
diff --git a/slapos/recipe/certificate_authority/__init__.py b/slapos/recipe/certificate_authority/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..2bf43ed728565ac7ff4415e8c04a509fd9938c21
--- /dev/null
+++ b/slapos/recipe/certificate_authority/__init__.py
@@ -0,0 +1,132 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import os
+import hashlib
+import ConfigParser
+
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+class Recipe(GenericBaseRecipe):
+
+  def setPath(self):
+    self.ca_dir = self.options['ca-dir']
+    self.request_directory = self.options['requests-directory']
+    self.ca_private = self.options['ca-private']
+    self.ca_certs = self.options['ca-certs']
+    self.ca_newcerts = self.options['ca-newcerts']
+    self.ca_crl = self.options['ca-crl']
+    self.ca_key_ext = '.key'
+    self.ca_crt_ext = '.crt'
+
+  def install(self):
+    path_list = []
+
+    # XXX: We gotta find better a way to get these options
+    ca_country_code = 'XX'
+    ca_email = 'xx@example.com'
+    ca_state = 'State',
+    ca_city = 'City'
+    ca_company = 'Company'
+    # XXX: end
+
+    self.setPath()
+
+    config = dict(ca_dir=self.ca_dir, request_dir=self.request_directory)
+
+    for f in ['crlnumber', 'serial']:
+      if not os.path.exists(os.path.join(self.ca_dir, f)):
+        open(os.path.join(self.ca_dir, f), 'w').write('01')
+    if not os.path.exists(os.path.join(self.ca_dir, 'index.txt')):
+      open(os.path.join(self.ca_dir, 'index.txt'), 'w').write('')
+    openssl_configuration = os.path.join(self.ca_dir, 'openssl.cnf')
+    config.update(
+        working_directory=self.ca_dir,
+        country_code=ca_country_code,
+        state=ca_state,
+        city=ca_city,
+        company=ca_company,
+        email_address=ca_email,
+    )
+    self.createFile(openssl_configuration, self.substituteTemplate(
+      self.getTemplateFilename('openssl.cnf.ca.in'), config))
+
+    ca_wrapper = self.createPythonScript(
+      self.options['wrapper'],
+      '%s.certificate_authority.runCertificateAuthority' % __name__,
+      dict(
+        openssl_configuration=openssl_configuration,
+        openssl_binary=self.options['openssl-binary'],
+        certificate=os.path.join(self.ca_dir, 'cacert.pem'),
+        key=os.path.join(self.ca_private, 'cakey.pem'),
+        crl=self.ca_crl,
+        request_dir=self.request_directory
+      )
+    )
+    path_list.append(ca_wrapper)
+
+    return path_list
+
+class Request(Recipe):
+
+  def _options(self, options):
+    if 'name' not in options:
+      options['name'] = self.name
+
+  def install(self):
+    self.setPath()
+
+    key_file = self.options['key-file']
+    cert_file = self.options['cert-file']
+
+    name = self.options['name']
+    hash_ = hashlib.sha512(name).hexdigest()
+    key = os.path.join(self.ca_private, hash_ + self.ca_key_ext)
+    certificate = os.path.join(self.ca_certs, hash_ + self.ca_crt_ext)
+    parser = ConfigParser.RawConfigParser()
+    parser.add_section('certificate')
+    parser.set('certificate', 'name', name)
+    parser.set('certificate', 'key_file', key)
+    parser.set('certificate', 'certificate_file', certificate)
+    parser.write(open(os.path.join(self.request_directory, hash_), 'w'))
+
+    for link in [key_file, cert_file]:
+      if os.path.islink(link):
+        os.unlink(link)
+      elif os.path.exists(link):
+        raise OSError("%r file should be a symbolic link.")
+
+    os.symlink(key, key_file)
+    os.symlink(certificate, cert_file)
+
+    wrapper = self.createPythonScript(
+      self.options['wrapper'],
+      'slapos.recipe.librecipe.execute.execute_wait',
+      [ [self.options['executable']],
+        [certificate, key] ],
+    )
+
+    return [key_file, cert_file, wrapper]
diff --git a/slapos/recipe/mysql/certificate_authority.py b/slapos/recipe/certificate_authority/certificate_authority.py
similarity index 91%
rename from slapos/recipe/mysql/certificate_authority.py
rename to slapos/recipe/certificate_authority/certificate_authority.py
index 8caffc0c21b2852f259a9b6f85bda5e311965c47..a4af4ab76df89af085dd779e12b5d1a64af37ff6 100644
--- a/slapos/recipe/mysql/certificate_authority.py
+++ b/slapos/recipe/certificate_authority/certificate_authority.py
@@ -101,12 +101,17 @@ class CertificateAuthority:
             'certificate_file')):
         print 'Created certificate %r' % parser.get('certificate', 'name')
 
-def runCertificateAuthority(args):
-  ca_conf = args[0]
+def runCertificateAuthority(ca_conf):
   ca = CertificateAuthority(ca_conf['key'], ca_conf['certificate'],
       ca_conf['openssl_binary'], ca_conf['openssl_configuration'],
       ca_conf['request_dir'])
   while True:
     ca.checkAuthority()
     ca.checkRequestDir()
+    # XXX
+    # Antoine: I really don't like that at all. It wastes useful CPU time.
+    #          I think it would be a greater idea to use pyinotify
+    #          <http://pyinotify.sourceforge.net/>
+    #          Or we could use select() with socket as well.
     time.sleep(60)
+    # end XXX
diff --git a/slapos/recipe/mysql/template/openssl.cnf.ca.in b/slapos/recipe/certificate_authority/template/openssl.cnf.ca.in
similarity index 100%
rename from slapos/recipe/mysql/template/openssl.cnf.ca.in
rename to slapos/recipe/certificate_authority/template/openssl.cnf.ca.in
diff --git a/slapos/recipe/dcron.py b/slapos/recipe/dcron.py
new file mode 100644
index 0000000000000000000000000000000000000000..3bb1336c597ca3d61b8760eec020ef66a3fd6e4e
--- /dev/null
+++ b/slapos/recipe/dcron.py
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import os
+
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+class Recipe(GenericBaseRecipe):
+
+  def install(self):
+    self.logger.info("Installing dcron...")
+
+    path_list = []
+
+    cronstamps = self.options['cronstamps']
+    cron_d = self.options['cron-entries']
+    crontabs = self.options['crontabs']
+    catcher = self.options['catcher']
+
+    binary = self.options['binary']
+
+    script = self.createPythonScript(binary,
+      'slapos.recipe.librecipe.execute.execute',
+      [self.options['dcrond-binary'].strip(), '-s', cron_d, '-c', crontabs,
+       '-t', cronstamps, '-f', '-l', '5', '-M', catcher]
+      )
+    path_list.append(script)
+    self.logger.debug('Main cron executable created at : %r', script)
+
+    self.logger.info("dcron successfully installed.")
+
+    return path_list
+
+
+
+class Part(GenericBaseRecipe):
+
+  def _options(self, options):
+    if 'name' not in options:
+      options['name'] = self.name
+
+  def install(self):
+    cron_d = self.options['cron-entries']
+    filename = os.path.join(cron_d, 'name')
+
+    with open(filename, 'w') as part:
+      part.write('%(frequency)s %(command)s\n' % {
+        'frequency': self.options['frequency'],
+        'command': self.options['command'],
+      })
+
+    return [filename]
diff --git a/slapos/recipe/duplicity.py b/slapos/recipe/duplicity.py
new file mode 100644
index 0000000000000000000000000000000000000000..2e5d5d56887e67e30e7596068ba7040a21c7dcf4
--- /dev/null
+++ b/slapos/recipe/duplicity.py
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+class Recipe(GenericBaseRecipe):
+
+  def install(self):
+
+    remote_url = self.options['remote_backup']
+    backup_directory = self.options['directory']
+
+    wrapper = self.createPythonScript(
+      self.options['wrapper'],
+      'slapos.recipe.librecipe.execute.execute',
+      [self.options['duplicity_binary'], '--no-encryption',
+       backup_directory, remote_url]
+    )
+    return [wrapper]
+
+
diff --git a/slapos/recipe/lamp/__init__.py b/slapos/recipe/lamp/__init__.py
index 03a61b5b780395293502bcde9cbe86e76babee60..973d656e58f02bb492cd9840012bacf72c141e78 100644
--- a/slapos/recipe/lamp/__init__.py
+++ b/slapos/recipe/lamp/__init__.py
@@ -60,8 +60,8 @@ class BaseRecipe(BaseSlapRecipe):
     self._createDirectory(mysql_conf['data_directory'])
 
     mysql_conf_path = self.createConfigurationFile("my.cnf",
-        self.substituteTemplate(pkg_resources.resource_filename(__name__, 'template/my.cnf.in'),
-          mysql_conf))
+        self.substituteTemplate(pkg_resources.resource_filename(__name__,
+        'template/my.cnf.in'), mysql_conf))
 
     mysql_script = pkg_resources.resource_string(__name__,
         'template/mysqlinit.sql.in') % mysql_conf
@@ -153,6 +153,53 @@ class BaseRecipe(BaseSlapRecipe):
     destination = os.path.join(path, file)
     open(destination, 'w').write(open(template, 'r').read() % d)
 
+  def configureInstallation(self, document_root, mysql_conf, url):
+    """Start process which can launch python scripts, move or remove files or 
+    directories when installing software.
+    """
+    if not self.options.has_key('delete') and not \
+        self.options.has_key('rename') and not self.options.has_key('script'):
+      return
+    delete = []
+    rename = []
+    rename_list = ""
+    data = {}
+    if self.options.has_key('delete'):
+      for fname in self.options['delete'].split(','):
+        delete.append(os.path.join(document_root, fname.strip()))
+    if self.options.has_key('rename'):
+      for fname in self.options['rename'].split(','):
+        if fname.find("=>") < 0:
+          old_name = fname
+          fname = []
+          fname.append(old_name)
+          fname.append(old_name + '-' + mysql_conf['mysql_user'])
+        else:
+          fname = fname.split("=>")
+        rename.append(dict(old = os.path.join(document_root, fname[0].strip()),
+                           new = os.path.join(document_root, fname[1].strip())
+                           ))
+        rename_list += fname[0] + "=> " + fname[1] + ", "
+    if not self.options.has_key('file_token'):
+      token = dict(
+        table = self.options['table_name'].strip(),
+        constraint=self.options['constraint'].strip()
+      )
+    else:
+      token = os.path.join(document_root, self.options['file_token'].strip())
+    if self.options.has_key('script') and \
+        self.options['script'].strip().endswith(".py"):
+      data = dict(htdocs = document_root,
+                  base_url = url,
+                  script = self.options['script'].strip(),
+                  renamed = rename_list
+                  )
+    self.path_list.extend(zc.buildout.easy_install.scripts(
+        [('configureInstall', __name__ + '.runner', 'executeRunner')], self.ws,
+        sys.executable, self.wrapper_directory, arguments=[delete, rename,
+            token, mysql_conf,data]))
+    return rename_list
+
 class Static(BaseRecipe):
   def _install(self):
     self.path_list = []
@@ -171,8 +218,10 @@ class Simple(BaseRecipe):
     self.createHtdocs(self.options['source'].strip(), document_root)
     mysql_conf = self.installMysqlServer()
     url = self.installApache(document_root)
+    renamed = self.configureInstallation(document_root, mysql_conf, url)
     self.setConnectionDict(dict(
       url=url,
+      rename=renamed,
       **mysql_conf
     ))
     self.createConfiguration(self.options['template'], document_root,
diff --git a/slapos/recipe/lamp/runner.py b/slapos/recipe/lamp/runner.py
new file mode 100644
index 0000000000000000000000000000000000000000..a04649595420ae800c054f88f6d7bcbecbfea1ee
--- /dev/null
+++ b/slapos/recipe/lamp/runner.py
@@ -0,0 +1,82 @@
+import os
+import time
+import sys
+import shutil
+import MySQLdb
+    
+def executeRunner(args):
+  """Start the instance runner. this may run a python script, move or/and rename 
+  file or directory when dondition is filled. the condition may be when file exist or when an entry
+  exist into database.
+  """
+  delete, rename, token, mysql_config, script_data = args
+  timeout = 5;
+  while True:
+    if not checkAction(token, mysql_config):
+      print "Waiting for 3s and retrying"
+      time.sleep(3)
+      continue
+    time.sleep(timeout)
+    for path in delete:
+      if not os.path.exists(path):
+        print "Error when deleting: '%s': no such file or directory" % path
+        continue
+      if os.path.isdir(path):
+        shutil.rmtree(path)
+      else:
+        os.remove(path)
+    for data in rename:
+      if not os.path.exists(data['old']):
+        print "Error when moving: '%s': no such file or directory" % data['old']
+        continue
+      os.rename(data['old'], data['new'])
+    if script_data != {}:
+      script = script_data['script']
+      if os.path.exists(script):
+        import subprocess
+        #run python script with predefined data
+        return_code = subprocess.call([sys.executable, script, script_data['base_url'],
+                         script_data['htdocs'], script_data['renamed'], 
+                         mysql_config['mysql_user'], mysql_config['mysql_password'], 
+                         mysql_config['mysql_database'], mysql_config['mysql_host']])
+        if return_code != 0:
+          print "Error: execution of script %r failed with code: %s" % (script, return_code)
+      else:
+        print "Error: can not read file '%s'" % script
+    return
+
+def checkAction(token, mysql_config):
+  """Check if condition is filled. If token is string(that represent a path), the function check if file exist
+  otherwise token is a dictionary and mysql_config is used to check condition into database
+  """
+  if type(token) is dict:
+    try:
+      conn = MySQLdb.connect (host = mysql_config['mysql_host'],
+                        port = int(mysql_config['mysql_port']),
+                        user = mysql_config['mysql_user'],
+                        passwd = mysql_config['mysql_password'],
+                        db = mysql_config['mysql_database'])
+    except:
+      #Mysql is not ready yet?...
+      return False
+    if token['table'] == "**":
+      #only detect if mysql has been started
+      conn.close()
+      return True
+    cursor = conn.cursor ()
+    cursor.execute("SHOW TABLES LIKE '%" + token['table'] + "'") #Check if table has been created
+    row = cursor.fetchone ()
+    if row == None:
+      conn.close()
+      return False
+    else:
+      token['table'] = row[0]
+    cursor.execute ("SELECT * FROM " + token['table'] + " WHERE " + token['constraint'])
+    row = cursor.fetchone ()
+    conn.close()
+    if row == None:
+      return False
+    else:
+      return True
+  else:
+    return os.path.exists(token)
\ No newline at end of file
diff --git a/slapos/recipe/lamp/template/apache.in b/slapos/recipe/lamp/template/apache.in
index 8dc3ef81d383ccbeb5d1fbd269f4013f64ec7622..1d7d6a94d878c91a13533a3af66c426a2dde3490 100644
--- a/slapos/recipe/lamp/template/apache.in
+++ b/slapos/recipe/lamp/template/apache.in
@@ -54,3 +54,5 @@ LoadModule headers_module modules/mod_headers.so
 LoadModule dir_module modules/mod_dir.so
 LoadModule php5_module modules/libphp5.so
 LoadModule alias_module modules/mod_alias.so
+LoadModule env_module modules/mod_env.so
+LoadModule autoindex_module modules/mod_autoindex.so
diff --git a/slapos/recipe/lamp/template/php.ini.in b/slapos/recipe/lamp/template/php.ini.in
index ce041b0d9774c90aad4abae4c6fc80d599dc12b9..76dfd3a88e64902fd08f2bcc5f2318a3c7ed6a8b 100644
--- a/slapos/recipe/lamp/template/php.ini.in
+++ b/slapos/recipe/lamp/template/php.ini.in
@@ -13,6 +13,6 @@ session.save_path = "%(tmp_directory)s"
 session.auto_start = 0
 date.timezone = Europe/Paris
 file_uploads = On
-upload_max_filesize = 8M
-post_max_size = 8M
-magic_quotes_gpc=0ff
+upload_max_filesize = 16M
+post_max_size = 16M
+magic_quotes_gpc=Off
diff --git a/slapos/recipe/librecipe/__init__.py b/slapos/recipe/librecipe/__init__.py
index 9f83793c7e3018e6eb18c72a0308e235571d0332..9a892bf0d85c78dfb6aa432c78e2643c1e43ea25 100644
--- a/slapos/recipe/librecipe/__init__.py
+++ b/slapos/recipe/librecipe/__init__.py
@@ -36,8 +36,13 @@ import time
 import re
 import urlparse
 
+# Use to do from slapos.recipe.librecipe import GenericBaseRecipe
+from generic import GenericBaseRecipe
+from genericslap import GenericSlapRecipe
+
 class BaseSlapRecipe:
   """Base class for all slap.recipe.*"""
+
   def __init__(self, buildout, name, options):
     """Default initialisation"""
     self.name = name
@@ -95,6 +100,9 @@ class BaseSlapRecipe:
     # setup egg to give possibility to generate scripts
     self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options)
 
+    # Hook options
+    self._options(options)
+
     # setup auto uninstall/install
     self._setupAutoInstallUninstall()
 
@@ -248,6 +256,10 @@ class BaseSlapRecipe:
     """Hook which shall be implemented in children class"""
     raise NotImplementedError('Shall be implemented by subclass')
 
+  def _options(self, options):
+    """Hook which can be implemented in children class"""
+    pass
+
   def createPromiseWrapper(self, promise_name, file_content):
     """Create a promise wrapper.
 
@@ -259,12 +271,16 @@ class BaseSlapRecipe:
     self._writeExecutable(promise_path, file_content)
     return promise_path
 
-  def setConnectionUrl(self, scheme, host, path='', params='', query='',
-                       fragment='', port=None, auth=None):
-    """Set the ConnectionDict to a dict with only one Universal Resource
-    Locator.
+  def setConnectionUrl(self, *args, **kwargs):
+    url = self._unparseUrl(*args, **kwargs)
+    self.setConnectionDict(dict(url=url))
 
-    auth can be either a login string or a tuple (login, password).
+  def _unparseUrl(self, scheme, host, path='', params='', query='',
+                  fragment='', port=None, auth=None):
+    """Join a url with auth, host, and port.
+
+    * auth can be either a login string or a tuple (login, password).
+    * if the host is an ipv6 address, brackets will be added to surround it.
 
     """
     # XXX-Antoine: I didn't find any standard module to join an url with
@@ -288,4 +304,6 @@ class BaseSlapRecipe:
       netloc += ':%s' % port
 
     url = urlparse.urlunparse((scheme, netloc, path, params, query, fragment))
-    self.setConnectionDict(dict(url=url))
+
+    return url
+
diff --git a/slapos/recipe/librecipe/execute.py b/slapos/recipe/librecipe/execute.py
index a84ed2aa0091115d43633ea62dbd77e34ff97df0..d9e04caafc0ac84b76458ae72c98aef9bd4d1010 100644
--- a/slapos/recipe/librecipe/execute.py
+++ b/slapos/recipe/librecipe/execute.py
@@ -23,6 +23,8 @@ def execute_wait(args):
         ready = False
     if ready:
       break
+    # XXX: It's the same as ../ca/certificate_authoritiy.py
+    #      We should use pyinotify as well. Or select() on socket.
     time.sleep(sleep)
   os.execv(exec_list[0], exec_list + sys.argv[1:])
 
diff --git a/slapos/recipe/librecipe/generic.py b/slapos/recipe/librecipe/generic.py
new file mode 100644
index 0000000000000000000000000000000000000000..a203ce9b4714b772996843c8ae6001827e1dc61a
--- /dev/null
+++ b/slapos/recipe/librecipe/generic.py
@@ -0,0 +1,123 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import logging
+import os
+import sys
+import inspect
+
+import pkg_resources
+import zc.buildout
+
+class GenericBaseRecipe(object):
+
+  TRUE_VALUES = ['y', 'yes', '1', 'true']
+
+  def __init__(self, buildout, name, options):
+    """Recipe initialisation"""
+    self.name = name
+    self.options = options
+    self.buildout = buildout
+    self.logger = logging.getLogger(name)
+
+    self._options(options) # Options Hook
+
+    self._ws = self.getWorkingSet()
+
+  def update(self):
+    """By default update method does the same thing than install"""
+    return self.install()
+
+  def install(self):
+    """Install method of the recipe. This must be overriden in child
+    classes """
+    raise NotImplementedError("install method is not implemented.")
+
+  def getWorkingSet(self):
+    """If you want do override the default working set"""
+    egg = zc.recipe.egg.Egg(self.buildout, 'slapos.cookbook',
+                                  self.options.copy())
+    requirements, ws = egg.working_set()
+    return ws
+
+  def _options(self, options):
+    """Options Hook method. This method can be overriden in child classes"""
+    return
+
+  def createFile(self, name, content, mode=0600):
+    """Create a file with content
+
+    The parent directory should exists, else it would raise IOError"""
+    with open(name, 'w') as fileobject:
+      fileobject.write(content)
+      os.chmod(fileobject.name, mode)
+    return os.path.abspath(name)
+
+  def createExecutable(self, name, content, mode=0700):
+    return self.createFile(name, content, mode)
+
+  def createPythonScript(self, name, absolute_function, arguments=''):
+    """Create a python script using zc.buildout.easy_install.scripts
+
+     * function should look like 'module.function', or only 'function'
+       if it is a builtin function."""
+    absolute_function = tuple(absolute_function.rsplit('.', 1))
+    if len(absolute_function) == 1:
+      absolute_function = ('__builtin__',) + absolute_function
+    if len(absolute_function) != 2:
+      raise ValueError("A non valid function was given")
+
+    module, function = absolute_function
+    path, filename = os.path.split(os.path.abspath(name))
+
+    script = zc.buildout.easy_install.scripts(
+      [(filename, module, function)], self._ws, sys.executable,
+      path, arguments=arguments)[0]
+    return script
+
+  def substituteTemplate(self, template_location, mapping_dict):
+    """Read from file template_location an substitute content with
+       mapping_dict douing a dummy python format."""
+    with open(template_location, 'r') as template:
+      return template.read() % mapping_dict
+
+  def getTemplateFilename(self, template_name):
+    caller = inspect.stack()[1]
+    caller_frame = caller[0]
+    name = caller_frame.f_globals['__name__']
+    return pkg_resources.resource_filename(name,
+        'template/%s' % template_name)
+
+  def generatePassword(self, len_=32):
+    # TODO: implement a real password generator which remember the last
+    # call.
+    return "insecure"
+
+  def isTrueValue(self, value):
+    return str(value).lower() in GenericBaseRecipe.TRUE_VALUES
+
+  def optionIsTrue(self, optionname, default=None):
+    return self.isTrueValue(self.options[optionname])
diff --git a/slapos/recipe/librecipe/genericslap.py b/slapos/recipe/librecipe/genericslap.py
new file mode 100644
index 0000000000000000000000000000000000000000..0181a0da6c78852e5051ca30bef9e97e20fb34e3
--- /dev/null
+++ b/slapos/recipe/librecipe/genericslap.py
@@ -0,0 +1,129 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import logging
+from slapos import slap
+import zc.buildout
+import zc.recipe.egg
+import time
+import re
+import urlparse
+
+class GenericSlapRecipe(object):
+  """Base class for all slap.recipe.*"""
+
+  def __init__(self, buildout, name, options):
+    """Default initialisation"""
+    self.name = name
+    options['eggs'] = 'slapos.cookbook'
+    self.options = options
+    self.logger = logging.getLogger(self.name)
+    self.slap = slap.slap()
+
+    # SLAP related information
+    slap_connection = buildout['slap-connection']
+    self.computer_id = slap_connection['computer-id']
+    self.computer_partition_id = slap_connection['partition-id']
+    self.server_url = slap_connection['server-url']
+    self.software_release_url = slap_connection['software-release-url']
+    self.key_file = slap_connection.get('key-file')
+    self.cert_file = slap_connection.get('cert-file')
+
+    # setup egg to give possibility to generate scripts
+    self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options)
+
+    # Hook options
+    self._options(options)
+
+    # setup auto uninstall/install
+    self._setupAutoInstallUninstall()
+
+  def _setupAutoInstallUninstall(self):
+    """By default SlapOS recipes are reinstalled each time"""
+    # Note: It is possible to create in future subclass which will do no-op in
+    # this method
+    self.options['slapos-timestamp'] = str(time.time())
+
+  def install(self):
+    self.slap.initializeConnection(self.server_url, self.key_file,
+        self.cert_file)
+    self.computer_partition = self.slap.registerComputerPartition(
+      self.computer_id,
+      self.computer_partition_id)
+    self.request = self.computer_partition.request
+    self.setConnectionDict = self.computer_partition.setConnectionDict
+    self.parameter_dict = self.computer_partition.getInstanceParameterDict()
+
+    # call children part of install
+    path_list = self._install()
+
+    return path_list
+
+  update = install
+
+  def _install(self):
+    """Hook which shall be implemented in children class"""
+    raise NotImplementedError('Shall be implemented by subclass')
+
+  def _options(self, options):
+    """Hook which can be implemented in children class"""
+    pass
+
+  def setConnectionUrl(self, *args, **kwargs):
+    url = self._unparseUrl(*args, **kwargs)
+    self.setConnectionDict(dict(url=url))
+
+  def _unparseUrl(self, scheme, host, path='', params='', query='',
+                  fragment='', port=None, auth=None):
+    """Join a url with auth, host, and port.
+
+    * auth can be either a login string or a tuple (login, password).
+    * if the host is an ipv6 address, brackets will be added to surround it.
+
+    """
+    # XXX-Antoine: I didn't find any standard module to join an url with
+    # login, password, ipv6 host and port.
+    # So instead of copy and past in every recipe I factorized it right here.
+    netloc = ''
+    if auth is not None:
+      auth = tuple(auth)
+      netloc = str(auth[0]) # Login
+      if len(auth) > 1:
+        netloc += ':%s' % auth[1] # Password
+      netloc += '@'
+
+    # host is an ipv6 address whithout brackets
+    if ':' in host and not re.match(r'^\[.*\]$', host):
+      netloc += '[%s]' % host
+    else:
+      netloc += str(host)
+
+    if port is not None:
+      netloc += ':%s' % port
+
+    url = urlparse.urlunparse((scheme, netloc, path, params, query, fragment))
+
+    return url
diff --git a/slapos/recipe/logrotate.py b/slapos/recipe/logrotate.py
new file mode 100644
index 0000000000000000000000000000000000000000..9551952d80696883462224718d686139ccfda66e
--- /dev/null
+++ b/slapos/recipe/logrotate.py
@@ -0,0 +1,120 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import os
+
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+class Recipe(GenericBaseRecipe):
+
+  def _options(self, options):
+    if 'name' not in options:
+      options['name'] = self.name
+
+  def install(self):
+    path_list = []
+
+    logrotate_backup = self.options['backup']
+    logrotate_d = self.options['logrotate-entries']
+    logrotate_conf_file = self.options['conf']
+
+    logrotate_conf = []
+    logrotate_conf.append("include %s" % logrotate_d)
+    logrotate_conf.append("olddir %s" % logrotate_backup)
+    logrotate_conf.append("dateext")
+
+    frequency = 'daily'
+    if 'frequency' in self.options:
+      frequency = self.options['frequency']
+    logrotate_conf.append(frequency)
+
+    num_rotate = 30
+    if 'num-rotate' in self.options:
+      num_rotate = self.options['num-rotate']
+    logrotate_conf.append("rotate %s" % num_rotate)
+
+    logrotate_conf.append("compress")
+    logrotate_conf.append("compresscmd %s" % self.options['gzip-binary'])
+    logrotate_conf.append("compressoptions -9")
+    logrotate_conf.append("uncompresscmd %s" % self.options['gunzip-binary'])
+
+    logrotate_conf_file = self.createFile(logrotate_conf_file, '\n'.join(logrotate_conf))
+    logrotate_conf.append(logrotate_conf_file)
+
+    state_file = self.options['state-file']
+
+    logrotate = self.createPythonScript(
+      self.options['wrapper'],
+      'slapos.recipe.librecipe.exceute.execute',
+      [self.options['logrotate-binary'], '-s', state_file, logrotate_conf_file, ]
+    )
+    path_list.append(logrotate)
+
+    return path_list
+
+class Part(GenericBaseRecipe):
+
+  def _options(self, options):
+    if 'name' not in options:
+      options['name'] = self.name
+
+  def install(self):
+
+    logrotate_d = self.options['logrotate-entries']
+
+    part_path = os.path.join(logrotate_d, self.options['name'])
+
+    conf = []
+
+    if 'frequency' in self.options:
+      conf.append(self.options['frequency'])
+    if 'num-rotate' in self.options:
+      conf.append('rotate %s' % self.options['num-rotate'])
+
+    if 'post' in self.options:
+      conf.append("postrotate\n%s\nendscript" % self.options['post'])
+    if 'pre' in self.options:
+      conf.append("prerotate\n%s\nendscript" % self.options['pre'])
+
+    if self.optionIsTrue('sharedscripts', False):
+      conf.append("sharedscripts")
+
+    if self.optionIsTrue('notifempty', False):
+      conf.append('notifempty')
+
+    if self.optionIsTrue('create', True):
+      conf.append('create')
+
+    log = self.options['log']
+
+    self.createFile(os.path.join(logrotate_d, self.options['name']),
+                    "%(logfiles)s {\n%(conf)s\n}" % {
+                      'logfiles': log,
+                      'conf': '\n'.join(conf),
+                    }
+                   )
+
+    return [part_path]
diff --git a/slapos/recipe/mkdirectory.py b/slapos/recipe/mkdirectory.py
new file mode 100644
index 0000000000000000000000000000000000000000..d715da3d5932d5d0ecac8b69813cb47bdc057335
--- /dev/null
+++ b/slapos/recipe/mkdirectory.py
@@ -0,0 +1,53 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import os
+
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+class Recipe(GenericBaseRecipe):
+
+  def _options(self, options):
+    self.directory = options.copy()
+    del self.directory['recipe']
+
+    str_mode = '0700'
+    if 'mode' in self.directory:
+      str_mode = self.directory['mode']
+      del self.directory['mode']
+    self.mode = int(str_mode, 8)
+
+  def install(self):
+
+    for directory in self.directory.values():
+      path = directory
+
+      if not os.path.exists(path):
+        os.mkdir(path, self.mode)
+      elif not os.path.isdir(path):
+        raise OSError("%s path exits, but it's not a directory.")
+
+    return []
diff --git a/slapos/recipe/mysql/__init__.py b/slapos/recipe/mysql/__init__.py
index 37b84e050c007c18f22fb4a661028817bbc604dd..14c63140ff21d62b50dcf3218bd8083eaec151bc 100644
--- a/slapos/recipe/mysql/__init__.py
+++ b/slapos/recipe/mysql/__init__.py
@@ -24,330 +24,135 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
 ##############################################################################
-from slapos.recipe.librecipe import BaseSlapRecipe
-import hashlib
+from slapos.recipe.librecipe import GenericBaseRecipe
 import os
-import pkg_resources
-import sys
-import zc.buildout
-import ConfigParser
-import re
 
-class Recipe(BaseSlapRecipe):
-  def getTemplateFilename(self, template_name):
-    return pkg_resources.resource_filename(__name__,
-        'template/%s' % template_name)
+class Recipe(GenericBaseRecipe):
 
-  def parseCmdArgument(self, arg):
-    if any([(i in arg) for i in ["'", ' ', "\\"]]):
-      return "'%s'" % re.sub(r"(\\|\')", r'\\\1', arg)
-    return arg
+  def _options(self, options):
+    options['password'] = self.generatePassword()
 
-  def _install(self):
-    self.software_type = self.parameter_dict['slap_software_type']
-    self.path_list = []
+  def install(self):
+    path_list = []
 
-    self.requirements, self.ws = self.egg.working_set()
-    # self.cron_d is a directory, where cron jobs can be registered
-    self.cron_d = self.installCrond()
-    self.logrotate_d, self.logrotate_backup = self.installLogrotate()
+    template_filename = self.getTemplateFilename('my.cnf.in')
 
-    mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678)
-    self.mysql_backup_directory = mysql_conf['backup_directory']
-
-    ca_conf = self.installCertificateAuthority()
-    key, certificate = self.requestCertificate('MySQL')
-
-    stunnel_conf = self.installStunnel(self.getGlobalIPv6Address(),
-        self.getLocalIPv4Address(), 12345, mysql_conf['tcp_port'],
-        certificate, key, ca_conf['ca_crl'],
-        ca_conf['certificate_authority_path'])
-
-    self.linkBinary()
-    self.setConnectionUrl(scheme='mysqls',
-                          host=stunnel_conf['public_ip'],
-                          port=stunnel_conf['public_port'],
-                          auth=(mysql_conf['mysql_user'],
-                                mysql_conf['mysql_password']),
-                          path=mysql_conf['mysql_database'])
-    return self.path_list
-
-  def linkBinary(self):
-    """Links binaries to instance's bin directory for easier exposal"""
-    for linkline in self.options.get('link_binary_list', '').splitlines():
-      if not linkline:
-        continue
-      target = linkline.split()
-      if len(target) == 1:
-        target = target[0]
-        path, linkname = os.path.split(target)
-      else:
-        linkname = target[1]
-        target = target[0]
-      link = os.path.join(self.bin_directory, linkname)
-      if os.path.lexists(link):
-        if not os.path.islink(link):
-          raise zc.buildout.UserError(
-              'Target link already %r exists but it is not link' % link)
-        os.unlink(link)
-      os.symlink(target, link)
-      self.logger.debug('Created link %r -> %r' % (link, target))
-      self.path_list.append(link)
-
-  def installCrond(self):
-    timestamps = self.createDataDirectory('cronstamps')
-    cron_output = os.path.join(self.log_directory, 'cron-output')
-    self._createDirectory(cron_output)
-    catcher = zc.buildout.easy_install.scripts([('catchcron',
-      __name__ + '.catdatefile', 'catdatefile')], self.ws, sys.executable,
-      self.bin_directory, arguments=[cron_output])[0]
-    self.path_list.append(catcher)
-    cron_d = os.path.join(self.etc_directory, 'cron.d')
-    crontabs = os.path.join(self.etc_directory, 'crontabs')
-    self._createDirectory(cron_d)
-    self._createDirectory(crontabs)
-    wrapper = zc.buildout.easy_install.scripts([('crond',
-      'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
-      self.wrapper_directory, arguments=[
-        self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs,
-        '-t', timestamps, '-f', '-l', '5', '-M', catcher]
-      )[0]
-    self.path_list.append(wrapper)
-    return cron_d
-
-  def installLogrotate(self):
-    """Installs logortate main configuration file and registers its to cron"""
-    logrotate_d = os.path.abspath(os.path.join(self.etc_directory,
-      'logrotate.d'))
-    self._createDirectory(logrotate_d)
-    logrotate_backup = self.createBackupDirectory('logrotate')
-    logrotate_conf = self.createConfigurationFile("logrotate.conf",
-        "include %s" % logrotate_d)
-    logrotate_cron = os.path.join(self.cron_d, 'logrotate')
-    state_file = os.path.join(self.data_root_directory, 'logrotate.status')
-    open(logrotate_cron, 'w').write('0 0 * * * %s -s %s %s' %
-        (self.options['logrotate_binary'], state_file, logrotate_conf))
-    self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron])
-    return logrotate_d, logrotate_backup
-
-  def registerLogRotation(self, name, log_file_list, postrotate_script):
-    """Register new log rotation requirement"""
-    open(os.path.join(self.logrotate_d, name), 'w').write(
-        self.substituteTemplate(self.getTemplateFilename(
-          'logrotate_entry.in'),
-          dict(file_list=' '.join(['"'+q+'"' for q in log_file_list]),
-            postrotate=postrotate_script, olddir=self.logrotate_backup)))
-
-  def installCertificateAuthority(self, ca_country_code='XX',
-      ca_email='xx@example.com', ca_state='State', ca_city='City',
-      ca_company='Company'):
-    self.ca_dir = os.path.join(self.data_root_directory, 'ca')
-    self._createDirectory(self.ca_dir)
-    self.ca_request_dir = os.path.join(self.ca_dir, 'requests')
-    self._createDirectory(self.ca_request_dir)
-    config = dict(ca_dir=self.ca_dir, request_dir=self.ca_request_dir)
-    self.ca_private = os.path.join(self.ca_dir, 'private')
-    self.ca_certs = os.path.join(self.ca_dir, 'certs')
-    self.ca_crl = os.path.join(self.ca_dir, 'crl')
-    self.ca_newcerts = os.path.join(self.ca_dir, 'newcerts')
-    self.ca_key_ext = '.key'
-    self.ca_crt_ext = '.crt'
-    for d in [self.ca_private, self.ca_crl, self.ca_newcerts, self.ca_certs]:
-      self._createDirectory(d)
-    for f in ['crlnumber', 'serial']:
-      if not os.path.exists(os.path.join(self.ca_dir, f)):
-        open(os.path.join(self.ca_dir, f), 'w').write('01')
-    if not os.path.exists(os.path.join(self.ca_dir, 'index.txt')):
-      open(os.path.join(self.ca_dir, 'index.txt'), 'w').write('')
-    openssl_configuration = os.path.join(self.ca_dir, 'openssl.cnf')
-    config.update(
-        working_directory=self.ca_dir,
-        country_code=ca_country_code,
-        state=ca_state,
-        city=ca_city,
-        company=ca_company,
-        email_address=ca_email,
-    )
-    self._writeFile(openssl_configuration, pkg_resources.resource_string(
-      __name__, 'template/openssl.cnf.ca.in') % config)
-    self.path_list.extend(zc.buildout.easy_install.scripts([
-      ('certificate_authority',
-        __name__ + '.certificate_authority', 'runCertificateAuthority')],
-        self.ws, sys.executable, self.wrapper_directory, arguments=[dict(
-          openssl_configuration=openssl_configuration,
-          openssl_binary=self.options['openssl_binary'],
-          certificate=os.path.join(self.ca_dir, 'cacert.pem'),
-          key=os.path.join(self.ca_private, 'cakey.pem'),
-          crl=os.path.join(self.ca_crl),
-          request_dir=self.ca_request_dir
-          )]))
-    return dict(
-      ca_certificate=os.path.join(config['ca_dir'], 'cacert.pem'),
-      ca_crl=os.path.join(config['ca_dir'], 'crl'),
-      certificate_authority_path=config['ca_dir']
+    mysql_conf = dict(
+        ip=self.options['ip'],
+        data_directory=self.options['data-directory'],
+        tcp_port=self.options['port'],
+        pid_file=self.options['pid-file'],
+        socket=self.options['socket'],
+        error_log=self.options['error-log'],
+        slow_query_log=self.options['slow-query-log'],
+        mysql_database=self.options['database'],
+        mysql_user=self.options['user'],
+        mysql_password=self.options['password'],
     )
 
-  def requestCertificate(self, name):
-    hash = hashlib.sha512(name).hexdigest()
-    key = os.path.join(self.ca_private, hash + self.ca_key_ext)
-    certificate = os.path.join(self.ca_certs, hash + self.ca_crt_ext)
-    parser = ConfigParser.RawConfigParser()
-    parser.add_section('certificate')
-    parser.set('certificate', 'name', name)
-    parser.set('certificate', 'key_file', key)
-    parser.set('certificate', 'certificate_file', certificate)
-    parser.write(open(os.path.join(self.ca_request_dir, hash), 'w'))
-    return key, certificate
-
-  def installStunnel(self, public_ip, private_ip, public_port, private_port,
-      ca_certificate, key, ca_crl, ca_path):
-    """Installs stunnel"""
-    template_filename = self.getTemplateFilename('stunnel.conf.in')
-    log = os.path.join(self.log_directory, 'stunnel.log')
-    pid_file = os.path.join(self.run_directory, 'stunnel.pid')
-    stunnel_conf = dict(
-        public_ip=public_ip,
-        private_ip=private_ip,
-        public_port=public_port,
-        pid_file=pid_file,
-        log=log,
-        cert = ca_certificate,
-        key = key,
-        ca_crl = ca_crl,
-        ca_path = ca_path,
-        private_port = private_port,
+    mysql_binary = self.options['mysql-binary']
+    socket = self.options['socket'],
+    post_rotate = self.createPythonScript(
+      self.options['logrotate-post'],
+      'slapos.recipe.librecipe.execute.execute',
+      [mysql_binary, '--no-defaults', '-B', '--socket=%s' % socket, '-e',
+       'FLUSH LOGS']
     )
-    stunnel_conf_path = self.createConfigurationFile("stunnel.conf",
-        self.substituteTemplate(template_filename,
-          stunnel_conf))
-    self.path_list.append(stunnel_conf_path)
-    wrapper = zc.buildout.easy_install.scripts([('stunnel',
-      'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws,
-      sys.executable, self.wrapper_directory, arguments=[
-        [self.options['stunnel_binary'].strip(), stunnel_conf_path],
-        [ca_certificate, key]]
-      )[0]
-    self.path_list.append(wrapper)
-    return stunnel_conf
-
+    path_list.append(post_rotate)
 
-  def installMysqlServer(self, ip, port, database='db', user='user',
-      template_filename=None, mysql_conf=None):
-    if mysql_conf is None:
-      mysql_conf = {}
-    backup_directory = self.createBackupDirectory('mysql')
-    if template_filename is None:
-      template_filename = self.getTemplateFilename('my.cnf.in')
-    error_log = os.path.join(self.log_directory, 'mysqld.log')
-    slow_query_log = os.path.join(self.log_directory, 'mysql-slow.log')
-    mysql_conf.update(
-        ip=ip,
-        data_directory=os.path.join(self.data_root_directory,
-          'mysql'),
-        tcp_port=port,
-        pid_file=os.path.join(self.run_directory, 'mysqld.pid'),
-        socket=os.path.join(self.run_directory, 'mysqld.sock'),
-        error_log=error_log,
-        slow_query_log=slow_query_log,
-        mysql_database=database,
-        mysql_user=user,
-        mysql_password=self.generatePassword(),
+    mysql_conf_file = self.createFile(
+      self.options['conf-file'],
+      self.substituteTemplate(template_filename, mysql_conf)
     )
-    self.registerLogRotation('mysql', [error_log, slow_query_log],
-        '%(mysql_binary)s --no-defaults -B --user=root '
-        '--socket=%(mysql_socket)s -e "FLUSH LOGS"' % dict(
-          mysql_binary=self.options['mysql_binary'],
-          mysql_socket=mysql_conf['socket']))
-    self._createDirectory(mysql_conf['data_directory'])
-
-    mysql_conf_path = self.createConfigurationFile("my.cnf",
-        self.substituteTemplate(template_filename,
-          mysql_conf))
+    path_list.append(mysql_conf_file)
 
     mysql_script_list = []
-    mysql_script_list.append(pkg_resources.resource_string(__name__,
-                   'template/initmysql.sql.in') % {
-                      'mysql_database': mysql_conf['mysql_database'],
-                      'mysql_user': mysql_conf['mysql_user'],
-                      'mysql_password': mysql_conf['mysql_password']})
+
+    init_script = self.substituteTemplate(
+      self.getTemplateFilename('initmysql.sql.in'),
+      {
+        'mysql_database': mysql_conf['mysql_database'],
+        'mysql_user': mysql_conf['mysql_user'],
+        'mysql_password': mysql_conf['mysql_password']
+      }
+    )
+    mysql_script_list.append(init_script)
     mysql_script_list.append('EXIT')
     mysql_script = '\n'.join(mysql_script_list)
-    self.path_list.extend(zc.buildout.easy_install.scripts([('mysql_update',
-      __name__ + '.mysql', 'updateMysql')], self.ws,
-      sys.executable, self.wrapper_directory, arguments=[dict(
+
+    mysql_upgrade_binary = self.options['mysql-upgrade-binary']
+    mysql_update = self.createPythonScript(
+      self.options['update-wrapper'],
+      '%s.mysql.updateMysql' % __name__,
+      dict(
         mysql_script=mysql_script,
-        mysql_binary=self.options['mysql_binary'].strip(),
-        mysql_upgrade_binary=self.options['mysql_upgrade_binary'].strip(),
-        socket=mysql_conf['socket'],
-        )]))
-    self.path_list.extend(zc.buildout.easy_install.scripts([('mysqld',
-      __name__ + '.mysql', 'runMysql')], self.ws,
-        sys.executable, self.wrapper_directory, arguments=[dict(
-        mysql_install_binary=self.options['mysql_install_binary'].strip(),
-        mysqld_binary=self.options['mysqld_binary'].strip(),
-        data_directory=mysql_conf['data_directory'].strip(),
-        mysql_binary=self.options['mysql_binary'].strip(),
-        socket=mysql_conf['socket'].strip(),
-        configuration_file=mysql_conf_path,
-       )]))
-    self.path_list.extend([mysql_conf_path])
+        mysql_binary=mysql_binary,
+        mysql_upgrade_binary=mysql_upgrade_binary,
+        socket=socket,
+      )
+    )
+    path_list.append(mysql_update)
+
+    mysqld_binary = self.options['mysqld-binary']
+    mysqld = self.createPythonScript(
+      self.options['wrapper'],
+      '%s.mysql.runMysql' % __name__,
+      dict(
+        mysql_install_binary=self.options['mysql-install-binary'],
+        mysqld_binary=mysqld_binary,
+        data_directory=mysql_conf['data_directory'],
+        mysql_binary=mysql_binary,
+        socket=socket,
+        configuration_file=mysql_conf_file,
+       )
+    )
+    path_list.append(mysqld)
 
     # backup configuration
-    backup_directory = self.createBackupDirectory('mysql')
-    tmp_backup_directory = self.createBackupDirectory('mysql_pending')
-    mysqldump_cmdline_list = [self.options['mysqldump_binary'],
-                              mysql_conf['mysql_database'],
-                              '-u', 'root',
-                              '-S', mysql_conf['socket'].strip(),
-                              '--single-transaction', '--opt',
-                             ]
-    mysqldump_cmdline_str = ' '.join(
-      [self.parseCmdArgument(arg) for arg in mysqldump_cmdline_list]
-    )
-    dump_filename = 'dump.sql.gz'
+    mysqldump_binary = self.options['mysqldump-binary']
+    backup_directory = self.options['backup-directory']
+    pending_backup_dir = self.options['backup-pending-directory']
+    dump_filename = self.options['dumpname']
+
+    mysqldump_cmd = [mysqldump_binary,
+                     mysql_conf['mysql_database'],
+                     '-u', 'root',
+                     '-S', mysql_conf['socket'].strip(),
+                     '--single-transaction', '--opt',
+                    ]
     dump_file = os.path.join(backup_directory, dump_filename)
-    tmpdump_file = os.path.join(tmp_backup_directory, dump_filename)
-    mysql_backup_cron = os.path.join(self.cron_d, 'mysql_backup')
-    with open(mysql_backup_cron, 'w') as file_:
-      file_.write('0 0 * * * %(mysqldump)s | %(gzip)s > %(tmpdump)s' \
-                  '&& mv -f %(tmpdump)s %(dumpfile)s' % {
-                    'mysqldump': mysqldump_cmdline_str,
-                    'gzip': self.options['gzip_binary'],
-                    'tmpdump': self.parseCmdArgument(tmpdump_file),
-                    'dumpfile': self.parseCmdArgument(dump_file),
-                  }
-                 )
-    self.path_list.append(mysql_backup_cron)
-    mysql_conf.update(backup_directory=backup_directory)
-    # Remote backup
-    if self.software_type in ['Backuped', 'Recover']:
-      remote_url = self.parameter_dict['remote_backup']
-      remote_backup_bin = zc.buildout.easy_install.scripts([('remote_backup',
-        'slapos.recipe.librecipe.execute', 'execute')], self.ws,
-        sys.executable, self.bin_directory, arguments=[
-          self.options['duplicity_binary'], '--no-encryption',
-          backup_directory, remote_url]
-        )[0]
-      self.path_list.append(remote_backup_bin)
-      remote_backup_cron = os.path.join(self.cron_d, 'remote_backup')
-      self.path_list.append(remote_backup_cron)
-      with open(remote_backup_cron, 'w') as file_:
-        file_.write('1 0 * * * %s' % self.parseCmdArgument(
-          remote_backup_bin))
-    if self.software_type == 'Recover':
-      zc.buildout.easy_install.scripts([('import_backup',
-        __name__+'.recover', 'import_remote_dump')], self.ws,
-        sys.executable, self.wrapper_directory, arguments={
+    tmpdump_file = os.path.join(pending_backup_dir, dump_filename)
+    backup_script = self.createPythonScript(
+      self.options['backup-script'],
+      '%s.backup.do_backup' % __name__,
+      {
+        'mysqldump': mysqldump_cmd,
+        'gzip': self.options['gzip-binary'],
+        'tmpdump': tmpdump_file,
+        'dumpfile': dump_file,
+      },
+    )
+    path_list.append(backup_script)
+
+    # Recovering backup
+    if self.optionIsTrue('recovering', default=False):
+      recovering_script = self.createPythonScript(
+        self.options['recovering-wrapper'],
+        '%s.recover.import_remote_dump' % __name__,
+        {
           'lock_file': os.path.join(self.work_directory,
                                     'import_done'),
           'database': mysql_conf['mysql_database'],
-          'mysql_binary': self.options['mysql_binary'],
+          'mysql_binary': self.options['mysql-binary'],
           'mysql_socket': mysql_conf['socket'],
-          'duplicity_binary': self.options['duplicity_binary'],
-          'remote_backup': remote_url,
-          'local_directory': backup_directory,
+          'duplicity_binary': self.options['duplicity-binary'],
+          'remote_backup': self.parameter_dict['remote-backup'],
+          'local_directory': self.mysql_backup_directory,
           'dump_name': dump_filename,
-          'zcat_binary': self.options['zcat_binary'],
-        })
-    # The return could be more explicit database, user ...
-    return mysql_conf
+          'zcat_binary': self.options['zcat-binary'],
+        }
+      )
+      path_list.append(recovering_script)
+
+
+    return path_list
diff --git a/slapos/recipe/mysql/backup.py b/slapos/recipe/mysql/backup.py
new file mode 100644
index 0000000000000000000000000000000000000000..590771d6b73a33bf8014c8b15b6a60fb2ba905aa
--- /dev/null
+++ b/slapos/recipe/mysql/backup.py
@@ -0,0 +1,25 @@
+import subprocess
+import os
+
+# Replace mysqldump | gzip > tmpdump && mv -f tmpdump dumpfile
+def do_backup(kwargs):
+  mysqldump_cmd = kwargs['mysqldump']
+  gzip_bin = kwargs['gzip']
+  tmpdump = kwargs['tmpdump']
+  dumpfile = kwargs['dumpfile']
+
+  # mysqldump | gzip > tmpdump
+  with open(tmpdump, 'w') as output:
+    mysqldump = subprocess.Popen(mysqldump_cmd,
+                                 stdout=subprocess.PIPE,
+                                 stderr=subprocess.STDOUT)
+    gzip = subprocess.Popen([gzip_bin],
+                            stdin=mysqldump.stdout,
+                            stdout=output,
+                            stderr=subprocess.STDOUT)
+    mysqldump.stdout.close()
+
+    if gzip.wait() != 0:
+      raise ValueError("Gzip return a non zero value.")
+
+  os.rename(tmpdump, dumpfile)
diff --git a/slapos/recipe/mysql/mysql.py b/slapos/recipe/mysql/mysql.py
index 34d3da043bc27799f41c6c046e244c0aeb970f02..24812bc8503756845f016acd07089819bfdf66d9 100644
--- a/slapos/recipe/mysql/mysql.py
+++ b/slapos/recipe/mysql/mysql.py
@@ -4,9 +4,8 @@ import time
 import sys
 
 
-def runMysql(args):
+def runMysql(conf):
   sleep = 60
-  conf = args[0]
   mysqld_wrapper_list = [conf['mysqld_binary'], '--defaults-file=%s' %
       conf['configuration_file']]
   # we trust mysql_install that if mysql directory is available mysql was
@@ -35,8 +34,7 @@ def runMysql(args):
   os.execl(mysqld_wrapper_list[0], *mysqld_wrapper_list)
 
 
-def updateMysql(args):
-  conf = args[0]
+def updateMysql(conf):
   sleep = 30
   is_succeed = False
   while True:
diff --git a/slapos/recipe/mysql/template/logrotate_entry.in b/slapos/recipe/mysql/template/logrotate_entry.in
deleted file mode 100644
index bfa2abf0970af28f8cab98793db9b09db85d1847..0000000000000000000000000000000000000000
--- a/slapos/recipe/mysql/template/logrotate_entry.in
+++ /dev/null
@@ -1,13 +0,0 @@
-%(file_list)s {
-  daily
-  dateext
-  rotate 30
-  compress
-  notifempty
-  sharedscripts
-  create
-  postrotate
-    %(postrotate)s
-  endscript
-  olddir %(olddir)s
-}
diff --git a/slapos/recipe/mysql/template/stunnel.conf.in b/slapos/recipe/mysql/template/stunnel.conf.in
deleted file mode 100644
index 81aacdd78690b618ca64ae3a2bdba6108ff60934..0000000000000000000000000000000000000000
--- a/slapos/recipe/mysql/template/stunnel.conf.in
+++ /dev/null
@@ -1,12 +0,0 @@
-foreground = yes
-output = %(log)s
-pid = %(pid_file)s
-syslog = no
-CApath = %(ca_path)s
-key = %(key)s
-CRLpath = %(ca_crl)s
-cert = %(cert)s
-
-[service]
-accept = %(public_ip)s:%(public_port)s
-connect = %(private_ip)s:%(private_port)s
diff --git a/slapos/recipe/publishurl.py b/slapos/recipe/publishurl.py
new file mode 100644
index 0000000000000000000000000000000000000000..98655433a986cc414050498cf0933e5fae7fd5e0
--- /dev/null
+++ b/slapos/recipe/publishurl.py
@@ -0,0 +1,69 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import zc.buildout
+
+from slapos.recipe.librecipe import GenericSlapRecipe
+
+class Recipe(GenericSlapRecipe):
+
+  def _options(self, options):
+
+    self.useparts = True
+
+    if 'url' in options:
+      self.useparts = False
+      self.url = options['url']
+    else:
+      self.urlparts = {}
+
+      if 'scheme' not in options:
+        raise zc.buildout.UserError("No scheme specified.")
+      else:
+        self.urlparts.update(scheme=options['scheme'])
+      if 'host' not in options:
+        raise zc.buildout.UserError("No host specified.")
+      else:
+        self.urlparts.update(host=options['host'])
+
+  def _install(self):
+
+    if self.useparts:
+      for option in ['path', 'params', 'query', 'fragment', 'port']:
+        if option in self.options:
+          self.urlparts[option] = self.options[option]
+
+      if 'user' in self.options:
+        self.urlparts.update(auth=(self.options['user'],))
+        if 'password' in self.options:
+          self.urlparts.update(auth=(self.options['user'],
+                                     self.options['password']))
+
+      self.setConnectionUrl(**self.urlparts)
+    else:
+      self.setConnectionDict(dict(url=self.url))
+
+    return []
diff --git a/slapos/recipe/request.py b/slapos/recipe/request.py
new file mode 100644
index 0000000000000000000000000000000000000000..66de7394bdac9e8564661ede2866d2b0009b209e
--- /dev/null
+++ b/slapos/recipe/request.py
@@ -0,0 +1,96 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import logging
+import os
+
+from slapos import slap as slapmodule
+
+class Recipe(object):
+
+  def parseMultiValues(self, string):
+    return dict([ [str(column).strip() for column in line.split('=', 1)]
+                 for line in str(string).splitlines() if '=' in line])
+
+  def __init__(self, buildout, name, options):
+    self.logger = logging.getLogger(name)
+
+    slap = slapmodule.slap()
+
+    slap_connection = buildout['slap_connection']
+    self.software_release_url = slap_connection['software_release_url']
+
+    # XXX: Dirty network interation stuff
+    slap.initializeConnection(slap_connection['server_url'],
+                              slap_connection.get('key_file'),
+                              slap_connection.get('cert_file'),
+                             )
+    computer_partition = slap.registerComputerPartition(
+      slap_connection['computer_id'], slap_connection['partition_id'])
+    self.request = computer_partition.request
+
+    if 'software-url' not in options:
+      options['software-url'] = self.software_release_url
+
+    if 'name' not in options:
+      options['name'] = name
+
+    self.return_parameters = []
+    if 'return' in options:
+      self.return_parameters = [str(parameter).strip()
+                               for parameter in options['return'].splitlines()]
+    else:
+      self.logger.warning("No parameter to return to main instance."
+                          "Be careful about that...")
+
+    software_type = 'RootInstanceSoftware'
+    if 'software-type' in options:
+      software_type = options['software-type']
+
+    filter_kw = {}
+    if 'sla' in options:
+      filter_kw = self.parseMultiValues(options['sla'])
+
+    partition_parameter_kw = {}
+    if 'config' in options:
+      partition_parameter_kw = self.parseMultiValues(options['config'])
+
+    instance = self.request(options['software-url'], software_type,
+      options['name'], partition_parameter_kw=partition_parameter_kw,
+        filter_kw=filter_kw)
+
+    result = {}
+    for param in self.return_parameters:
+      result[param] = instance.getConnectionParameter(param)
+
+    # Return the connections parameters in options dict
+    for key, value in result.items():
+      options['connection-%s' % key] = value
+
+  def install(self):
+    return []
+
+  update = install
diff --git a/slapos/recipe/simplelogger.py b/slapos/recipe/simplelogger.py
new file mode 100644
index 0000000000000000000000000000000000000000..494ef81f1b8278783dc8c7bc0a4384c6d01f1e59
--- /dev/null
+++ b/slapos/recipe/simplelogger.py
@@ -0,0 +1,54 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import shutil
+import os
+import sys
+import time
+
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+def log(args):
+  directory, suffix = args
+  filename = time.strftime('%Y-%m-%d.%H:%M.%s') + suffix
+  with open(os.path.join(directory, filename), 'aw') as logfile:
+    shutil.copyfileobj(sys.stdin, logfile)
+
+class Recipe(GenericBaseRecipe):
+
+  def install(self):
+    self.logger.info("Simple logger installation")
+    binary = self.options['binary']
+    output = self.options['output']
+    suffix = self.options.get('suffix', '.log')
+
+    script = self.createPythonScript(binary,
+                                     'slapos.recipe.simplelogger.log',
+                                     arguments=[output, suffix])
+    self.logger.debug("Logger script created at : %r", script)
+    self.logger.info("Simple logger installed.")
+
+    return [script]
diff --git a/slapos/recipe/softwaretype.py b/slapos/recipe/softwaretype.py
new file mode 100644
index 0000000000000000000000000000000000000000..661adfbe1f3d9c851472744b5e690ffd848c26d3
--- /dev/null
+++ b/slapos/recipe/softwaretype.py
@@ -0,0 +1,134 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+import os
+import sys
+import copy
+from ConfigParser import ConfigParser
+import subprocess
+import slapos.slap
+import netaddr
+import logging
+
+import zc.buildout
+
+class Recipe:
+
+  def __init__(self, buildout, name, options):
+    self.buildout = buildout
+    self.options = options
+    self.name = name
+    self.logger = logging.getLogger(self.name)
+
+  def _getIpAddress(self, test_method):
+    """Internal helper method to fetch ip address"""
+    if not 'ip_list' in self.parameter_dict:
+      raise AttributeError
+    for name, ip in self.parameter_dict['ip_list']:
+      if test_method(ip):
+        return ip
+    raise AttributeError
+
+  def getLocalIPv4Address(self):
+    """Returns local IPv4 address available on partition"""
+    # XXX: Lack checking for locality of address
+    return self._getIpAddress(netaddr.valid_ipv4)
+
+  def getGlobalIPv6Address(self):
+    """Returns global IPv6 address available on partition"""
+    # XXX: Lack checking for globality of address
+    return self._getIpAddress(netaddr.valid_ipv6)
+
+  def install(self):
+    slap = slapos.slap.slap()
+    slap_connection = self.buildout['slap_connection']
+    computer_id = slap_connection['computer_id']
+    computer_partition_id = slap_connection['partition_id']
+    server_url = slap_connection['server_url']
+    key_file = slap_connection.get('key_file')
+    cert_file = slap_connection.get('cert_file')
+    slap.initializeConnection(server_url, key_file, cert_file)
+    self.computer_partition = slap.registerComputerPartition(
+      computer_id,
+      computer_partition_id)
+    self.parameter_dict = self.computer_partition.getInstanceParameterDict()
+    software_type = self.parameter_dict['slap_software_type']
+
+    if software_type not in self.options:
+      if 'default' in self.options:
+        software_type = 'default'
+      else:
+        raise zc.buildout.UserError("This software type isn't mapped. And"
+                                    "there's no default software type.")
+
+    instance_file_path = self.options[software_type]
+
+    if not os.path.exists(instance_file_path):
+      raise zc.buildout.UserError("The specified buildout config file does not"
+                                  "exist.")
+
+    buildout = ConfigParser()
+    with open(instance_file_path) as instance_path:
+      buildout.readfp(instance_path)
+
+    buildout.set('buildout', 'installed',
+                 '.installed-%s.cfg' % software_type)
+
+    buildout.add_section('slap-parameter')
+    for parameter, value in self.parameter_dict.items():
+      buildout.set('slap-parameter', parameter, value)
+
+    buildout.add_section('slap-network-information')
+    buildout.set('slap-network-information', 'local-ipv4', 
+                 self.getLocalIPv4Address())
+    buildout.set('slap-network-information', 'global-ipv6', 
+                 self.getGlobalIPv6Address())
+
+    # Copy/paste slap_connection
+    buildout.add_section('slap-connection')
+    for key, value in self.buildout['slap_connection'].iteritems():
+      # XXX: Waiting for SlapBaseRecipe to use dash instead of underscores
+      buildout.set('slap-connection', key.replace('_', '-'), value)
+
+    work_directory = os.path.abspath(self.buildout['buildout'][
+      'directory'])
+    buildout_filename = os.path.join(work_directory,
+                                     'buildout-%s.cfg' % software_type)
+    with open(buildout_filename, 'w') as buildout_file:
+      buildout.write(buildout_file)
+
+    # XXX-Antoine: We gotta find a better way to do this. I tried to check
+    # out how slapgrid-cp was running buildout. But it is worse than that.
+    command_line_args = copy.copy(sys.argv) + ['-c', buildout_filename]
+
+    self.logger.info("Invoking commandline : '%s'",
+                     ' '.join(command_line_args))
+
+    subprocess.check_call(command_line_args, cwd=work_directory,
+                          env=os.environ.copy())
+    return []
+  update = install
diff --git a/slapos/recipe/stunnel/__init__.py b/slapos/recipe/stunnel/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..06bad67a21d0942f8d2077777083ea709c86a0d4
--- /dev/null
+++ b/slapos/recipe/stunnel/__init__.py
@@ -0,0 +1,94 @@
+##############################################################################
+#
+# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+import itertools
+
+import zc.buildout
+
+from slapos.recipe.librecipe import GenericBaseRecipe
+
+class Recipe(GenericBaseRecipe):
+
+  def _options(self, options):
+    self.types = ['local', 'remote']
+    self.datas = ['address', 'port']
+    for type_ in self.types:
+      for data in self.datas:
+        opt = '%s-%s' % (type_, data)
+        if opt not in options:
+          raise zc.buildout.UserError("No %s for %s connections." % (data, type_))
+
+    self.isClient = self.optionIsTrue('client', default=False)
+    if self.isClient:
+      self.logger.info("Client mode")
+    else:
+      self.logger.info("Server mode")
+
+    if 'name' not in options:
+      options['name'] = self.name
+
+
+  def install(self):
+    path_list = []
+    conf = {}
+
+    gathered_options = ['%s-%s' % option
+                       for option in itertools.product(self.types,
+                                                        self.datas)]
+    for option in gathered_options:
+      # XXX: Because the options are using dash and the template uses
+      # underscore
+      conf[option.replace('-', '_')] = self.options[option]
+
+    pid_file = self.options['pid-file']
+    conf.update(pid_file=pid_file)
+    path_list.append(pid_file)
+
+    log_file = self.options['log-file']
+    conf.update(log=log_file)
+
+    if self.isClient:
+      template = self.getTemplateFilename('client.conf.in')
+
+    else:
+      template = self.getTemplateFilename('server.conf.in')
+      key = self.options['key-file']
+      cert = self.options['cert-file']
+      conf.update(key=key, cert=cert)
+
+    conf_file = self.createFile(
+      self.options['config-file'],
+      self.substituteTemplate(template, conf))
+    path_list.append(conf_file)
+
+    wrapper = self.createPythonScript(
+      self.options['wrapper'],
+      'slapos.recipe.librecipe.execute.execute',
+      [self.options['stunnel-binary'], conf_file]
+    )
+    path_list.append(wrapper)
+
+    return path_list
diff --git a/slapos/recipe/stunnel/template/client.conf.in b/slapos/recipe/stunnel/template/client.conf.in
new file mode 100644
index 0000000000000000000000000000000000000000..f72634ec3d8f258c5b7caf4ea1e8adf47e9f8847
--- /dev/null
+++ b/slapos/recipe/stunnel/template/client.conf.in
@@ -0,0 +1,9 @@
+foreground = yes
+output = %(log)s
+pid = %(pid_file)s
+syslog = no
+
+[service]
+client = yes
+accept = %(local_host)s:%(local_port)s
+connect = %(remote_host)s:%(remote_port)s
diff --git a/slapos/recipe/stunnel/template/server.conf.in b/slapos/recipe/stunnel/template/server.conf.in
new file mode 100644
index 0000000000000000000000000000000000000000..e53bbc5c11aadee509cae300a54086d1b957cc4b
--- /dev/null
+++ b/slapos/recipe/stunnel/template/server.conf.in
@@ -0,0 +1,10 @@
+foreground = yes
+output = %(log)s
+pid = %(pid_file)s
+syslog = no
+key = %(key)s
+cert = %(cert)s
+
+[service]
+accept = %(remote_address)s:%(remote_port)s
+connect = %(local_address)s:%(local_port)s
diff --git a/software/MediaWiki/instance.cfg b/software/MediaWiki/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/MediaWiki/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/MediaWiki/patch/mediawiki-1.17.0.config.patch b/software/MediaWiki/patch/mediawiki-1.17.0.config.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1dfb65c42857d1aac564fe41dd1be3bc32e1da74
--- /dev/null
+++ b/software/MediaWiki/patch/mediawiki-1.17.0.config.patch
@@ -0,0 +1,10 @@
+--- old/includes/installer/WebInstaller.php	2011-10-11 11:36:29.173220293 +0100
++++ new/includes/installer/WebInstaller.php	2011-10-11 11:34:32.000000000 +0100
+@@ -152,6 +152,7 @@
+ 				$ls->setGroupRights( $group, $rightsArr );
+ 			}
+ 			echo $ls->getText();
++			file_put_contents(realpath(".") . "/LocalSettings.php", $ls->getText());
+ 			return $this->session;
+ 		}
+ 
diff --git a/software/MediaWiki/software.cfg b/software/MediaWiki/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..80fd48c2083d807d336b0fa8eebca38c110d41ce
--- /dev/null
+++ b/software/MediaWiki/software.cfg
@@ -0,0 +1,84 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  mediawiki-patch
+  patch
+
+
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[mediawiki-patch]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/patch/mediawiki-1.17.0.config.patch
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+filename = mediawiki-1.17.0.config.patch
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://download.wikimedia.org/mediawiki/1.17/mediawiki-1.17.0.tar.gz
+md5sum = 871a00a8eb6dcae1b7b654ae635af7cd
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[patch]
+recipe = iw.recipe.cmd
+on_install = true
+on_update = true
+cmds= patch -d ${application:location} -p1 < ${mediawiki-patch:location}/${mediawiki-patch:filename}
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/mediawiki.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/MediaWiki/template/mediawiki.inc.php.in b/software/MediaWiki/template/mediawiki.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/MediaWiki/template/mediawiki.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/SilverStripe/instance.cfg b/software/SilverStripe/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/SilverStripe/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/SilverStripe/software.cfg b/software/SilverStripe/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..415704635a9fb5b9ad82ca763f33dd2480db3bd1
--- /dev/null
+++ b/software/SilverStripe/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.5.tar.gz
+md5sum = de6ab0146c27bbc72287670e0697e2ba
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/silverstripe.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/SilverStripe/template/silverstripe.inc.php.in b/software/SilverStripe/template/silverstripe.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/SilverStripe/template/silverstripe.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/b2evolution/instance.cfg b/software/b2evolution/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/b2evolution/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/b2evolution/software.cfg b/software/b2evolution/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..6d1d82860ced6c8c731224758636a948cda377f1
--- /dev/null
+++ b/software/b2evolution/software.cfg
@@ -0,0 +1,70 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = slapos.recipe.build
+url = http://freefr.dl.sourceforge.net/project/evocms/b2evolution/b2evo%204.1.1-stable/b2evolution-4.1.1-stable-2011-10-03.zip
+md5sum = 63c771f43f0c40ff822fe80234be42e1
+script =
+  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
+  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
+  workdir = guessworkdir(extract_dir)
+  self.copyTree(workdir + "/blogs", "${buildout:parts-directory}/${:_buildout_section_name_}")
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/b2evolution.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/b2evolution/template/b2evolution.inc.php.in b/software/b2evolution/template/b2evolution.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/b2evolution/template/b2evolution.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/cmsmadesimple/instance.cfg b/software/cmsmadesimple/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/cmsmadesimple/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/cmsmadesimple/software.cfg b/software/cmsmadesimple/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..3b7ca282f218478945ea5b90f9862d770faa427f
--- /dev/null
+++ b/software/cmsmadesimple/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://s3.amazonaws.com/cmsms/downloads/7908/cmsmadesimple-1.9.4.3-english.tar.gz
+#md5sum = Student may put here md5sum of this file, this is good idea
+#If provided tarball does not contain top directory, option shall be changed to false
+strip-top-level-dir = false
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/cssmadesimple.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
\ No newline at end of file
diff --git a/software/cmsmadesimple/template/cssmadesimple.inc.php.in b/software/cmsmadesimple/template/cssmadesimple.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/cmsmadesimple/template/cssmadesimple.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/coppermine/instance.cfg b/software/coppermine/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/coppermine/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/coppermine/software.cfg b/software/coppermine/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..d18744c8098d1dd9a9e14c9cf815b41447489fdf
--- /dev/null
+++ b/software/coppermine/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://freefr.dl.sourceforge.net/project/coppermine/Coppermine/1.5.x/cpg1.5.16.zip
+md5sum = 76402aea7821aaaf67c571869373186e
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/coppermine.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/coppermine/template/coppermine.inc.php.in b/software/coppermine/template/coppermine.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/coppermine/template/coppermine.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/davstorage/instance-davstorage.cfg b/software/davstorage/instance-davstorage.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..6f37cef809e182f000d1c06c3fe6c24a096b697f
--- /dev/null
+++ b/software/davstorage/instance-davstorage.cfg
@@ -0,0 +1,32 @@
+[buildout]
+parts =
+  davstorage
+
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+offline = true
+
+[davstorage]
+recipe = slapos.cookbook:davstorage
+# Binaries
+dcrond_binary = ${dcron:location}/sbin/crond
+logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
+apache_binary = ${apache:location}/bin/httpd
+apache_modules_dir = ${apache:location}/modules/
+apache_mime_file = ${apache:location}/conf/mime.types
+apache_htpasswd = ${apache:location}/bin/htpasswd
+# Real configuration
+key_file = $${certificate_authority:certificate_authority_dir}/davstorage.key
+cert_file = $${certificate_authority:certificate_authority_dir}/davstorage.crt
+
+# [ca]
+# recipe = slapos.cookbook:ca
+# openssl_binary = ${openssl:location}/bin/openssl
+# certificate_authority_dir = $${directory:srv}/ssl/
+# 
+# [ca-davstorage]
+# recipe = slapos.cookbook:part
+# part = $${certificate_authority:part}
+# parameters =
+#   key_file=$${davstorage:key_file}
+#   cert_file=$${davstorage:cert_file}
diff --git a/software/davstorage/instance.cfg b/software/davstorage/instance.cfg
index e5758028083ffc3d0da95d2850219a0342ed3e7a..ab6ea8ae8e01e2a2dcfbfeba9561843b463087de 100644
--- a/software/davstorage/instance.cfg
+++ b/software/davstorage/instance.cfg
@@ -1,16 +1,12 @@
 [buildout]
+
 parts =
-  instance
+  switch_softwaretype
 
 eggs-directory = ${buildout:eggs-directory}
 develop-eggs-directory = ${buildout:develop-eggs-directory}
+offline = true
 
-[instance]
-recipe = ${instance-recipe:egg}:${instance-recipe:module}
-dcrond_binary = ${dcron:location}/sbin/crond
-logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
-apache_binary = ${apache:location}/bin/httpd
-apache_modules_dir = ${apache:location}/modules/
-apache_mime_file = ${apache:location}/conf/mime.types
-apache_htpasswd = ${apache:location}/bin/htpasswd
-openssl_binary = ${openssl:location}/bin/openssl
+[switch_softwaretype]
+recipe = slapos.cookbook:softwaretype
+default = ${instance_davstorage:output}
diff --git a/software/davstorage/software.cfg b/software/davstorage/software.cfg
index e925ad6e13f5e0c13f0d4252bf57466a05130424..9596a1bfd895c9d914679e4b770b8de7d886429f 100644
--- a/software/davstorage/software.cfg
+++ b/software/davstorage/software.cfg
@@ -55,15 +55,22 @@ eggs = ${instance-recipe:egg}
 # Default template for the instance.
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance.cfg
-md5sum = 51b6213889573ae7b1dec0bd65384432
+md5sum = 4c79e2e42704a2ffe5eebfa0b2e70e28
 output = ${buildout:directory}/template.cfg
 mode = 0644
 
+[instance_davstorage]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance-davstorage.cfg
+md5sum = 009103c87c8d31fb758e7a0782e77723
+output = ${buildout:directory}/template-davstorage.cfg
+mode = 0644
+
 [lxml-python]
 python = python2.7
 
 [versions]
-zc.buildout = 1.5.3-dev-SlapOS-010
+zc.buildout = 1.6.0-dev-SlapOS-002
 Jinja2 = 2.6
 Werkzeug = 0.7.1
 buildout-versions = 1.6
@@ -71,7 +78,6 @@ hexagonit.recipe.cmmi = 1.5.0
 hexagonit.recipe.download = 1.5.0
 meld3 = 0.6.7
 slapos.cookbook = 0.26
-slapos.recipe.template = 1.1
 
 # Required by:
 # slapos.core==0.14
diff --git a/software/dotclear/instance.cfg b/software/dotclear/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/dotclear/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/dotclear/software.cfg b/software/dotclear/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..a7fd4704c153fb22349e7f9b559ae723f828d786
--- /dev/null
+++ b/software/dotclear/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://download.dotclear.net/latest-2.0.tar.gz
+md5sum = 98263b4734f93b7c54d3ab436bf344e3
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/dotclear.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/dotclear/template/dotclear.inc.php.in b/software/dotclear/template/dotclear.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/dotclear/template/dotclear.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/dotproject/instance.cfg b/software/dotproject/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/dotproject/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/dotproject/software.cfg b/software/dotproject/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..f3aab2a07897961dba3569023fb96bae8f5b384f
--- /dev/null
+++ b/software/dotproject/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://downloads.sourceforge.net/project/dotproject/dotproject/dotProject%20Version%202.1.5/dotproject-2.1.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fdotproject%2F&ts=1315317307&use_mirror=freefr
+md5sum = d283fad3fc541e7ffda07151efc64bf8
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/config.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/dotproject/template/config.inc.php.in b/software/dotproject/template/config.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/dotproject/template/config.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/drupal/instance.cfg b/software/drupal/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/drupal/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/drupal/software.cfg b/software/drupal/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..f956809838832233580ec142b09b8f1024e84cd7
--- /dev/null
+++ b/software/drupal/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://ftp.drupal.org/files/projects/drupal-7.8.tar.gz
+md5sum = e0226b56e8d5c57c6b126e8ed5866b1f
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/config.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/drupal/template/config.inc.php.in b/software/drupal/template/config.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/drupal/template/config.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/eSKUeL/instance.cfg b/software/eSKUeL/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/eSKUeL/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/eSKUeL/software.cfg b/software/eSKUeL/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..c8e1f7eafbfa019980b18e82a0157cd4c2abbbb0
--- /dev/null
+++ b/software/eSKUeL/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.phptools4u.com/generated_content/download/eskuel.zip
+md5sum = c91f6f238be715f303911dd00f281b78
+#If provided tarball does not contain top directory, option shall be changed to false
+strip-top-level-dir = false
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/eskuel.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/eSKUeL/template/eskuel.inc.php.in b/software/eSKUeL/template/eskuel.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/eSKUeL/template/eskuel.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/ezpublish/instance.cfg b/software/ezpublish/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/ezpublish/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/ezpublish/software.cfg b/software/ezpublish/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..f50f9471861a7d64b5d77c0a2e0a96877acc8471
--- /dev/null
+++ b/software/ezpublish/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg 
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://share.ez.no/content/download/118008/553423/version/3/file/ezpublish_community_project-2011.8-with_ezc.tar.bz2
+md5sum = 76ea4e1de7a3f91c8d24ef3a221e0777
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/ezpublish.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/ezpublish/template/ezpublish.inc.php.in b/software/ezpublish/template/ezpublish.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/ezpublish/template/ezpublish.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/joomla/instance.cfg b/software/joomla/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/joomla/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/joomla/software.cfg b/software/joomla/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..cdab5864e9118ce5b887a356008511a7d92cab5d
--- /dev/null
+++ b/software/joomla/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://joomlacode.org/gf/download/frsrelease/15278/66554/Joomla_1.7.0-Stable-Full_Package.tar.gz
+md5sum = 19451c0352e4c72d871cc8817126286a
+#If provided tarball does not contain top directory, option shall be changed to false
+strip-top-level-dir = false
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/phpmyadmin.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/joomla/template/phpmyadmin.inc.php.in b/software/joomla/template/phpmyadmin.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/joomla/template/phpmyadmin.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/lamp-template-static/software.cfg b/software/lamp-template-static/software.cfg
index dcf92258e86ada246bcc42a19cf031fe158c8caa..4775b974a5369f59eaaa4da2bf953542e4ab4c3c 100644
--- a/software/lamp-template-static/software.cfg
+++ b/software/lamp-template-static/software.cfg
@@ -9,9 +9,8 @@ parts =
   downloadcache-workaround
 
 extends =
-  http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/stack/lamp.cfg
-  http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/component/apache/buildout.cfg
-  http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/stack/shacache-client.cfg
+  http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.50:/stack/lamp.cfg
+  http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.50:/stack/shacache-client.cfg
 
 [application]
 recipe = hexagonit.recipe.download
@@ -39,7 +38,12 @@ eggs = ${instance-recipe:egg}
 
 [versions]
 # Use SlapOS patched zc.buildout
-zc.buildout = 1.5.3-dev-SlapOS-005
+zc.buildout = 1.5.3-dev-SlapOS-010
+slapos.cookbook = 0.20
+
+# Temporary fix for slapos-0.50
+[lxml-python]
+find-links += http://pypi.python.org/pypi/lxml/2.3.1
 
 [downloadcache-workaround]
 # workaround irritating problem of hexagonit.recipe.cmmi which automatically
diff --git a/software/lamp-template/software.cfg b/software/lamp-template/software.cfg
index bf173d6340ef4c270fd61bf9c21ebe12e0ef3b2d..1b4c9065a2ccdfdc6e04cf8256d10eae4b534de5 100644
--- a/software/lamp-template/software.cfg
+++ b/software/lamp-template/software.cfg
@@ -10,8 +10,8 @@ parts =
   downloadcache-workaround
   
 extends =
-  http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/stack/lamp.cfg
-  http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/stack/shacache-client.cfg
+  http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.50:/stack/lamp.cfg
+  http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.50:/stack/shacache-client.cfg
 
 [application]
 recipe = hexagonit.recipe.download
@@ -31,7 +31,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
 
 [application-configuration]
 location = Student shall put here relative path to application top level directory where configuration shall be created
-  
+
 [instance-recipe]
 egg = slapos.cookbook
 module = lamp.simple
@@ -51,7 +51,7 @@ eggs = ${instance-recipe:egg}
 
 [versions]
 # Use SlapOS patched zc.buildout
-zc.buildout = 1.5.3-dev-SlapOS-005
+zc.buildout = 1.5.3-dev-SlapOS-010
 
 [downloadcache-workaround]
 # workaround irritating problem of hexagonit.recipe.cmmi which automatically
diff --git a/software/magento/instance.cfg b/software/magento/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/magento/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/magento/software.cfg b/software/magento/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..727232f3f2c5b5f36be4379bc08fa1fa85e8ae75
--- /dev/null
+++ b/software/magento/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.magentocommerce.com/downloads/assets/1.6.0.0/magento-1.6.0.0.tar.gz
+md5sum = 7415eb1c70b7694ab632326d9fcc850a
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/magento.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/magento/template/magento.inc.php.in b/software/magento/template/magento.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/magento/template/magento.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/mariadb/instance-mariadb.cfg b/software/mariadb/instance-mariadb.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..6ef3a5e5dc978ebb327f2de948daa4550b19e41e
--- /dev/null
+++ b/software/mariadb/instance-mariadb.cfg
@@ -0,0 +1,179 @@
+[buildout]
+parts =
+  url
+  mariadb
+  stunnel
+  certificate-authority
+  logrotate
+  logrotate-entry-mariadb
+  cron
+  cron-entry-logrotate
+  cron-entry-mariadb-backup
+
+gzip-binary = ${gzip:location}/bin/gzip
+
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+offline = true
+
+[url]
+recipe = slapos.cookbook:publishurl
+url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-address}]:$${stunnel:remote-port}/$${mariadb:database}
+
+[mariadb]
+recipe = slapos.cookbook:mysql
+
+# Options
+recovering = false
+user = user
+port = 3306
+ip = $${slap-network-information:local-ipv4}
+database = db
+
+# Paths
+wrapper = $${basedirectory:services}/mariadb
+update-wrapper = $${basedirectory:services}/mariadb_update
+backup-script = $${rootdirectory:bin}/mariadb_backup
+logrotate-post = $${rootdirectory:bin}/mariadb_post_logrotate
+backup-directory = $${directory:mariadb-backup}
+data-directory = $${directory:mariadb-data}
+pid-file = $${basedirectory:run}/mariadb.pid
+socket = $${basedirectory:run}/mariadb.sock
+error-log = $${basedirectory:log}/mariadb_error.log
+slow-query-log = $${basedirectory:log}/mariadb_slowquery.log
+conf-file = $${rootdirectory:etc}/mariadb.cnf
+backup-pending-directory = $${directory:mariadb-backup-pending}
+dumpname = dump.sql.gz
+
+# Binary information
+mysql-binary = ${mariadb:location}/bin/mysql
+mysql-install-binary = ${mariadb:location}/bin/mysql_install_db
+mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld-binary = ${mariadb:location}/libexec/mysqld
+mysqldump-binary = ${mariadb:location}/bin/mysqldump
+gzip-binary = $${buildout:gzip-binary}
+zcat-binary = ${gzip:location}/bin/zcat
+
+
+[certificate-authority]
+recipe = slapos.cookbook:certificate_authority
+openssl-binary = ${openssl:location}/bin/openssl
+ca-dir = $${directory:ca-dir}
+requests-directory = $${cadirectory:requests}
+wrapper = $${basedirectory:services}/ca
+ca-private = $${cadirectory:private}
+ca-certs = $${cadirectory:certs}
+ca-newcerts = $${cadirectory:newcerts}
+ca-crl = $${cadirectory:crl}
+
+[cadirectory]
+recipe = slapos.cookbook:mkdirectory
+requests = $${directory:ca-dir}/requests/
+private = $${directory:ca-dir}/private/
+certs = $${directory:ca-dir}/certs/
+newcerts = $${directory:ca-dir}/newcerts/
+crl = $${directory:ca-dir}/crl/
+
+[ca-stunnel]
+<= certificate-authority
+recipe = slapos.cookbook:certificate_authority.request
+key-file = $${directory:stunnel-conf}/stunnel.key
+cert-file = $${directory:stunnel-conf}/stunnel.crt
+executable = $${stunnel:wrapper}
+wrapper = $${basedirectory:services}/stunnel
+
+[stunnel]
+recipe = slapos.cookbook:stunnel
+stunnel-binary = ${stunnel:location}/bin/stunnel
+wrapper = $${rootdirectory:bin}/stunnel
+log-file = $${basedirectory:log}/stunnel.log
+config-file = $${rootdirectory:etc}/stunnel.conf
+key-file = $${ca-stunnel:key-file}
+cert-file = $${ca-stunnel:cert-file}
+pid-file = $${basedirectory:run}/stunnel.pid
+local-port = $${mariadb:port}
+local-address = $${mariadb:ip}
+remote-address = $${slap-network-information:global-ipv6}
+remote-port = 6446
+client = false
+
+[logrotate]
+recipe = slapos.cookbook:logrotate
+# Binaries
+logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
+gzip-binary = $${buildout:gzip-binary}
+gunzip-binary = ${gzip:location}/bin/gunzip
+# Directories
+wrapper = $${rootdirectory:bin}/logrotate
+conf = $${rootdirectory:etc}/logrotate.conf
+logrotate-entries = $${directory:logrotate-entries}
+backup = $${directory:logrotate-backup}
+state-file = $${rootdirectory:srv}/logrotate.status
+
+[logrotate-entry-mariadb]
+<= logrotate
+recipe = slapos.cookbook:logrotate.d
+name = mariadb
+log = $${mariadb:error-log} $${mariadb:slow-query-log}
+frequency = daily
+rotate-num = 30
+post = $${mariadb:logrotate-post}
+sharedscripts = true
+notifempty = true
+create = true
+
+[cron]
+recipe = slapos.cookbook:cron
+dcrond-binary = ${dcron:location}/sbin/crond
+cron-entries = $${directory:cron-entries}
+crontabs = $${directory:crontabs}
+cronstamps = $${directory:cronstamps}
+catcher = $${cron-simplelogger:binary}
+binary = $${basedirectory:services}/crond
+
+[cron-simplelogger]
+recipe = slapos.cookbook:simplelogger
+binary = $${rootdirectory:bin}/cron_simplelogger
+output = $${directory:cronoutput}
+
+[cron-entry-logrotate]
+<= cron
+recipe = slapos.cookbook:cron.d
+name = logrotate
+frequency = 0 0 * * *
+command = $${logrotate:wrapper}
+
+[cron-entry-mariadb-backup]
+<= cron
+recipe = slapos.cookbook:cron.d
+name = mariadb-backup
+frequency = 0 0 * * *
+command = $${mariadb:backup-script}
+
+[rootdirectory]
+recipe = slapos.cookbook:mkdirectory
+etc = $${buildout:directory}/etc/
+var = $${buildout:directory}/var/
+srv = $${buildout:directory}/srv/
+bin = $${buildout:directory}/bin/
+
+[basedirectory]
+recipe = slapos.cookbook:mkdirectory
+log = $${rootdirectory:var}/log/
+services = $${rootdirectory:etc}/run/
+run = $${rootdirectory:var}/run/
+backup = $${rootdirectory:srv}/backup/
+
+[directory]
+recipe = slapos.cookbook:mkdirectory
+cron-entries = $${rootdirectory:etc}/cron.d/
+crontabs = $${rootdirectory:etc}/crontabs/
+cronstamps = $${rootdirectory:etc}/cronstamps/
+cronoutput = $${basedirectory:log}/cron/
+ca-dir = $${rootdirectory:srv}/ssl/
+mariadb-backup = $${basedirectory:backup}/mariadb/
+mariadb-backup-pending = $${basedirectory:backup}/mariadb-pending/
+mariadb-data = $${rootdirectory:srv}/mariadb/
+logrotate-backup = $${basedirectory:backup}/logrotate/
+stunnel-conf = $${rootdirectory:etc}/stunnel/
+logrotate-entries = $${rootdirectory:etc}/logrotate.d/
diff --git a/software/mariadb/instance-recover.cfg b/software/mariadb/instance-recover.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffbe463d02378c2ca735954b4553d29e3c84697
--- /dev/null
+++ b/software/mariadb/instance-recover.cfg
@@ -0,0 +1,7 @@
+[buildout]
+extends =
+    ${instance-remotebackuped:output}
+
+[mariadb]
+recovering = true
+recovering-wrapper = $${basedirectory:services}/mariadb_recover
diff --git a/software/mariadb/instance-remotebackuped.cfg b/software/mariadb/instance-remotebackuped.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..4385aa183bf0aea9cbd7ddb0d3e752b9d214432f
--- /dev/null
+++ b/software/mariadb/instance-remotebackuped.cfg
@@ -0,0 +1,31 @@
+[buildout]
+extends =
+    ${instance-mariadb:output}
+
+parts =
+  url
+  mariadb
+  duplicity
+  stunnel
+  certificate-authority
+  logrotate
+  logrotate-entry-mariadb
+  cron
+  cron-entry-logrotate
+  cron-entry-mariadb-backup
+  cron-entry-duplicity
+
+[duplicity]
+recipe = slapos.cookbook:duplicity
+remote_backup = $${slap-parameter:remote-backup}
+directory = $${mariadb:backup-directory}
+duplicity_binary = ${buildout:bin-directory}/duplicity
+wrapper = $${rootdirectory:bin}/duplicity
+recover = false
+
+[cron-entry-duplicity]
+<= cron
+recipe = slapos.cookbook:cron.d
+name = mariadb_remotebackup
+frequency = 0 1 * * *
+command = $${duplicity:wrapper}
diff --git a/software/mariadb/instance.cfg b/software/mariadb/instance.cfg
index 32327d819752453377a2f93f14c945eb2d54278f..84deef0019b6cde09acf986bc757efefb990ed8f 100644
--- a/software/mariadb/instance.cfg
+++ b/software/mariadb/instance.cfg
@@ -1,22 +1,14 @@
 [buildout]
+
 parts =
-  instance
+  switch-softwaretype
 
 eggs-directory = ${buildout:eggs-directory}
 develop-eggs-directory = ${buildout:develop-eggs-directory}
+offline = true
 
-[instance]
-recipe = ${instance-recipe:egg}:${instance-recipe:module}
-dcrond_binary = ${dcron:location}/sbin/crond
-logrotate_binary = ${logrotate:location}/usr/sbin/logrotate
-mysql_binary = ${mariadb:location}/bin/mysql
-mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
-mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
-mysqld_binary = ${mariadb:location}/libexec/mysqld
-mysqldump_binary = ${mariadb:location}/bin/mysqldump
-openssl_binary = ${openssl:location}/bin/openssl
-stunnel_binary = ${stunnel:location}/bin/stunnel
-gzip_binary = ${gzip:location}/bin/gzip
-duplicity_binary = ${buildout:bin-directory}/duplicity
-gzip_binary = ${gzip:location}/bin/gzip
-zcat_binary = ${gzip:location}/bin/zcat
+[switch-softwaretype]
+recipe = slapos.cookbook:softwaretype
+default = ${instance-mariadb:output}
+backuped = ${instance-remotebackuped:output}
+recover = ${instance-recover:output}
diff --git a/software/mariadb/software.cfg b/software/mariadb/software.cfg
index 3de1c1fb2b9308e0088100a0932375e86da1cde7..017c06e22f72c551ff671e4ffcfe2028a19d5c8f 100644
--- a/software/mariadb/software.cfg
+++ b/software/mariadb/software.cfg
@@ -29,17 +29,26 @@ allow-hosts =
   psutil.googlecode.com
   www.dabeaz.com
 
+# XXX: This is dirty, recipe trick shall be used.
+develop =
+  /opt/slapdev
+
 versions = versions
 
 parts =
 # Create instance template
 #TODO : list here all parts.
   template
+  instance-remotebackuped
+  instance-mariadb
+  instance-recover
   libxslt
   eggs
   gzip
   instance-recipe-egg
   duplicity
+  mariadb
+  stunnel
 
 # XXX: Workaround of SlapOS limitation
 # Unzippig of eggs is required, as SlapOS do not yet provide nicely working
@@ -70,13 +79,33 @@ eggs =
 # Default template for the instance.
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance.cfg
-md5sum = 426f3cf33899a1f78de8b6ff35917852
+md5sum = 3e1ea477d48080e9bdb98579f7f28be6
 output = ${buildout:directory}/template.cfg
 mode = 0644
-dollar = $
+
+[instance-mariadb]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance-mariadb.cfg
+md5sum = 737a6d2f1ea9938b8d76e2d35e18e482
+output = ${buildout:directory}/template-mariadb.cfg
+mode = 0644
+
+[instance-remotebackuped]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance-remotebackuped.cfg
+md5sum = bf9e5aa9d63bda9c4aa87d9527fec3e8
+output = ${buildout:directory}/template-backuped.cfg
+mode = 0644
+
+[instance-recover]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance-recover.cfg
+md5sum = a8df936b6abf82d0d798b83ddfebdc8a
+output = ${buildout:directory}/template-recover.cfg
+mode = 0644
 
 [versions]
-slapos.cookbook = 0.29
+slapos.cookbook =
 
 # Required by slapos.cookbook==0.25
 slapos.core = 0.4
@@ -90,4 +119,4 @@ hexagonit.recipe.download = 1.5.0
 plone.recipe.command = 1.1
 
 # Use SlapOS patched zc.buildout
-zc.buildout = 1.5.3-dev-SlapOS-010
+zc.buildout = 1.6.0-dev-SlapOS-002
diff --git a/software/net2ftp/configure.py b/software/net2ftp/configure.py
new file mode 100644
index 0000000000000000000000000000000000000000..041a0e0fece6bd8fc9963aa25c90ece4ef48676f
--- /dev/null
+++ b/software/net2ftp/configure.py
@@ -0,0 +1,25 @@
+import sys
+import os
+import MySQLdb
+
+def setup(args):
+    base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args
+    
+    sql_file = os.path.join(htdocs, "create_tables.sql")
+    try:
+        conn = MySQLdb.connect (host = mysql_host,
+                              user = mysql_user,
+                              passwd = mysql_password,
+                              db = mysql_database)
+        cursor = conn.cursor ()
+        with open(sql_file, 'r') as f:
+            sql_script = f.readline()
+            while sql_script != "":
+                cursor.execute(sql_script)
+                sql_script = f.readline()
+        conn.close()
+    except:
+        return    
+
+if __name__ == '__main__':
+    setup(sys.argv[1:])
\ No newline at end of file
diff --git a/software/net2ftp/instance.cfg b/software/net2ftp/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..172e8c42f9758b98bf443df3769a7a8a2a7e9d8c
--- /dev/null
+++ b/software/net2ftp/instance.cfg
@@ -0,0 +1,24 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
+
+#delete = 
+#rename = 
+#file_token = name of file who will be created at the end of installation
+table_name = **
+constraint = 1
+script = ${configure-script:location}/${configure-script:filename}
\ No newline at end of file
diff --git a/software/net2ftp/software.cfg b/software/net2ftp/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..53ff8571931398319d2208624d8cfebbb1a93f54
--- /dev/null
+++ b/software/net2ftp/software.cfg
@@ -0,0 +1,78 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  configure-script
+
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = slapos.recipe.build
+url = http://www.net2ftp.com/download/net2ftp_v0.98.zip
+md5sum = 5a2741b5881f3f229a788958dc6cdf10
+script =
+  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
+  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
+  workdir = guessworkdir(extract_dir)
+  self.copyTree(workdir + "/files_to_upload", "${buildout:parts-directory}/${:_buildout_section_name_}")
+
+[configure-script]
+recipe = hexagonit.recipe.download
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+url = ${:_profile_base_location_}/configure.py
+filename = configure.py
+download-only = True
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/net2ftp.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = settings.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/net2ftp/template/net2ftp.inc.php.in b/software/net2ftp/template/net2ftp.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..2f7271d8c774d99d503e98251711916b5f66a586
--- /dev/null
+++ b/software/net2ftp/template/net2ftp.inc.php.in
@@ -0,0 +1,147 @@
+<?php
+
+//   -------------------------------------------------------------------------------
+//  |                  net2ftp: a web based FTP client                              |
+//  |              Copyright (c) 2003-2009 by David Gartner                         |
+//  |                                                                               |
+//   -------------------------------------------------------------------------------
+//  |                                                                               |
+//  |  Enter your settings and preferences below.                                   |
+//  |                                                                               |
+//  |  The structure of each line is like this:                                     |
+//  |     $net2ftp_settings["setting_name"] = "setting_value";                      |
+//  |                                                                               |
+//  |  BE CAREFUL WHEN EDITING THE FILE: ONLY EDIT THE setting_value, AND DO NOT    |
+//  |  ERASE THE " OR THE ; CHARACTERS.                                             |
+//   -------------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------
+// Basic settings
+// ----------------------------------------------------------------------------------
+
+// Enter your email address
+// This is used as "from" address when sending files in attachment
+$net2ftp_settings["email_feedback"] = "webmaster@enter-your-domain-here.com";
+
+// Default language and skin (look in /languages and /skins to see which are available)
+$net2ftp_settings["default_language"] = "en";
+$net2ftp_settings["default_skin"]     = "blue";
+
+// Enter the address of your help pages, support forum or ticket system
+// This will add a link in the footer; leave empty if you don't have this
+$net2ftp_settings["help_text"] = "";
+$net2ftp_settings["help_link"] = "";
+
+// PHP error reporting
+//$net2ftp_settings["error_reporting"] = "NONE";
+$net2ftp_settings["error_reporting"] = "standard";
+//$net2ftp_settings["error_reporting"] = "ALL";
+
+// Fix transparent PNG images in IE
+$net2ftp_settings["fix_png"] = "yes";
+
+// MD5 salt and encryption string (change them to improve security)
+$net2ftp_settings["encryption_string"] = "462E16CB7C3F369BD9F4DBEE0A926F8F14FFB3";
+
+
+// ----------------------------------------------------------------------------------
+// Admin Panel username and password
+// If no password is set, the Admin panel will not be accessible by anyone
+// ----------------------------------------------------------------------------------
+
+$net2ftp_settings["admin_username"] = "%(mysql_user)s";
+$net2ftp_settings["admin_password"] = "%(mysql_password)s";
+
+
+// ----------------------------------------------------------------------------------
+// Message on Browse screen
+// ----------------------------------------------------------------------------------
+
+$net2ftp_settings["message_browse"] = "";
+
+
+// ----------------------------------------------------------------------------------
+// A MySQL database is optional. It can be used for: logging the users, 
+// checking the consumption of network and server resources (data transfer 
+// volume and script execution time), and checking the user's home directory
+// ----------------------------------------------------------------------------------
+
+// MASTER SETTING that overrides the other settings below: use a database?
+$net2ftp_settings["use_database"] = "yes"; // "yes" or "no"
+
+// Enter your MySQL settings
+$net2ftp_settings["dbusername"] = "%(mysql_user)s";
+$net2ftp_settings["dbpassword"] = "%(mysql_password)s";
+$net2ftp_settings["dbname"]     = "%(mysql_database)s";
+$net2ftp_settings["dbserver"]   = "%(mysql_host)s"; // on many configurations, this is "localhost"
+
+// Switch different types of logs on or off
+$net2ftp_settings["log_access"] = "yes";
+$net2ftp_settings["log_error"]  = "yes";
+
+// Delete logs which are older than X days automatically
+$net2ftp_settings["log_length_days"] = 31; // number of days
+
+
+// ----------------------------------------------------------------------------------
+// Logging to the system logger
+// ----------------------------------------------------------------------------------
+
+$net2ftp_settings["use_syslog"] = "no";
+$net2ftp_settings["syslog_priority"] = LOG_NOTICE;
+$net2ftp_settings["syslog_facility"] = LOG_MAIL;
+$net2ftp_settings["syslog_ident"] = "net2ftp";
+
+
+// ----------------------------------------------------------------------------------
+// Files bigger than this limit will be excluded from:
+// upload, download, copy, move, search, view, edit
+// ----------------------------------------------------------------------------------
+
+$net2ftp_settings["max_filesize"]  = "10000000";  // in Bytes, default 10 MB
+
+// Note: IF YOU WANT TO ALLOW LARGE FILE UPLOADS, YOU MAY HAVE TO ADJUST
+//       THE FOLLOWING PARAMETERS:
+//       1 - in the file php.ini: upload_max_filesize, post_max_size,
+//           max_execution_time, memory_limit
+//       2 - in the file php.conf: LimitRequestBody
+
+
+// ----------------------------------------------------------------------------------
+// Server resource consumption settings
+// ----------------------------------------------------------------------------------
+
+// Switch consumption checking on or off
+$net2ftp_settings["check_consumption"] = "yes";
+
+// Maximum data transfer volume per day (in Bytes)
+$net2ftp_settings["max_consumption_ipaddress_datatransfer"] = 50000000; // per IP address
+$net2ftp_settings["max_consumption_ftpserver_datatransfer"] = 50000000; // per FTP server
+
+// Maximum script execution time per day (in seconds)
+$net2ftp_settings["max_consumption_ipaddress_executiontime"] = 1500; // per IP address
+$net2ftp_settings["max_consumption_ftpserver_executiontime"] = 1500; // per FTP server
+
+// Maximum number of FTP servers that can be accessed per day
+$net2ftp_settings["max_consumption_ipaddress_nr_of_ftpservers"] = 50; // per IP address
+
+// Check the user's home directory?
+$net2ftp_settings["check_homedirectory"] = "yes";
+
+
+// ----------------------------------------------------------------------------------
+// DO NOT CHANGE ANYTHING BELOW THIS LINE
+// ----------------------------------------------------------------------------------
+
+$net2ftp_settings["application_version"] = "0.98";
+$net2ftp_settings["application_build_nr"] = "45";
+
+// Is this net2ftp.com, or a net2ftp installation elsewhere
+$net2ftp_settings["net2ftpdotcom"] = "no";
+
+// Google Adsense advertisements 
+// Not shown when using HTTPS to avoid warnings on each pageload
+$net2ftp_settings["show_google_ads"] = "no";
+
+?>
diff --git a/software/openX/instance.cfg b/software/openX/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/openX/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/openX/software.cfg b/software/openX/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..aac40c190a689eeba3d402d91126e1b6a1bfd279
--- /dev/null
+++ b/software/openX/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://download.openx.org/openx-2.8.7.tar.gz
+md5sum = 23fa5052af6d4411e8b84284894ff619
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/openx.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/openX/template/openx.inc.php.in b/software/openX/template/openx.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/openX/template/openx.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/os-commerce/instance.cfg b/software/os-commerce/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/os-commerce/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/os-commerce/software.cfg b/software/os-commerce/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..19fb9d08269924cc1af760b6ede3d15e7b1a375b
--- /dev/null
+++ b/software/os-commerce/software.cfg
@@ -0,0 +1,69 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg 
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = slapos.recipe.build
+url = http://www.oscommerce.com/files/oscommerce-3.0.2.zip
+md5sum = 680caf7dde7cf7772a576ef3930970ff
+script =
+  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
+  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
+  workdir = guessworkdir(extract_dir)
+  self.copyTree(workdir + "/oscommerce", "${buildout:parts-directory}/${:_buildout_section_name_}")
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/os-commerce.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/os-commerce/template/os-commerce.inc.php.in b/software/os-commerce/template/os-commerce.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/os-commerce/template/os-commerce.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/phpbb/instance.cfg b/software/phpbb/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..5a93bab7aed2cfdc3864b80cb68a4aaa1ffb0b6d
--- /dev/null
+++ b/software/phpbb/instance.cfg
@@ -0,0 +1,23 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
+
+delete = install
+#rename = 
+#file_token = name of file who will be created at the end of installation
+table_name = modules
+constraint = `module_id`>0
\ No newline at end of file
diff --git a/software/phpbb/software.cfg b/software/phpbb/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..3b0699c92603ba5a195980fce5986939aa1fbc0d
--- /dev/null
+++ b/software/phpbb/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.phpbb.com/files/release/phpBB-3.0.9.zip
+md5sum = fb8025a51a3c756fe6151a6b0beeefd4
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/phpbb.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/phpbb/template/phpbb.inc.php.in b/software/phpbb/template/phpbb.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/phpbb/template/phpbb.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/phpnuke/instance.cfg b/software/phpnuke/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/phpnuke/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/phpnuke/software.cfg b/software/phpnuke/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..2ea6c153322a491f9bdf55f0d0924bd3494dfb40
--- /dev/null
+++ b/software/phpnuke/software.cfg
@@ -0,0 +1,70 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = slapos.recipe.build
+url = http://phpnuke.org/modules/Release/files/phpnuke-release-8.2.4.tar.gz
+md5sum = 0f31895b141f50a5f2e6f083b0222fe2
+script =
+  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
+  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
+  workdir = guessworkdir(extract_dir)
+  self.copyTree(workdir + "/html", "${buildout:parts-directory}/${:_buildout_section_name_}")
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/phpnuke.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/phpnuke/template/phpnuke.inc.php.in b/software/phpnuke/template/phpnuke.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/phpnuke/template/phpnuke.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/pimcore/instance.cfg b/software/pimcore/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/pimcore/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/pimcore/software.cfg b/software/pimcore/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..1376b3398024a6cdd33edcd0c8ddfd5223d5be44
--- /dev/null
+++ b/software/pimcore/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.pimcore.org/download/pimcore-latest.zip
+md5sum = 58cfa935ed308476b95cf364af7719c3
+#If provided tarball does not contain top directory, option shall be changed to false
+strip-top-level-dir = false
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/pimcore.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/pimcore/template/pimcore.inc.php.in b/software/pimcore/template/pimcore.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/pimcore/template/pimcore.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/piwigo/instance.cfg b/software/piwigo/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/piwigo/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/piwigo/software.cfg b/software/piwigo/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..262c91e8ef600861d9918a83c005e29666e30c82
--- /dev/null
+++ b/software/piwigo/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://piwigo.org/download/dlcounter.php?code=latest
+md5sum = 13870130dcdda90bf2d2e3c20a49b04f
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/piwigo.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/piwigo/template/piwigo.inc.php.in b/software/piwigo/template/piwigo.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/piwigo/template/piwigo.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/piwik/instance.cfg b/software/piwik/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/piwik/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/piwik/software.cfg b/software/piwik/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..ede2f90a39b3fc616851dfd7bc38d5ab4ca0cc38
--- /dev/null
+++ b/software/piwik/software.cfg
@@ -0,0 +1,70 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+
+[application]
+recipe = slapos.recipe.build
+url = http://piwik.org/latest.zip
+md5sum = fd16c7a15573c93feefd1dcba3ca40ba
+script =
+  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
+  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
+  workdir = guessworkdir(extract_dir)
+  self.copyTree(workdir + "/piwik", "${buildout:parts-directory}/${:_buildout_section_name_}")
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/piwik.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/piwik/template/piwik.inc.php.in b/software/piwik/template/piwik.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/piwik/template/piwik.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/prestashop/instance.cfg b/software/prestashop/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..aada7ce6e2f4dd71f9c15d8d8ec537768ad6907a
--- /dev/null
+++ b/software/prestashop/instance.cfg
@@ -0,0 +1,23 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
+
+delete = install, CHANGELOG.txt, readme_de.txt, readme_en.txt, readme_fr.txt, readme_it.txt, readme_es.txt
+rename = admin
+#file_token = name of file who will be created at the end of installation
+table_name = configuration
+constraint = `name`='PS_SHOP_NAME'
\ No newline at end of file
diff --git a/software/prestashop/software.cfg b/software/prestashop/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..79cb4f1c74bfa02f430f4dc72bd3a03542010a61
--- /dev/null
+++ b/software/prestashop/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.prestashop.com/download/prestashop_1.4.4.1.zip
+md5sum = 08206798517ea22c0122640b05c7df73
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/prestashop.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/prestashop/template/prestashop.inc.php.in b/software/prestashop/template/prestashop.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/prestashop/template/prestashop.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/punbb/instance.cfg b/software/punbb/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/punbb/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/punbb/software.cfg b/software/punbb/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..144979b58a8efdf3c7b5ca08fc8b1a401a1c8527
--- /dev/null
+++ b/software/punbb/software.cfg
@@ -0,0 +1,67 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://punbb.informer.com/download/punbb-1.3.6.tar.gz
+md5sum = 9454ef78101028fd5acf2731f77545c2
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/punbb.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/punbb/template/punbb.inc.php.in b/software/punbb/template/punbb.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..0c39feef34495c81a59b87d10398294b24c402c0
--- /dev/null
+++ b/software/punbb/template/punbb.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
+$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/simple Machine Forum/instance.cfg b/software/simple Machine Forum/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/simple Machine Forum/instance.cfg	
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/simple Machine Forum/software.cfg b/software/simple Machine Forum/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..b2204e1dfd3e817629bb05dbfa71eba70575daa8
--- /dev/null
+++ b/software/simple Machine Forum/software.cfg	
@@ -0,0 +1,68 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+
+
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://mirror.ord.simplemachines.org/downloads/smf_2-0-1_install.tar.gz
+md5sum = 76817fc9f4620765bba4232bbf8b6b2b
+#If provided tarball does not contain top directory, option shall be changed to false
+strip-top-level-dir = false
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/simplemachine.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/simple Machine Forum/template/simplemachine.inc.php.in b/software/simple Machine Forum/template/simplemachine.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/simple Machine Forum/template/simplemachine.inc.php.in	
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/spip/instance.cfg b/software/spip/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/spip/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/spip/software.cfg b/software/spip/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..816d5480c7177735db6e76e254dbdffaf8941f6e
--- /dev/null
+++ b/software/spip/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg 
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://files.spip.org/spip/stable/spip.zip?1316156624
+md5sum = 4500c283b464161da6fced7dce12ae0a
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/spip.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/spip/template/spip.inc.php.in b/software/spip/template/spip.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/spip/template/spip.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/statusnet/instance.cfg b/software/statusnet/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/statusnet/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/statusnet/software.cfg b/software/statusnet/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..7d5e5dddd1c650f05d44df5171722bc63f1db9a6
--- /dev/null
+++ b/software/statusnet/software.cfg
@@ -0,0 +1,68 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://status.net/statusnet-1.0.1.tar.gz
+md5sum = 727a7cfe7e9531b732739dabd295bcb9
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/statusnet.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+slapos.cookbook = 0.30
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/statusnet/template/statusnet.inc.php.in b/software/statusnet/template/statusnet.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/statusnet/template/statusnet.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/sugar-crm/instance.cfg b/software/sugar-crm/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/sugar-crm/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/sugar-crm/software.cfg b/software/sugar-crm/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..c31e9154e3efe7d067279fb694aeddfd8f84a2e7
--- /dev/null
+++ b/software/sugar-crm/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://www.sugarforge.org/frs/download.php/8516/SugarCE-6.3.0RC1.zip
+md5sum = ee9719b1ae2a11105eedc94c6676d7a4
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/sugar-crm.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/sugar-crm/template/sugar-crm.inc.php.in b/software/sugar-crm/template/sugar-crm.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/sugar-crm/template/sugar-crm.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/tiki/instance.cfg b/software/tiki/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/tiki/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/tiki/software.cfg b/software/tiki/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..0356b7b9d0309d45b69ccbc15d66f8e917272417
--- /dev/null
+++ b/software/tiki/software.cfg
@@ -0,0 +1,66 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://freefr.dl.sourceforge.net/project/tikiwiki/Tiki_7.x_Electra/7.1/tiki-7.1.tar.gz
+md5sum = 02c832eaaa107cd7c76f9d94f400eaf5
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/tiki.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/tiki/template/tiki.inc.php.in b/software/tiki/template/tiki.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/tiki/template/tiki.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/software/wordpress/instance-wordpress.cfg b/software/wordpress/instance-wordpress.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..11f05eb776e8c0e901439465ee0c7b07f6c35b26
--- /dev/null
+++ b/software/wordpress/instance-wordpress.cfg
@@ -0,0 +1,28 @@
+[buildout]
+
+parts =
+  apache-php
+  request-mariadb
+  mkdir
+
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+offline = true
+
+[apache-php]
+recipe = slapos.cookbook:lamp.request
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+stunnel_binary = ${stunnel:location}/bin/stunnel
+
+mysql-url = $${request-mariadb:connection-url}
+
+[request-mariadb]
+recipe = slapos.cookbook:request
+name = MariaDB DataBase
+software-url = $${slap_connection:software_release_url}
+software-type = mariadb
+return = url
diff --git a/software/wordpress/instance.cfg b/software/wordpress/instance.cfg
index 9683f0fd9b0dc682431cbb43c29eb06721df0343..e938ee1346c2299efef250309aaf7c4fa0c25862 100644
--- a/software/wordpress/instance.cfg
+++ b/software/wordpress/instance.cfg
@@ -1,16 +1,12 @@
 [buildout]
+parts =
+  switch_softwaretype
+
 eggs-directory = ${buildout:eggs-directory}
 develop-eggs-directory = ${buildout:develop-eggs-directory}
+offline = true
 
-parts = instance
-
-[instance]
-recipe = ${instance-recipe:egg}:${instance-recipe:module}
-source = ${application:location}
-template = ${application-template:location}/${application-template:filename}
-configuration = ${application-configuration:location}
-
-httpd_binary = ${apache:location}/bin/httpd
-stunnel_binary = ${stunnel:location}/bin/stunnel
-davstorage-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.52:/software/davstorage/software.cfg
-mariadb-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.54:/software/mariadb/software.cfg
+[switch_softwaretype]
+recipe = slapos.cookbook:softwaretype
+default = ${instance_wordpress:output}
+mariadb = ${instance_mariadb:output}
diff --git a/software/wordpress/software.cfg b/software/wordpress/software.cfg
index 7985c1c01e1b2a4887b56371a0290337e0137d37..2cbba3d063f6668a3ff9131414084285f5dcadad 100644
--- a/software/wordpress/software.cfg
+++ b/software/wordpress/software.cfg
@@ -2,15 +2,22 @@
 versions = versions
 
 parts =
-  template
   apache-php
+  template
   eggs
   instance-recipe-egg
+  instance_wordpress
+  instance_mariadb
   
 extends =
+  ../../component/gzip/buildout.cfg
   ../../stack/apache-php.cfg
   ../../stack/shacache-client.cfg
 
+# XXX: This is dirty, recipe trick shall be used.
+develop =
+  /opt/slapdev
+
 [application]
 url = http://wordpress.org/latest.tar.gz
 #md5sum = Student may put here md5sum of this file, this is good idea
@@ -18,7 +25,7 @@ url = http://wordpress.org/latest.tar.gz
 [application-template]
 recipe = slapos.recipe.download
 url = ${:_profile_base_location_}/wp-config.php.in
-#md5sum = ${application-configuration:md5sum}
+md5sum = ${application-configuration:md5sum}
 download-only = True
 filename = template.in
 mode = 0644
@@ -26,6 +33,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
 
 [application-configuration]
 location = wp-config.php
+md5sum = 608dd9003a8edeb59c3aabc6cf43bbf9
   
 [instance-recipe]
 egg = slapos.cookbook
@@ -40,12 +48,26 @@ eggs = ${instance-recipe:egg}
 # Default template for the instance.
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance.cfg
-md5sum = c821944d1ab8d8c0305b08ea7c09c2e0
+md5sum = 817407b6bb7af1dce7588e259ead0d26
 output = ${buildout:directory}/template.cfg
 mode = 0644
 
+[instance_mariadb]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/../mariadb/instance-mariadb.cfg
+md5sum = 38aefa725d21988485c20ae9d58f9455
+output = ${buildout:directory}/template-mariadb.cfg
+mode = 0644
+
+[instance_wordpress]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance-wordpress.cfg
+md5sum = 220e14b7a46742b1fd83d699c352b888
+output = ${buildout:directory}/template-wordpress.cfg
+mode = 0644
+
 [versions]
-slapos.cookbook = 0.28
+#slapos.cookbook = 0.12
 
 # Required by slapos.cookbook==0.12
 slapos.core = 0.8
@@ -59,4 +81,4 @@ hexagonit.recipe.download = 1.5.0
 plone.recipe.command = 1.1
 
 # Use SlapOS patched zc.buildout
-zc.buildout = 1.5.3-dev-SlapOS-010
+zc.buildout = 1.6.0-dev-SlapOS-002
diff --git a/software/xoops/instance.cfg b/software/xoops/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..fffebea8fe2c6c76697fe4be87552f265614a35d
--- /dev/null
+++ b/software/xoops/instance.cfg
@@ -0,0 +1,17 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
diff --git a/software/xoops/software.cfg b/software/xoops/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..e9390f06be50ac4f272a2d15cd791e3fcb6823d4
--- /dev/null
+++ b/software/xoops/software.cfg
@@ -0,0 +1,69 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  
+extends =
+  ../../stack/lamp.cfg 
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = slapos.recipe.build
+url = http://freefr.dl.sourceforge.net/project/xoops/XOOPS%20Core%20(stable%20releases)/XOOPS%202.5.1/xoops-2.5.1a.zip
+md5sum = 616f06443ae1a2dcea7191069492ccd2
+script =
+  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
+  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
+  workdir = guessworkdir(extract_dir)
+  self.copyTree(workdir + "/htdocs", "${buildout:parts-directory}/${:_buildout_section_name_}")
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/xoops.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
diff --git a/software/lamp-template/template/wp-config.php.in b/software/xoops/template/wp-config.php.in
similarity index 100%
rename from software/lamp-template/template/wp-config.php.in
rename to software/xoops/template/wp-config.php.in
diff --git a/software/zencart/configure.py b/software/zencart/configure.py
new file mode 100644
index 0000000000000000000000000000000000000000..1214854c423696457b56c341e4ad41d6c0822d67
--- /dev/null
+++ b/software/zencart/configure.py
@@ -0,0 +1,21 @@
+import sys
+import os
+import fileinput
+
+def setup(args):
+    base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args
+    
+    rename = renamed.split(", ")
+    admin_dir = rename[0].split("=>")[1].strip()
+    admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php")
+    searchPattern = "/admin"
+    replacePattern =  "/" + admin_dir
+    os.chmod(admin_include_file, 0744)
+    for line in fileinput.input(admin_include_file, inplace=1):
+        if searchPattern in line:
+            line = line.replace(searchPattern, replacePattern)
+        sys.stdout.write(line)
+    os.chmod(admin_include_file, 0444)
+
+if __name__ == '__main__':
+    setup(sys.argv[1:])
\ No newline at end of file
diff --git a/software/zencart/instance.cfg b/software/zencart/instance.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..074eb49fd13fe56143c6ca391c74dbbaaa4c9ea5
--- /dev/null
+++ b/software/zencart/instance.cfg
@@ -0,0 +1,24 @@
+[buildout]
+eggs-directory = ${buildout:eggs-directory}
+develop-eggs-directory = ${buildout:develop-eggs-directory}
+
+parts = instance
+
+[instance]
+recipe = ${instance-recipe:egg}:${instance-recipe:module}
+source = ${application:location}
+template = ${application-template:location}/${application-template:filename}
+configuration = ${application-configuration:location}
+
+httpd_binary = ${apache:location}/bin/httpd
+mysql_binary = ${mariadb:location}/bin/mysql
+mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
+mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
+mysqld_binary = ${mariadb:location}/libexec/mysqld
+
+delete = zc_install
+rename = admin
+#file_token = name of file who will be created at the end of installation
+table_name = admin
+constraint = `admin_id`=1 AND (`admin_name`<>'Admin' OR `admin_email`<>'admin@localhost')
+script = ${configure-script:location}/${configure-script:filename}
\ No newline at end of file
diff --git a/software/zencart/software.cfg b/software/zencart/software.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..2f397f7e8c46cac17238fcab2cac73e9c0a786d9
--- /dev/null
+++ b/software/zencart/software.cfg
@@ -0,0 +1,76 @@
+[buildout]
+versions = versions
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  downloadcache-workaround
+  configure-script
+
+extends =
+  ../../stack/lamp.cfg
+  ../../stack/shacache-client.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+url = http://heanet.dl.sourceforge.net/project/zencart/CURRENT_%20Zen%20Cart%201.3.x%20Series/Zen%20Cart%20v1.3.9%20-%20Full%20Release/zen-cart-v1.3.9h-full-fileset-10262010.zip
+md5sum = e0a5fb39078321ced7f5a9c193f30927
+#If provided tarball does not contain top directory, option shall be changed to false
+#strip-top-level-dir = true
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[configure-script]
+recipe = hexagonit.recipe.download
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+url = ${:_profile_base_location_}/configure.py
+filename = configure.py
+download-only = True
+
+[application-template]
+recipe = slapos.recipe.download
+url = ${:_profile_base_location_}/template/zencart.inc.php.in
+#md5sum = Student may put here md5sum of this file, this is good idea
+download-only = True
+filename = template.in
+mode = 0644
+location = ${buildout:parts-directory}/${:_buildout_section_name_}
+
+[application-configuration]
+location = config.inc.php
+  
+[instance-recipe]
+egg = slapos.cookbook
+module = lamp.simple
+
+[template]
+# Default template for the instance.
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg
+#md5sum = Student shall put md5 of instance.cfg here
+output = ${buildout:directory}/template.cfg
+mode = 0644
+
+[instance-recipe-egg]
+recipe = zc.recipe.egg
+python = python2.7
+eggs = ${instance-recipe:egg}
+
+[versions]
+# Use SlapOS patched zc.buildout
+zc.buildout = 1.5.3-dev-SlapOS-010
+
+[downloadcache-workaround]
+# workaround irritating problem of hexagonit.recipe.cmmi which automatically
+# creates download cache, which in turn switches builout to "semi-offline" mode
+recipe = plone.recipe.command
+# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
+# to ${buildout:directory}/downloads but this variable is available late, that's
+# why it is hardcoded only for required case
+download-cache = ${buildout:directory}/downloads
+command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
+update-command = ${:command}
+stop-on-error = True
+
diff --git a/software/zencart/template/zencart.inc.php.in b/software/zencart/template/zencart.inc.php.in
new file mode 100644
index 0000000000000000000000000000000000000000..eac1c4b9eea2b2f36491b572757eebcb27643856
--- /dev/null
+++ b/software/zencart/template/zencart.inc.php.in
@@ -0,0 +1,25 @@
+<?php
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$i = 0;
+$i++;
+/* Server parameters */
+$cfg['Servers'][$i]['host'] = '%(mysql_host)s';
+$cfg['Servers'][$i]['port'] = '%(mysql_port)s';
+/* Authentication type */
+$cfg['Servers'][$i]['auth_type'] = 'cookie';
+$cfg['Servers'][$i]['user'] = '';
+$cfg['Servers'][$i]['connect_type'] = 'tcp';
+$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+$cfg['Servers'][$i]['extension'] = 'mysql';
+$cfg['Servers'][$i]['AllowNoPassword'] = false;
+
+/* rajk - for blobstreaming */
+$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
+$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
+$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
+$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+?>
diff --git a/stack/erp5.cfg b/stack/erp5.cfg
index 1e378dc309e3d2f1d690340656a9d0b26ad8bc45..ff41558752c69e6e4f1fa11a72c42a163d23fb8d 100644
--- a/stack/erp5.cfg
+++ b/stack/erp5.cfg
@@ -20,6 +20,7 @@ allow-hosts =
   *.nexedi.org
   *.python.org
   *.sourceforge.net
+  alastairs-place.net
   dist.repoze.org
   effbot.org
   github.com
diff --git a/stack/lamp.cfg b/stack/lamp.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..78e9c072a134d1c643610af76ed0afec1a8ea311
--- /dev/null
+++ b/stack/lamp.cfg
@@ -0,0 +1,48 @@
+[buildout]
+find-links +=
+    http://www.nexedi.org/static/packages/source/slapos.buildout/
+
+# Use only quite well working sites.
+allow-hosts =
+  *.nexedi.org
+  *.python.org
+  *.sourceforge.net
+  alastairs-place.net
+  dist.repoze.org
+  effbot.org
+  github.com
+  peak.telecommunity.com
+  psutil.googlecode.com
+  www.dabeaz.com
+
+parts =
+  template
+  apache-php
+  mariadb
+  eggs
+  instance-recipe-egg
+  
+extends =
+  ../component/mariadb/buildout.cfg
+  ../component/apache/buildout.cfg
+  ../component/apache-php/buildout.cfg
+  ../component/dcron/buildout.cfg
+  ../component/git/buildout.cfg
+  ../component/glib/buildout.cfg
+  ../component/logrotate/buildout.cfg
+  ../component/python-2.7/buildout.cfg
+  ../component/lxml-python/buildout.cfg
+  ../component/zlib/buildout.cfg
+  ../component/stunnel/buildout.cfg
+  ../component/mysql-python/buildout.cfg
+
+[application]
+recipe = hexagonit.recipe.download
+#If provided tarball does not containt top directory this option shall be changed to false
+strip-top-level-dir = true
+
+[eggs]
+recipe = zc.recipe.egg
+eggs =
+  ${lxml-python:egg}
+  ${mysql-python:egg}