diff --git a/CHANGES.txt b/CHANGES.txt index 39e83504547eb7e27cadbf437acb19162bce890b..e14b6b6b64ada0cc688a98c310364d379b767eb8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,22 @@ Changes ======= +0.71.1 (2013-01-04) +------------------- + + * Frontend: Sort instances by reference to avoid attacks. [Cedric de Saint + Martin] + * Frontend: Add public_ipv4 parameter support to ease deployment of slave + frontend. [Cedric de Saint Martin] + * Frontend: Move apache_frontend wrappers to watched directory (etc/service). + [Cedric de Saint Martin] + * Frontend: Add native path to varnish environment. [Cedric de Saint Martin] + +0.71 (2012-12-20) +----------------- + + * frontend: Add "path" parameter for Zope instances. [Cedric de Saint Martin] + 0.70 (2012-11-05) ----------------- diff --git a/component/apache/buildout.cfg b/component/apache/buildout.cfg index c52f479db005daad086461f76029240cb5b947e9..6ba1f5989e78249a3de1ce30432a5d0c2c6141ed 100644 --- a/component/apache/buildout.cfg +++ b/component/apache/buildout.cfg @@ -87,7 +87,7 @@ configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_na environment = PATH=${pkgconfig:location}/bin:%(PATH)s PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig - CPPFLAGS =-I${libuuid:location}/include + CPPFLAGS =-I${libuuid:location}/include -I${openssl:location}/include LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib [mod_antiloris-apache-2.4.patch] diff --git a/component/busybox/buildout.cfg b/component/busybox/buildout.cfg index c80801a29f346e8425c98907a79542e1a55b86a7..8d26eb3cce74034f75a8b4f9b46f60303ea02d55 100644 --- a/component/busybox/buildout.cfg +++ b/component/busybox/buildout.cfg @@ -5,7 +5,7 @@ parts = busybox [busybox] recipe = slapos.recipe.build url = http://git.busybox.net/busybox/snapshot/busybox-1_20_1.tar.gz -md5sum = 15758fc37ae8051d6def1b8afb691821 +md5sum = 2dcfee8add6b9c52d6a91e97ba705b66 script = extract_dir = self.extract(self.download(%(url)r, %(md5sum)r)) workdir = guessworkdir(extract_dir) diff --git a/component/cclient/buildout.cfg b/component/cclient/buildout.cfg index df52123e66d09c884560efcdd8a8cbec5427c268..0d486750c9792a1a57a80b5f2ad1f2c11c7d4d0e 100644 --- a/component/cclient/buildout.cfg +++ b/component/cclient/buildout.cfg @@ -10,10 +10,10 @@ parts = cclient [cclient-patch] -recipe = slapos.recipe.download +recipe = hexagonit.recipe.download +download-only = true url = ${:_profile_base_location_}/imap-2007f.patch md5sum = 42c77fdd5d7a976fc302b93aadb3da98 -location = ${buildout:parts-directory}/${:_buildout_section_name_} filename = imap-2007f.patch [cclient] diff --git a/component/fonts/buildout.cfg b/component/fonts/buildout.cfg index a148657775cfe81feb8ffce88d170944d60df17e..feb8e7865af851da1a0c952fc4521070bac7257f 100644 --- a/component/fonts/buildout.cfg +++ b/component/fonts/buildout.cfg @@ -3,6 +3,7 @@ parts = liberation-fonts ipaex-fonts ipa-fonts + ocrb-fonts [fonts] location = ${buildout:parts-directory}/${:_buildout_section_name_} @@ -32,3 +33,10 @@ strip-top-level-dir = true url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip md5sum = 39a828acf27790adbe4944dfb4d94bb1 destination = ${fonts:location}/${:_buildout_section_name_} + +[ocrb-fonts] +recipe = hexagonit.recipe.download +strip-top-level-dir = true +url = http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Ftsukurimashou%2F56948%2Focr-0.2.zip +md5sum = 9f2acd83291a31dbe053912f4115db75 +destination = ${fonts:location}/${:_buildout_section_name_} diff --git a/component/imagemagick/buildout.cfg b/component/imagemagick/buildout.cfg index 815b210ec8e536f57410dfc6dabd55184b46ba1c..7a24475c816d0f4b4f3934c15ddf7f1ffefb0a76 100644 --- a/component/imagemagick/buildout.cfg +++ b/component/imagemagick/buildout.cfg @@ -28,9 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch [imagemagick] recipe = hexagonit.recipe.cmmi -#url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.8-8.tar.bz2 -url = http://ftp.vim.org/ImageMagick/ImageMagick-6.7.8-8.tar.bz2 -md5sum = 4e5c8f102f3e7401587c924f5b4bca15 +url = http://ftp.vim.org/ImageMagick/ImageMagick-6.8.1-9.tar.bz2 +md5sum = cde56988f9d2208d9d61815cc23665b4 depends = ${libtiff:version} ${librsvg:version} diff --git a/component/libdmtx/buildout.cfg b/component/libdmtx/buildout.cfg index 47c5d816d95e7152b7c42bab8c9d2ac17da0ac71..921862d6a3fd4b1287f515998321b29c2779cd5e 100644 --- a/component/libdmtx/buildout.cfg +++ b/component/libdmtx/buildout.cfg @@ -3,8 +3,10 @@ [buildout] extends = + ../bzip2/buildout.cfg ../imagemagick/buildout.cfg ../jbigkit/buildout.cfg + ../zlib/buildout.cfg parts = libdmtx dmtx-utils @@ -26,4 +28,4 @@ environment = PATH=${pkgconfig:location}/bin:%(PATH)s PKG_CONFIG_PATH=${imagemagick:location}/lib/pkgconfig:${libdmtx:location}/lib/pkgconfig CPPFLAGS=-I${libdmtx:location}/include - LDFLAGS=-Wl,-rpath=${jbigkit:location}/lib + LDFLAGS=-Wl,-rpath=${jbigkit:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib diff --git a/component/libreoffice-bin/buildout.cfg b/component/libreoffice-bin/buildout.cfg index 7811b77048789d19e69684f44befd27f75489dbf..7b2fc1661b430adf53636f1feebc720e6822a3fb 100644 --- a/component/libreoffice-bin/buildout.cfg +++ b/component/libreoffice-bin/buildout.cfg @@ -46,4 +46,4 @@ script = # helper binaries cpio = ${cpio:location}/bin/cpio -rpm2cpio = ${rpm2cpio:target} +rpm2cpio = ${rpm2cpio:destination} diff --git a/component/librsvg/buildout.cfg b/component/librsvg/buildout.cfg index e833ebe7ec67c5e72f5eb95a9a7890913c283e1f..4d025711723df367b68ca9520e32971b034fdd92 100644 --- a/component/librsvg/buildout.cfg +++ b/component/librsvg/buildout.cfg @@ -14,7 +14,8 @@ url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.3.tar.bz2 md5sum = e1e93eeff4367c896f3959af34ba20eb environment = PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig + PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig + LDFLAGS=-Wl,-rpath=${zlib:location}/lib [librsvg] recipe = hexagonit.recipe.cmmi @@ -36,4 +37,4 @@ configure-options = environment = PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:%(PATH)s PKG_CONFIG_PATH=${cairo:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig - LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib + LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib diff --git a/component/libtiff/buildout.cfg b/component/libtiff/buildout.cfg index 801ab01832f7b6d9dd81f46a71afe6cc6f8be001..46551fc2fbc2f544ef289d367213c5719e7110a4 100644 --- a/component/libtiff/buildout.cfg +++ b/component/libtiff/buildout.cfg @@ -9,11 +9,9 @@ parts = [libtiff] recipe = hexagonit.recipe.cmmi -version = 4.0.2 +version = 4.0.3 url = http://download.osgeo.org/libtiff/tiff-${:version}.tar.gz -# server is down - circumvent -#url = http://www.imagemagick.org/download/delegates/tiff-${:version}.tar.gz -md5sum = 04a08fa1e07e696e820a0c3f32465a13 +md5sum = 051c1068e6a0627f461948c365290410 configure-options = --disable-static --without-x diff --git a/component/mydumper/buildout.cfg b/component/mydumper/buildout.cfg index 583ba4ac3f2075f4efc9172f70229e894002278e..27cf12032f9b8e81b6b2072826668c529ed34bd3 100644 --- a/component/mydumper/buildout.cfg +++ b/component/mydumper/buildout.cfg @@ -3,6 +3,7 @@ extends = ../cmake/buildout.cfg ../glib/buildout.cfg + ../pkgconfig/buildout.cfg ../openssl/buildout.cfg ../pcre/buildout.cfg ../mariadb/buildout.cfg @@ -22,6 +23,7 @@ buildout-bin-dir = ${buildout:bin-directory} cmake-command = ${cmake:location}/bin/cmake mysql-config = ${mariadb:location}/bin/mysql_config mysqllib = ${mariadb:location}/lib +path = ${pkgconfig:location}/bin pkg-config-path = ${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/:${openssl:location}/lib/pkgconfig/ libraries = ${zlib:location}/lib/:${glib:location}/lib/:${pcre:location}/lib/:${mariadb:location}/lib/:${openssl:location}/lib/ includes = ${zlib:location}/include/:${glib:location}/include/:${pcre:location}/include/:${mariadb:location}/include:${openssl:location}/include/ @@ -39,7 +41,7 @@ script = extract_dir = self.extract(url) workdir = guessworkdir(extract_dir) self.applyPatchList(self.options['mydumper-patches'], cwd=workdir) - env['PATH'] = self.options['buildout-bin-dir'] + ':' + env.get('PATH', '') + env['PATH'] = self.options['path'] + ':' + self.options['buildout-bin-dir'] + ':' + env.get('PATH', '') env['PKG_CONFIG_PATH'] = self.options['pkg-config-path'] + ':' + \ env.get('PKG_CONFIG_PATH', '') env['CMAKE_INCLUDE_PATH'] = self.options['includes'] diff --git a/component/noVNC/buildout.cfg b/component/noVNC/buildout.cfg index 1a735739913549ed76c6853eb2ec4024643cfa10..ecb10776ced6c06ff2a878848f127463716f9bc9 100644 --- a/component/noVNC/buildout.cfg +++ b/component/noVNC/buildout.cfg @@ -3,7 +3,7 @@ parts = noVNC [noVNC] -recipe = slapos.recipe.build:download-unpacked +recipe = hexagonit.recipe.download url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.4.tar.gz md5sum = 5703d5d46022d8723796dcbbf821ee7f strip-top-level-dir = true diff --git a/component/pkgconfig/buildout.cfg b/component/pkgconfig/buildout.cfg index 29cb14233367658ff27fb1b36bd5766fa3be77a5..892ea93ec9f7d7a69c401eabadbfcf7c904860cd 100644 --- a/component/pkgconfig/buildout.cfg +++ b/component/pkgconfig/buildout.cfg @@ -9,6 +9,9 @@ extends = ../glib/buildout.cfg ../popt/buildout.cfg +[pkg-config] +<= pkgconfig + [pkgconfig] recipe = hexagonit.recipe.cmmi url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz diff --git a/component/postgresql/buildout.cfg b/component/postgresql/buildout.cfg index e1fb112c1a0502371d8bb1ec1635feac32e929fd..26af77a20fc8f8e8fafb0023a490604292d476ba 100644 --- a/component/postgresql/buildout.cfg +++ b/component/postgresql/buildout.cfg @@ -5,12 +5,28 @@ extends = ../zlib/buildout.cfg ../ncurses/buildout.cfg parts = postgresql - + + [postgresql] +<= postgresql92 + + +[postgresql91] recipe = hexagonit.recipe.cmmi -url = http://ftp.postgresql.org/pub/source/v9.1.6/postgresql-9.1.6.tar.bz2 -md5sum = 000755f66c0de58bbd4cd2b89b45b8e2 +url = http://ftp.postgresql.org/pub/source/v9.1.7/postgresql-9.1.7.tar.bz2 +md5sum = eaf7b67493d59d1a60767ffdfbd65ce9 configure-options = --with-openssl environment = CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib + + +[postgresql92] +recipe = hexagonit.recipe.cmmi +url = http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.bz2 +md5sum = 1cc388988e69bf75c6b55d59070100f6 +configure-options = --with-openssl +environment = + CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib + LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib + diff --git a/component/python-setuptools/buildout.cfg b/component/python-setuptools/buildout.cfg index d65993701bce2cbf43a1429b7cb351a1a7259264..8a1b96f1ad3eb0568e7dd9fda616728b23eaf20c 100644 --- a/component/python-setuptools/buildout.cfg +++ b/component/python-setuptools/buildout.cfg @@ -2,7 +2,8 @@ parts = python-setuptools [setuptools-download] -recipe = slapos.recipe.build:download +recipe = hexagonit.recipe.download +download-only = true filename = setuptools-0.6c11-py2.7.egg url = http://pypi.python.org/packages/2.7/s/setuptools/${:filename} md5sum = fe1f997bc722265116870bc7919059ea diff --git a/component/rpm2cpio/buildout.cfg b/component/rpm2cpio/buildout.cfg index d1e094759c133a2272d43bf1007b9eb76930a7b4..f63c9146871e6cab385355b97f8bb57bc75a2cb7 100644 --- a/component/rpm2cpio/buildout.cfg +++ b/component/rpm2cpio/buildout.cfg @@ -3,6 +3,7 @@ parts = rpm2cpio [rpm2cpio] -recipe = slapos.recipe.build:download +recipe = hexagonit.recipe.download +download-only = true url = https://raw.github.com/ruda/rpm2cpio/e196173f1f6b746463b7398e381b94a42edfa345/rpm2cpio.py md5sum = c5bb6227d99e1ff5df880f997cbed2e3 diff --git a/setup.py b/setup.py index 3bcae4559ffad284d7eefa9e017da33576c4bbf0..e64961a069d0cd0fff747e8e212fb7be081fad84 100755 --- a/setup.py +++ b/setup.py @@ -1,8 +1,34 @@ +############################################################################## +# +# Copyright (c) 2010-2013 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 setuptools import setup, find_packages import glob import os -version = '0.70.1-dev' +version = '0.71.2-dev' name = 'slapos.cookbook' long_description = open("README.txt").read() + "\n" + \ open("CHANGES.txt").read() + "\n" @@ -111,8 +137,8 @@ setup(name=name, 'onetimeupload = slapos.recipe.onetimeupload:Recipe', 'pbs = slapos.recipe.pbs:Recipe', 'postgres = slapos.recipe.postgres:Recipe', - 'postgres.export = slapos.recipe.postgres:ExportRecipe', - 'postgres.import = slapos.recipe.postgres:ImportRecipe', + 'postgres.export = slapos.recipe.postgres.backup:ExportRecipe', + 'postgres.import = slapos.recipe.postgres.backup:ImportRecipe', 'proactive = slapos.recipe.proactive:Recipe', 'publish = slapos.recipe.publish:Recipe', 'publishurl = slapos.recipe.publishurl:Recipe', diff --git a/slapos/recipe/agent/__init__.py b/slapos/recipe/agent/__init__.py index d9639a84d4455d9caea9c761252e2a0bc8da6b9d..9bbe681b736695e2740fbb77a88d5ed7508af6fc 100644 --- a/slapos/recipe/agent/__init__.py +++ b/slapos/recipe/agent/__init__.py @@ -25,65 +25,42 @@ # ############################################################################# -import os -import sys import zc.buildout -import slapos.slap -from slapos.recipe.librecipe import BaseSlapRecipe -from slapos.recipe.librecipe import GenericSlapRecipe -import json -import ConfigParser +from slapos.recipe.librecipe import GenericBaseRecipe +import sys -# XXX: BaseSlapRecipe and GenericSlapRecipe are deprecated, use -# GenericBaseRecipe and move partition parameter fetching to software release. -class Recipe(BaseSlapRecipe, GenericSlapRecipe): +class Recipe(GenericBaseRecipe): def install(self): - self.path_list = [] - crond = self.installCrond() + path_list = [] + + configuration_path = self.options["config"] + header = """[DEFAULT] +master_url = %s +key = %s - slap = slapos.slap.slap() - slap.initializeConnection(self.server_url, self.key_file, self.cert_file) - parameter_dict = slap.registerComputerPartition( - self.computer_id, - self.computer_partition_id, - ).getInstanceParameterDict() +cert = %s + +max_install_duration = %s +max_uninstall_duration = %s +max_request_duration = %s +max_destroy_duration = %s +""" % (self.options["master-url"], + "\n ".join(self.options["key"].split("\n")), + "\n ".join(self.options["cert"].split("\n")), + self.options["default_max_install_duration"], + self.options["default_max_uninstall_duration"], + self.options["default_max_request_duration"], + self.options["default_max_destroy_duration"]) - # XXX: should probably expect one more (SR-originating) parameter instead - # of using self.work_directory . - configuration_path = os.path.join(self.work_directory, "agent.cfg") with open(configuration_path, "w") as configuration: - configuration.write(parameter_dict["configuration"]) - agent_crond_path = os.path.join(crond, "agent") - with open(agent_crond_path, "w") as agent_crond: - agent_crond.write("*/5 * * * * %s -S %s --pidfile=%s --log=%s " - "%s 2>&1 > /dev/null\n" % ( - self.options["python_binary"], - self.options["agent_binary"], - self.options["pidfile"], - self.options["log"], - configuration_path, - )) + configuration.write(header + self.options["configuration"]) + + path_list.append(self.createPythonScript( + self.options['wrapper'], + 'slapos.recipe.librecipe.execute.execute', + [self.options["agent_binary"], '--pidfile=%s' % self.options["pidfile"], + "--log=%s" % self.options["log"], configuration_path])) - return self.path_list + [configuration_path, agent_crond_path] + path_list.append(configuration_path) - def installCrond(self): - _, ws = self.egg.working_set() - 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')], 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')], 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 + return path_list diff --git a/slapos/recipe/apache_frontend/__init__.py b/slapos/recipe/apache_frontend/__init__.py index d0589641e17e265ecc62816b053732fed0a6d4bb..d097dcb9715ae95657936e18802facbc8481d08a 100644 --- a/slapos/recipe/apache_frontend/__init__.py +++ b/slapos/recipe/apache_frontend/__init__.py @@ -28,6 +28,7 @@ from slapos.recipe.librecipe import BaseSlapRecipe import os import pkg_resources import hashlib +import operator import sys import zc.buildout import zc.recipe.egg @@ -43,6 +44,9 @@ class Recipe(BaseSlapRecipe): 'template/%s' % template_name) def _install(self): + # Define directory not defined in deprecated lib + self.service_directory = os.path.join(self.etc_directory, 'service') + # Check for mandatory arguments frontend_domain_name = self.parameter_dict.get("domain") if frontend_domain_name is None: @@ -69,9 +73,17 @@ class Recipe(BaseSlapRecipe): rewrite_rule_list = [] rewrite_rule_zope_list = [] + rewrite_rule_zope_path_list = [] slave_dict = {} service_dict = {} + # Sort slave instance by reference to avoid most security issues + slave_instance_list = sorted(slave_instance_list, + key=operator.itemgetter('slave_reference')) + + # dict of used domains, only used to track duplicates + domain_dict = {} + for slave_instance in slave_instance_list: backend_url = slave_instance.get("url", None) reference = slave_instance.get("slave_reference") @@ -97,6 +109,12 @@ class Recipe(BaseSlapRecipe): domain = "%s.%s" % (reference.replace("-", "").lower(), frontend_domain_name) + if domain_dict.get(domain): + # This domain already has been processed, skip this new one + continue + else: + domain_dict[domain] = True + # Define the URL where the instance will be available # WARNING: we use default ports (443, 80) here. slave_dict[reference] = "%s%s/" % (scheme, domain) @@ -118,6 +136,9 @@ class Recipe(BaseSlapRecipe): # RewriteMap for Zope Virtual Host Monster websites. if slave_instance.get("type", "").lower() in ['zope']: rewrite_rule_zope_list.append(rewrite_rule) + # For Zope, we have another dict containing the path e.g '/erp5/... + rewrite_rule_path = "%s %s" % (domain, slave_instance.get('path', '')) + rewrite_rule_zope_path_list.append(rewrite_rule_path) else: rewrite_rule_list.append(rewrite_rule) @@ -152,6 +173,7 @@ class Recipe(BaseSlapRecipe): name=frontend_domain_name, rewrite_rule_list=rewrite_rule_list, rewrite_rule_zope_list=rewrite_rule_zope_list, + rewrite_rule_zope_path_list=rewrite_rule_zope_path_list, key=key, certificate=certificate) # Send connection informations about each slave @@ -160,9 +182,12 @@ class Recipe(BaseSlapRecipe): "instance: %s" % reference) try: connection_dict = { - 'frontend_ipv6_address': self.getGlobalIPv6Address(), - 'frontend_ipv4_address': self.getLocalIPv4Address(), - 'site_url': url + # Send the public IPs (if possible) so that user knows what IP + # to bind to its domain name + 'frontend_ipv6_address': self.getGlobalIPv6Address(), + 'frontend_ipv4_address': self.parameter_dict.get("public-ipv4", + self.getLocalIPv4Address()), + 'site_url': url, } self.setConnectionDict(connection_dict, reference) except: @@ -289,7 +314,7 @@ class Recipe(BaseSlapRecipe): self._createDirectory(crontabs) wrapper = zc.buildout.easy_install.scripts([('crond', 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, - self.wrapper_directory, arguments=[ + self.service_directory, arguments=[ self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, '-t', timestamps, '-f', '-l', '5', '-M', catcher] )[0] @@ -346,10 +371,13 @@ class Recipe(BaseSlapRecipe): ) self._writeFile(openssl_configuration, pkg_resources.resource_string( __name__, 'template/openssl.cnf.ca.in') % config) + + # XXX-Cedric: Don't use this, but use slapos.recipe.certificate_authority + # from the instance profile. self.path_list.extend(zc.buildout.easy_install.scripts([ ('certificate_authority', __name__ + '.certificate_authority', 'runCertificateAuthority')], - self.ws, sys.executable, self.wrapper_directory, arguments=[dict( + self.ws, sys.executable, self.service_directory, arguments=[dict( openssl_configuration=openssl_configuration, openssl_binary=self.options['openssl_binary'], certificate=os.path.join(self.ca_dir, 'cacert.pem'), @@ -382,6 +410,8 @@ class Recipe(BaseSlapRecipe): name + '.lock') apache_conf['document_root'] = os.path.join(self.data_root_directory, 'htdocs') + apache_conf['instance_home'] = os.path.join(self.work_directory) + apache_conf['httpd_home'] = self.options['httpd_home'] apache_conf['ip_list'] = ip_list apache_conf['port'] = port apache_conf['server_admin'] = 'admin@' @@ -419,10 +449,11 @@ class Recipe(BaseSlapRecipe): "-f", config_file, "-a", varnish_config["port"], "-T", varnish_config["control_port"], "-s", varnish_config["storage"]] - environment = dict(PATH=self.options["binutils_directory"]) + environment = dict(PATH="%s:%s" % (self.options["binutils_directory"], + os.environ.get('PATH'))) wrapper = zc.buildout.easy_install.scripts([(name, 'slapos.recipe.librecipe.execute', 'executee')], self.ws, - sys.executable, self.wrapper_directory, arguments=[varnish_argument_list, + sys.executable, self.service_directory, arguments=[varnish_argument_list, environment])[0] self.path_list.append(wrapper) @@ -461,7 +492,7 @@ class Recipe(BaseSlapRecipe): stunnel_conf)) wrapper = zc.buildout.easy_install.scripts([('stunnel', 'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws, - sys.executable, self.wrapper_directory, arguments=[ + sys.executable, self.service_directory, arguments=[ [self.options['stunnel_binary'].strip(), stunnel_conf_path], [certificate, key]] )[0] @@ -470,8 +501,17 @@ class Recipe(BaseSlapRecipe): def installFrontendApache(self, ip_list, key, certificate, name, port=4443, plain_http_port=8080, - rewrite_rule_list=[], rewrite_rule_zope_list=[], + rewrite_rule_list=None, + rewrite_rule_zope_list=None, + rewrite_rule_zope_path_list=None, access_control_string=None): + if rewrite_rule_list is None: + rewrite_rule_list = [] + if rewrite_rule_zope_list is None: + rewrite_rule_zope_list = [] + if rewrite_rule_zope_path_list is None: + rewrite_rule_zope_path_list = [] + # Create htdocs, populate it with default 404 document htdocs_location = os.path.join(self.data_root_directory, 'htdocs') self._createDirectory(htdocs_location) @@ -488,16 +528,21 @@ class Recipe(BaseSlapRecipe): self._createDirectory(cache_directory_location) self._createDirectory(mod_ssl_cache_location) - # Create "custom" apache configuration file if it does not exist. - # Note : This file won't be erased or changed when slapgrid is ran. + # Create "custom" apache configuration files if it does not exist. + # Note : Those files won't be erased or changed when slapgrid is ran. # It can be freely customized by node admin. custom_apache_configuration_directory = os.path.join( self.data_root_directory, 'apache-conf.d') self._createDirectory(custom_apache_configuration_directory) + # First one is included in the end of the apache configuration file custom_apache_configuration_file_location = os.path.join( custom_apache_configuration_directory, 'apache_frontend.custom.conf') - f = open(custom_apache_configuration_file_location, 'a') - f.close() + open(custom_apache_configuration_file_location, 'a') + # Second one is included in the virtualhost of apache configuration file + custom_apache_virtual_configuration_file_location = os.path.join( + custom_apache_configuration_directory, + 'apache_frontend.virtualhost.custom.conf') + open(custom_apache_virtual_configuration_file_location, 'a') # Create backup of custom apache configuration backup_path = self.createBackupDirectory('custom_apache_conf_backup') @@ -512,9 +557,14 @@ class Recipe(BaseSlapRecipe): # Create configuration file and rewritemaps apachemap_name = "apachemap.txt" apachemapzope_name = "apachemapzope.txt" + apachemapzopepath_name = "apachemapzopepath.txt" + self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list)) self.createConfigurationFile(apachemapzope_name, "\n".join(rewrite_rule_zope_list)) + self.createConfigurationFile(apachemapzopepath_name, + "\n".join(rewrite_rule_zope_path_list)) + apache_conf = self._getApacheConfigurationDict(name, ip_list, port) apache_conf['ssl_snippet'] = self.substituteTemplate( self.getTemplateFilename('apache.ssl-snippet.conf.in'), @@ -532,16 +582,22 @@ class Recipe(BaseSlapRecipe): path = self.substituteTemplate( self.getTemplateFilename('apache.conf.path-protected.in'), - dict(path='/', access_control_string='none')) + dict(path='/', + access_control_string='none', + document_root=apache_conf['document_root'], + ) + ) apache_conf.update(**dict( path_enable=path, apachemap_path=os.path.join(self.etc_directory, apachemap_name), apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name), + apachemapzopepath_path=os.path.join(self.etc_directory, apachemapzopepath_name), apache_domain=name, https_port=port, plain_http_port=plain_http_port, custom_apache_conf=custom_apache_configuration_file_location, + custom_apache_virtualhost_conf=custom_apache_virtual_configuration_file_location, )) apache_conf_string = self.substituteTemplate( @@ -553,7 +609,7 @@ class Recipe(BaseSlapRecipe): self.path_list.extend(zc.buildout.easy_install.scripts([( 'frontend_apache', 'slapos.recipe.erp5.apache', 'runApache')], self.ws, - sys.executable, self.wrapper_directory, arguments=[ + sys.executable, self.service_directory, arguments=[ dict( required_path_list=[key, certificate], binary=self.options['httpd_binary'], diff --git a/slapos/recipe/apache_frontend/template/apache.conf.in b/slapos/recipe/apache_frontend/template/apache.conf.in index 6090c18319df658a321733ef6e64ad5173fdf17a..c03ab8cb9b87a52d52d11e16a0cfa4a7d2f55f20 100644 --- a/slapos/recipe/apache_frontend/template/apache.conf.in +++ b/slapos/recipe/apache_frontend/template/apache.conf.in @@ -5,12 +5,13 @@ PidFile "%(pid_file)s" ServerName %(server_name)s DocumentRoot %(document_root)s +ServerRoot %(instance_home)s %(listen)s ServerAdmin %(server_admin)s DefaultType text/plain -TypesConfig conf/mime.types +TypesConfig %(httpd_home)s/conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz @@ -22,8 +23,8 @@ ServerTokens Prod # Log configuration ErrorLog "%(error_log)s" LogLevel warn -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common +LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined +LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b" common CustomLog "%(access_log)s" common %(path_enable)s @@ -32,23 +33,23 @@ CustomLog "%(access_log)s" common #LoadModule unixd_module modules/mod_unixd.so #LoadModule access_compat_module modules/mod_access_compat.so #LoadModule authz_core_module modules/mod_authz_core.so -LoadModule authz_host_module modules/mod_authz_host.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule deflate_module modules/mod_deflate.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule version_module modules/mod_version.so -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_http_module modules/mod_proxy_http.so -LoadModule ssl_module modules/mod_ssl.so -LoadModule mime_module modules/mod_mime.so -LoadModule dav_module modules/mod_dav.so -LoadModule dav_fs_module modules/mod_dav_fs.so -LoadModule negotiation_module modules/mod_negotiation.so -LoadModule rewrite_module modules/mod_rewrite.so -LoadModule headers_module modules/mod_headers.so -LoadModule cache_module modules/mod_cache.so -LoadModule mem_cache_module modules/mod_mem_cache.so -LoadModule antiloris_module modules/mod_antiloris.so +LoadModule authz_host_module %(httpd_home)s/modules/mod_authz_host.so +LoadModule log_config_module %(httpd_home)s/modules/mod_log_config.so +LoadModule deflate_module %(httpd_home)s/modules/mod_deflate.so +LoadModule setenvif_module %(httpd_home)s/modules/mod_setenvif.so +LoadModule version_module %(httpd_home)s/modules/mod_version.so +LoadModule proxy_module %(httpd_home)s/modules/mod_proxy.so +LoadModule proxy_http_module %(httpd_home)s/modules/mod_proxy_http.so +LoadModule ssl_module %(httpd_home)s/modules/mod_ssl.so +LoadModule mime_module %(httpd_home)s/modules/mod_mime.so +LoadModule dav_module %(httpd_home)s/modules/mod_dav.so +LoadModule dav_fs_module %(httpd_home)s/modules/mod_dav_fs.so +LoadModule negotiation_module %(httpd_home)s/modules/mod_negotiation.so +LoadModule rewrite_module %(httpd_home)s/modules/mod_rewrite.so +LoadModule headers_module %(httpd_home)s/modules/mod_headers.so +LoadModule cache_module %(httpd_home)s/modules/mod_cache.so +LoadModule mem_cache_module %(httpd_home)s/modules/mod_mem_cache.so +LoadModule antiloris_module %(httpd_home)s/modules/mod_antiloris.so # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. @@ -99,17 +100,28 @@ Header append Vary User-Agent ProxyTimeout 600 RewriteEngine On - # Define the two rewritemaps : one for zope, one generic + # Include configuration file not operated by slapos. This file won't be erased + # or changed when slapgrid is ran. It can be freely customized by node admin. + Include %(custom_apache_virtualhost_conf)s + + # Define the two RewriteMaps (key -> value store): one for Zope, one generic + # containing: rewritten URL -> original URL (a.k.a VirtualHostBase in Zope) RewriteMap apachemapzope txt:%(apachemapzope_path)s RewriteMap apachemapgeneric txt:%(apachemap_path)s + # Define another RewriteMap for Zope, containing: + # rewritten URL -> VirtualHostRoot + RewriteMap apachemapzopepath txt:%(apachemapzopepath_path)s + # First, we check if we have a zope backend server # If so, let's use Virtual Host Daemon rewrite RewriteCond ${apachemapzope:%%{SERVER_NAME}} >"" - RewriteRule ^/(.*)$ ${apachemapzope:%%{SERVER_NAME}}/VirtualHostBase/https/%%{SERVER_NAME}:%%{SERVER_PORT}/VirtualHostRoot/$1 [L,P] + # We suppose that Apache listens to 443 (even indirectly thanks to things like iptables) + RewriteRule ^/(.*)$ ${apachemapzope:%%{SERVER_NAME}}/VirtualHostBase/https/%%{SERVER_NAME}:443/${apachemapzopepath:%%{SERVER_NAME}}/VirtualHostRoot/$1 [L,P] # If we have generic backend server, let's rewrite without virtual host daemon RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" + # We suppose that Apache listens to 443 (even indirectly thanks to things like iptables) RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P] # If nothing exist : put a nice error @@ -120,6 +132,10 @@ Header append Vary User-Agent RewriteEngine On ProxyPreserveHost On + # Include configuration file not operated by slapos. This file won't be erased + # or changed when slapgrid is ran. It can be freely customized by node admin. + Include %(custom_apache_virtualhost_conf)s + # We accept generic (i.e not lamp) backends on http RewriteMap apachemapgeneric txt:%(apachemap_path)s RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" diff --git a/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in b/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in index 0644a2afec06f030dd4663d0f4a3280af12d5fed..861e39188c5290c4c38a2120fa7788871e34ad5c 100644 --- a/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in +++ b/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in @@ -1,5 +1,9 @@ -# Path protected -<Location %(path)s> +<Directory %(path)s> Order Deny,Allow Allow from %(access_control_string)s -</Location> +</Directory> + +<Directory %(document_root)s> + Order Allow,Deny + Allow from All +</Directory> diff --git a/slapos/recipe/apachephp/__init__.py b/slapos/recipe/apachephp/__init__.py index cf29bc36fd246acd6d1c9f4e0f5410fb3e168315..97e939e84e7939dc326b9ff5bf996a33298e4d50 100644 --- a/slapos/recipe/apachephp/__init__.py +++ b/slapos/recipe/apachephp/__init__.py @@ -24,13 +24,17 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## + import shutil import os import signal +import subprocess + from binascii import b2a_uu as uuencode from slapos.recipe.librecipe import GenericBaseRecipe + class Recipe(GenericBaseRecipe): def install(self): @@ -66,11 +70,13 @@ class Recipe(GenericBaseRecipe): ) path_list.append(httpd_conf) - wrapper = self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - [self.options['httpd-binary'], '-f', self.options['httpd-conf'], - '-DFOREGROUND'] - ) + wrapper = self.createWrapper(name=self.options['wrapper'], + command=self.options['httpd-binary'], + parameters=[ + '-f', + self.options['httpd-conf'], + '-DFOREGROUND' + ]) path_list.append(wrapper) secret_key_filename = os.path.join(self.buildout['buildout']['directory'], @@ -110,12 +116,16 @@ class Recipe(GenericBaseRecipe): self.substituteTemplate(self.options['template'], application_conf)) path_list.append(config) - if os.path.exists(self.options['pid-file']): - # Reload apache configuration - with open(self.options['pid-file']) as pid_file: - pid = int(pid_file.read().strip(), 10) - try: - os.kill(pid, signal.SIGUSR1) # Graceful restart - except OSError: - pass + # Reload apache configuration. + # notez-bien: a graceful restart or a SIGUSR1 can somehow hang the apache threads. + + subprocess.call([ + self.options['httpd-binary'], + '-f', + self.options['httpd-conf'], + '-k', + 'graceful' + ]) + return path_list + diff --git a/slapos/recipe/apacheproxy/__init__.py b/slapos/recipe/apacheproxy/__init__.py index e494cfd6ab6d862bad74e759c551ae29a3aefdd4..0d6b3528679b9945bac7454319de2d61cc76d414 100644 --- a/slapos/recipe/apacheproxy/__init__.py +++ b/slapos/recipe/apacheproxy/__init__.py @@ -24,8 +24,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## -import os -import signal +import subprocess from slapos.recipe.librecipe import GenericBaseRecipe @@ -50,17 +49,23 @@ class Recipe(GenericBaseRecipe): ) path_list.append(httpd_conf) - wrapper = self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - [self.options['httpd-binary'], '-f', self.options['httpd-conf'], - '-DFOREGROUND'] - ) + wrapper = self.createWrapper(name=self.options['wrapper'], + command=self.options['httpd-binary'], + parameters=[ + '-f', + self.options['httpd-conf'], + '-DFOREGROUND', + ]) + path_list.append(wrapper) - if os.path.exists(self.options['pid-file']): - # Reload apache configuration - with open(self.options['pid-file']) as pid_file: - pid = int(pid_file.read().strip(), 10) - os.kill(pid, signal.SIGUSR1) # Graceful restart + subprocess.call([ + self.options['httpd-binary'], + '-f', + self.options['httpd-conf'], + '-k', + 'graceful', + ]) return path_list + diff --git a/slapos/recipe/check_port_listening/__init__.py b/slapos/recipe/check_port_listening/__init__.py index 542072d68f8b9e331dd52f88e8557cc1e406d250..144ab07fba3f89a4269ed0e1e583e7379dbc4010 100644 --- a/slapos/recipe/check_port_listening/__init__.py +++ b/slapos/recipe/check_port_listening/__init__.py @@ -1,3 +1,4 @@ +# vim: set et sts=2: ############################################################################## # # Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved. diff --git a/slapos/recipe/check_port_listening/template/socket_connection_attempt.py.in b/slapos/recipe/check_port_listening/template/socket_connection_attempt.py.in index 7c7a2699123fffd451900f6f604b2c74133dd68f..0c92e3b17db3df7574b40fdfadc52c68d7c4196d 100644 --- a/slapos/recipe/check_port_listening/template/socket_connection_attempt.py.in +++ b/slapos/recipe/check_port_listening/template/socket_connection_attempt.py.in @@ -7,15 +7,10 @@ import sys hostname = "%(hostname)s" port = %(port)s -connection_okay = False - try: s = socket.create_connection((hostname, port)) - connection_okay = True s.close() except (socket.error, socket.timeout): - connection_okay = False - -if not connection_okay: - print >> sys.stderr, "%(port)s on %(hostname)s isn't listening" + sys.stderr.write("%(port)s on %(hostname)s isn't listening\n") sys.exit(127) + diff --git a/slapos/recipe/postgres/__init__.py b/slapos/recipe/postgres/__init__.py index c44d627bacc9a46b573e7dfab0a39ab7301c21a5..2d88bc8e09e2d35c60142d4dac3ae820bf634262 100644 --- a/slapos/recipe/postgres/__init__.py +++ b/slapos/recipe/postgres/__init__.py @@ -40,47 +40,58 @@ class Recipe(GenericBaseRecipe): This recipe creates: - a Postgres cluster - - configuration to allow connections from IPV6 only (or unix socket) + - configuration to allow connections from IPv4, IPv6 or unix socket. - a superuser with provided name and generated password - a database with provided name - - a foreground start script in the services directory - - then adds the connection URL to the options. - The URL can be used as-is (ie. in sqlalchemy) or by the _urlparse.py recipe. + - a start script in the services directory + + Required options: + bin + path to the 'initdb' and 'postgres' binaries. + dbname + name of the database to be used by the application. + ipv4 + set of ipv4 to listen on. + ipv6 + set of ipv6 to listen on. + pgdata-directory + path to postgres configuration and data. + services + must be ${buildout:directory}/etc/service. + superuser + name of the superuser to create. + + Exposed options: + password + generated password for the superuser. + url + generated DBAPI connection string. + it can be used as-is (ie. in sqlalchemy) or by the _urlparse.py recipe. """ - def fetch_ipv6_host(self, options): - """ - Returns a string represtation of ipv6_host. - May receive a regular string, a set or a string serialized by buildout. - """ - ipv6_host = options['ipv6_host'] - - if isinstance(ipv6_host, set): - return ipv6_host.pop() - else: - return ipv6_host - - def _options(self, options): options['password'] = self.generatePassword() - options['url'] = 'postgresql://%(user)s:%(password)s@[%(ipv4_host)s]:%(port)s/%(dbname)s' % options + options['url'] = 'postgresql://%(superuser)s:%(password)s@[%(ipv6_random)s]:%(port)s/%(dbname)s' % options def install(self): pgdata = self.options['pgdata-directory'] + # if the pgdata already exists, skip all steps, we don't need to do anything. + if not os.path.exists(pgdata): self.createCluster() self.createConfig() self.createDatabase() - self.createSuperuser() + self.updateSuperuser() self.createRunScript() - return [ - # XXX should we really return something here? - # os.path.join(pgdata, 'postgresql.conf') - ] + # install() methods usually return the pathnames of managed files. + # If they are missing, they will be rebuilt. + # In this case, we already check for the existence of pgdata, + # so we don't need to return anything here. + + return [] def check_exists(self, path): @@ -89,6 +100,12 @@ class Recipe(GenericBaseRecipe): def createCluster(self): + """\ + A Postgres cluster is "a collection of databases that is managed + by a single instance of a running database server". + + Here we create an empty cluster. + """ initdb_binary = os.path.join(self.options['bin'], 'initdb') self.check_exists(initdb_binary) @@ -99,6 +116,7 @@ class Recipe(GenericBaseRecipe): '-D', pgdata, '-A', 'ident', '-E', 'UTF8', + '-U', self.options['superuser'], ]) except subprocess.CalledProcessError: raise UserError('Could not create cluster directory in %s' % pgdata) @@ -106,10 +124,12 @@ class Recipe(GenericBaseRecipe): def createConfig(self): pgdata = self.options['pgdata-directory'] + ipv4 = self.options['ipv4'] + ipv6 = self.options['ipv6'] with open(os.path.join(pgdata, 'postgresql.conf'), 'wb') as cfg: cfg.write(textwrap.dedent("""\ - listen_addresses = '%s,%s' + listen_addresses = '%s' logging_collector = on log_rotation_size = 50MB max_connections = 100 @@ -124,49 +144,54 @@ class Recipe(GenericBaseRecipe): unix_socket_directory = '%s' unix_socket_permissions = 0700 """ % ( - self.options['ipv4_host'], - self.fetch_ipv6_host(self.options), + ','.join(ipv4.union(ipv6)), pgdata, ))) - with open(os.path.join(pgdata, 'pg_hba.conf'), 'wb') as cfg: - # see http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html + # see http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html - cfg.write(textwrap.dedent("""\ - # TYPE DATABASE USER ADDRESS METHOD + cfg_lines = [ + '# TYPE DATABASE USER ADDRESS METHOD', + '', + '# "local" is for Unix domain socket connections only (check unix_socket_permissions!)', + 'local all all ident', + 'host all all 127.0.0.1/32 md5', + 'host all all ::1/128 md5', + ] - # "local" is for Unix domain socket connections only (check unix_socket_permissions!) - local all all ident - host all all 127.0.0.1/32 md5 - host all all %s/32 md5 - host all all ::1/128 md5 - host all all %s/128 md5 - """ % (self.options['ipv4_host'], self.fetch_ipv6_host(self.options)))) + for ip in ipv4: + cfg_lines.append('host all all %s/32 md5' % ip) + + for ip in ipv6: + cfg_lines.append('host all all %s/128 md5' % ip) + + cfg.write('\n'.join(cfg_lines)) def createDatabase(self): self.runPostgresCommand(cmd='CREATE DATABASE "%s"' % self.options['dbname']) - def createSuperuser(self): - """ - Creates a Postgres superuser - other than "slapuser#" for use by the application. + def updateSuperuser(self): + """\ + Set a password for the cluster administrator. + The application will also use it for its connections. """ # http://postgresql.1045698.n5.nabble.com/Algorithm-for-generating-md5-encrypted-password-not-found-in-documentation-td4919082.html - user = self.options['user'] + user = self.options['superuser'] password = self.options['password'] # encrypt the password to avoid storing in the logs enc_password = 'md5' + md5.md5(password+user).hexdigest() - self.runPostgresCommand(cmd="""CREATE USER "%s" ENCRYPTED PASSWORD '%s' SUPERUSER""" % (user, enc_password)) + self.runPostgresCommand(cmd="""ALTER USER "%s" ENCRYPTED PASSWORD '%s'""" % (user, enc_password)) def runPostgresCommand(self, cmd): - """ + """\ Executes a command in single-user mode, with no daemon running. Multiple commands can be executed by providing newlines, @@ -190,7 +215,7 @@ class Recipe(GenericBaseRecipe): def createRunScript(self): - """ + """\ Creates a script that runs postgres in the foreground. 'exec' is used to allow easy control by supervisor. """ @@ -203,58 +228,3 @@ class Recipe(GenericBaseRecipe): self.createExecutable(name, content=content) - -class ExportRecipe(GenericBaseRecipe): - - def install(self): - pgdata = self.options['pgdata-directory'] - wrapper = self.options['wrapper'] - self.createBackupScript(wrapper) - return [wrapper] - - - def createBackupScript(self, wrapper): - """ - Create a script to backup the database in 'custom' format. - """ - content = textwrap.dedent("""\ - #!/bin/sh - umask 077 - %(bin)s/pg_dump \\ - --host=%(pgdata-directory)s \\ - --format=custom \\ - --file=%(backup-directory)s/database.dump \\ - %(dbname)s - """ % self.options) - self.createExecutable(wrapper, content=content) - - - -class ImportRecipe(GenericBaseRecipe): - - def install(self): - pgdata = self.options['pgdata-directory'] - wrapper = self.options['wrapper'] - self.createRestoreScript(wrapper) - return [wrapper] - - - def createRestoreScript(self, wrapper): - """ - Create a script to restore the database from 'custom' format. - """ - content = textwrap.dedent("""\ - #!/bin/sh - %(bin)s/pg_restore \\ - --host=%(pgdata-directory)s \\ - --dbname=%(dbname)s \\ - --clean \\ - --no-owner \\ - --no-acl \\ - %(backup-directory)s/database.dump - """ % self.options) - self.createExecutable(wrapper, content=content) - - - - diff --git a/slapos/recipe/postgres/backup.py b/slapos/recipe/postgres/backup.py new file mode 100644 index 0000000000000000000000000000000000000000..4341fe345d176b77b30f4ac48e1f1a3511605b18 --- /dev/null +++ b/slapos/recipe/postgres/backup.py @@ -0,0 +1,113 @@ +############################################################################## +# +# 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 textwrap + +from slapos.recipe.librecipe import GenericBaseRecipe + + + +class ExportRecipe(GenericBaseRecipe): + """\ + This recipe creates an exporter script for using with the resilient stack. + + Required options: + backup-directory + folder that will contain the dump file. + bin + path to the 'pg_dump' binary. + dbname + name of the database to dump. + pgdata-directory + path to postgres configuration and data. + wrapper + full path of the exporter script to create. + """ + + def install(self): + wrapper = self.options['wrapper'] + self.createBackupScript(wrapper) + return [wrapper] + + + def createBackupScript(self, wrapper): + """\ + Create a script to backup the database in 'custom' format. + """ + content = textwrap.dedent("""\ + #!/bin/sh + umask 077 + %(bin)s/pg_dump \\ + --host=%(pgdata-directory)s \\ + --format=custom \\ + --file=%(backup-directory)s/database.dump \\ + %(dbname)s + """ % self.options) + self.createExecutable(wrapper, content=content) + + + +class ImportRecipe(GenericBaseRecipe): + """\ + This recipe creates an importer script for using with the resilient stack. + + Required options: + backup-directory + folder that contains the dump file. + bin + path to the 'pg_restore' binary. + dbname + name of the database to restore. + pgdata-directory + path to postgres configuration and data. + wrapper + full path of the importer script to create. + """ + + def install(self): + wrapper = self.options['wrapper'] + self.createRestoreScript(wrapper) + return [wrapper] + + + def createRestoreScript(self, wrapper): + """\ + Create a script to restore the database from 'custom' format. + """ + content = textwrap.dedent("""\ + #!/bin/sh + %(bin)s/pg_restore \\ + --host=%(pgdata-directory)s \\ + --dbname=%(dbname)s \\ + --clean \\ + --no-owner \\ + --no-acl \\ + %(backup-directory)s/database.dump + """ % self.options) + self.createExecutable(wrapper, content=content) + + diff --git a/slapos/recipe/request.py b/slapos/recipe/request.py index 4ba9e36938497331eba54df88d2961126cafca96..f8b5ec5ef2d17aa8d9e2721d9fbcbfa8bce04805 100644 --- a/slapos/recipe/request.py +++ b/slapos/recipe/request.py @@ -179,8 +179,10 @@ class RequestOptional(Recipe): """ def install(self): if self._raise_request_exception_formatted: - self.logger.warning('Optional request failed:') - self.logger.warning(self._raise_request_exception_formatted) + self.logger.warning('Optional request failed.') + if not isinstance(self._raise_request_exception, slapmodule.NotFoundError): + # full traceback for optional 'not found' is too verbose and confusing + self.logger.warning(self._raise_request_exception_formatted) elif self.failed is not None: # Check instance status to know if instance has been deployed try: diff --git a/slapos/recipe/slapconfiguration.py b/slapos/recipe/slapconfiguration.py index 59f8f939585c8864ff3dd224efb167a659ef80e7..36f9a8a12437d70ef1a9fc1a6d2fffdc7465a5be 100644 --- a/slapos/recipe/slapconfiguration.py +++ b/slapos/recipe/slapconfiguration.py @@ -64,6 +64,10 @@ class Recipe(object): Set of IPv4 addresses. ipv6 Set of IPv6 addresses. + ipv4_random + One of the IPv4 addresses. + ipv6_random + One of the IPv6 addresses. tap Set of TAP interfaces. configuration @@ -109,6 +113,13 @@ class Recipe(object): # XXX: emit warning on unknown address type ? options['ipv4'] = ipv4_set options['ipv6'] = ipv6_set + + # also export single ip values for those recipes that don't support sets. + if ipv4_set: + options['ipv4_random'] = list(ipv4_set)[0] + if ipv6_set: + options['ipv6_random'] = list(ipv6_set)[0] + options['tap'] = tap_set options['configuration'] = parameter_dict match = self.OPTCRE_match diff --git a/software/SilverStripe/software.cfg b/software/SilverStripe/software.cfg deleted file mode 100644 index fb608cf1404188bffb4acea9a03e2db31b1fc05d..0000000000000000000000000000000000000000 --- a/software/SilverStripe/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[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:download-unpacked -url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.5.tar.gz -md5sum = de6ab0146c27bbc72287670e0697e2ba - -[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 -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.1 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[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/agent/instance-agent.cfg b/software/agent/instance-agent.cfg new file mode 100644 index 0000000000000000000000000000000000000000..90b9ec77782c2329b050ecb0626a7042ac9c0e75 --- /dev/null +++ b/software/agent/instance-agent.cfg @@ -0,0 +1,31 @@ +[buildout] +parts = + instance + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +[instance] +recipe = ${instance-recipe:egg}:${instance-recipe:module} +agent_binary = ${buildout:directory}/bin/agent +pidfile = $${directory:srv}/agent.pid +log = $${directory:agentlog}/agent.log +wrapper = $${directory:run}/agent +config = $${directory:etc}/agent.cfg +master-url = $${slap-parameter:master-url} +key = $${slap-parameter:userkey} +cert = $${slap-parameter:usercertificate} +configuration = $${slap-parameter:configuration} +default_max_install_duration = $${slap-parameter:default_max_install_duration} +default_max_uninstall_duration = $${slap-parameter:default_max_uninstall_duration} +default_max_request_duration = $${slap-parameter:default_max_request_duration} +default_max_destroy_duration = $${slap-parameter:default_max_destroy_duration} + +[directory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc +run = $${:etc}/run +agentlog = $${buildout:directory}/var/log/agent +srv = $${buildout:directory}/srv +bin = $${buildout:directory}/bin diff --git a/software/agent/instance.cfg b/software/agent/instance.cfg index f949ed97ea1191442a16847e8a59284ac168ae86..d2a17136be1071df99295761ee376d781816c918 100644 --- a/software/agent/instance.cfg +++ b/software/agent/instance.cfg @@ -1,23 +1,11 @@ [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} -agent_binary = ${buildout:directory}/bin/agent -report_start = ${buildout:directory}/bin/report_start -report_stop = ${buildout:directory}/bin/report_stop -dcrond_binary = ${dcron:location}/sbin/crond -python_binary = ${python2.7:location}/bin/python -pidfile = $${rootdirectory:run}/agent.pid -log = $${rootdirectory:agentlog}/agent.log - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -run = $${buildout:directory}/etc/run -agentlog = $${buildout:directory}/var/log/agent -srv = $${buildout:directory}/srv -bin = $${buildout:directory}/bin +[switch_softwaretype] +recipe = slapos.cookbook:softwaretype +default = ${template-agent:output} diff --git a/software/agent/software.cfg b/software/agent/software.cfg index da544a183b5d704a35ad5213ff8a72e05e770d16..f08ce9e35b578468cc753feb73cae0d0a3b2eb04 100644 --- a/software/agent/software.cfg +++ b/software/agent/software.cfg @@ -1,59 +1,92 @@ [buildout] extends = - ../../component/dcron/buildout.cfg - ../../component/python-2.7/buildout.cfg ../../component/lxml-python/buildout.cfg + ../../component/git/buildout.cfg ../../stack/slapos.cfg +develop = + ${:parts-directory}/slapos.cookbook-repository + ${:parts-directory}/slapos.toolbox-repository + parts = template - eggs + template-agent + slapos.cookbook-repository + check-recipe + slapos.toolbox-repository + check-recipe-toolbox instance-recipe-egg - dcron - python2.7 script +# Local development +[slapos.cookbook-repository] +recipe = plone.recipe.command +stop-on-error = true +branch = agent +location = ${buildout:parts-directory}/${:_buildout_section_name_} +command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.git ${:location} +update-command = cd ${:location} && ${git:location}/bin/git pull --quiet + +[check-recipe] +recipe = plone.recipe.command +stop-on-error = true +update-command = ${:command} +command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link + +[slapos.toolbox-repository] +recipe = plone.recipe.command +stop-on-error = true +branch = agent +location = ${buildout:parts-directory}/${:_buildout_section_name_} +command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.toolbox.git ${:location} +update-command = cd ${:location} && ${git:location}/bin/git pull --quiet + +[check-recipe-toolbox] +recipe = plone.recipe.command +stop-on-error = true +update-command = ${:command} +command = grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link + [instance-recipe] +# XXX-Cedric: it can use newest slapos.cfg to not have duplication egg = slapos.cookbook module = agent [instance-recipe-egg] +# XXX-Cedric: it can use newest slapos.cfg to not have duplication recipe = zc.recipe.egg -python = python2.7 -eggs = ${instance-recipe:egg} +eggs = + ${lxml-python:egg} + ${instance-recipe:egg} [template] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg output = ${buildout:directory}/template.cfg -md5sum = c7cb98594f394d05baedabe424643f6f +md5sum = bcd3b3cb8a305c83bb048d5ac1c583fe mode = 0644 -[eggs] -python = python2.7 -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - slapos.cookbook - slapos.toolbox - erp5.util - -[lxml-python] -python = python2.7 +[template-agent] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance-agent.cfg +output = ${buildout:directory}/template-agent.cfg +md5sum = fd9670d8473be402b10990398b553b00 +mode = 0644 [script] recipe = z3c.recipe.scripts -python = python2.7 eggs = zc.buildout - ${lxml-python:egg} slapos.core - slapos.cookbook slapos.toolbox[agent] + erp5.util [networkcache] # signature certificates of the following uploaders. # Romain Courteaud +# Cedric de Saint Martin +# Rafael Monnerat +# Test agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE @@ -68,3 +101,42 @@ signature-certificate-list = q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g QUUGLQ== -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT + MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB + D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1 + P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O + BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp + cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr + b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV + Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby + If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAOcKrOH/2Da6MA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMjk3MCAXDTEyMDYyNjAzMDU1MVoYDzIxMTIwNjAyMDMwNTUxWjAT + MREwDwYDVQQDDAhDT01QLTI5NzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + xzbOGlcoin2q+Mtp52r26Njliz2aoxIXbnOBUyDc/OGtk9nWA5uBtTc2zwR17um6 + KV0bGyvuBA78XcvU+AIV/5s0ohBAX7yjRKmEhAYcFvov3EyWSdjOrqqo4qFSzOrK + sVQBlxIDpjQBH4F3lf6dBv6/M+tCT3iSv3aOZbsG0E8CAwEAAaNQME4wHQYDVR0O + BBYEFLqtrfTu+BIVt+TFiRUkIoiWIYrxMB8GA1UdIwQYMBaAFLqtrfTu+BIVt+TF + iRUkIoiWIYrxMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAc8N5P5gW + Jrdk9gF/3Cpp6THDiy93+WcuAm7zFwXPFNttJtFKMNObP2YRZvsQkvjezfrZoRBF + j8LgKB3tZCbBj+HDj+AeD+q9V+cqMFLKc6LezvQYUuum6bZdfUNnPv1K1ULYSPjq + /jsRBbabCWSXqxR6gYEM6ooauj3udBMXhHE= + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- diff --git a/software/agora/instance.cfg b/software/agora/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..0a6e322e3d359b17d405dd87b73354c681c821f3 --- /dev/null +++ b/software/agora/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = utilisateur +constraint = `id_utilisateur`>0 diff --git a/software/agora/software.cfg b/software/agora/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..d92f474b9b985815ac4569b3800a134f8038145e --- /dev/null +++ b/software/agora/software.cfg @@ -0,0 +1,37 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.agora-project.net/agora-project.zip +md5sum = 3fecb27ca5d3bb6c263dbd87113f3cce + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] diff --git a/software/apache-frontend/README.apache_frontend.txt b/software/apache-frontend/README.apache_frontend.txt index 078330a5be9d433c40f23870dd1cecd6f8d2c4b1..cac4c83ab04cae2c84daa39cedbb38b4c67dff7c 100644 --- a/software/apache-frontend/README.apache_frontend.txt +++ b/software/apache-frontend/README.apache_frontend.txt @@ -9,15 +9,22 @@ It means that a single main instance of Apache will be used to act as frontend for many slaves. -How to use -========== +How to deploy a frontend server +=============================== -First, you will need to request a "master" instance of Apache Frontend with -"domain" parameter, like:: +This is to deploy an entire frontend server with a public IPv4. +If you want to use an already deployed frontend to make your service available +via ipv4, switch to the "Example" parts. + +First, you will need to request a "master" instance of Apache Frontend with: + * A "domain" parameter where the frontend will be available + * A "public-ipv4" parameter to state which public IPv4 will be used + +like:: <?xml version='1.0' encoding='utf-8'?> <instance> <parameter id="domain">moulefrite.org</parameter> - <parameter id="port">443</parameter> + <parameter id="public-ipv4">xxx.xxx.xxx.xxx</parameter> </instance> Then, it is possible to request many slave instances @@ -69,11 +76,11 @@ url of backend to use. "url" is a mandatory parameter. Example: http://mybackend.com/myresource -cache +enable_cache ~~~~~ Specify if slave instance should use a varnish / stunnel to connect to backend. Possible values: "true", "false". -"cache" is an optional parameter. Defaults to "false". +"enable_cache" is an optional parameter. Defaults to "false". Example: true type @@ -81,30 +88,83 @@ type Specify if slave instance will redirect to a zope backend. If specified, Apache RewriteRule will use Zope's Virtual Host Daemon. Possible values: "zope", "default". -"type" is an optional parameter. Defaults to "default". +"type" is an optional parameter. Defaults to "default". Example: zope custom_domain ~~~~~~~~~~~~~ Domain name to use as frontend. The frontend will be accessible from this domain. "custom_domain" is an optional parameter. Defaults to -[instancereference].[masterdomain]. +[instancereference].[masterdomain]. Example: www.mycustomdomain.com +path +~~~~ +Only used if type is "zope". + +Will append the specified path to the "VirtualHostRoot" of the zope's +VirtualHostMonster. + +"path" is an optional parameter, ignored if not specified. +Example of value: "/erp5/web_site_module/hosting/" + +Examples +======== + +Here are some example of how to make your SlapOS service available through +an already deployed frontend. + +Simple Example +-------------- + +Request slave frontend instance so that https://[1:2:3:4:5:6:7:8]:1234 will be +redirected and accessible from the proxy:: + instance = request( + software_release=apache_frontend, + software_type="RootSoftwareInstance", + partition_reference='my frontend', + shared=True, + partition_parameter_kw={ + "url":"https://[1:2:3:4:5:6:7:8]:1234", + } + ) + + +Zope Example +------------ + +Request slave frontend instance using a Zope backend so that +https://[1:2:3:4:5:6:7:8]:1234 will be redirected and accessible from the +proxy:: + instance = request( + software_release=apache_frontend, + software_type="RootSoftwareInstance", + partition_reference='my frontend', + shared=True, + partition_parameter_kw={ + "url":"https://[1:2:3:4:5:6:7:8]:1234", + "type":"zope", + } + ) + Advanced example -================ +---------------- Request slave frontend instance using a Zope backend, with Varnish activated, -listening to a custom domain:: +listening to a custom domain and redirecting to /erp5/ so that +https://[1:2:3:4:5:6:7:8]:1234/erp5/ will be redirected and accessible from +the proxy:: instance = request( software_release=apache_frontend, - partition_reference='frontend2', + software_type="RootSoftwareInstance", + partition_reference='my frontend', shared=True, partition_parameter_kw={ - "url":"https://[1:2:3:4]:1234/someresource", - "cache":"true", + "url":"https://[1:2:3:4:5:6:7:8]:1234", + "enable_cache":"true", "type":"zope", + "path":"/erp5", "custom_domain":"mycustomdomain.com", } ) @@ -115,8 +175,9 @@ Notes It is not possible with slapos to listen to port <= 1024, because process are not run as root. It is a good idea then to go on the node where the instance is and set some iptables rules like (if using default ports):: - iptables -t nat -A PREROUTING -p tcp -d {public ip} --dport 443 -j DNAT --to-destination {listening ip}:4443 - iptables -t nat -A PREROUTING -p tcp -d {public_ip} --dport 80 -j DNAT --to-destination {listening ip}:8080 + + iptables -t nat -A PREROUTING -p tcp -d {public_ipv4} --dport 443 -j DNAT --to-destination {listening_ipv4}:4443 + iptables -t nat -A PREROUTING -p tcp -d {public_ipv4} --dport 80 -j DNAT --to-destination {listening_ipv4}:8080 Where {public ip} is the public IP of your server, or at least the LAN IP to where your NAT will forward to. {listening ip} is the private ipv4 (like 10.0.34.123) that the instance is using and sending as connection parameter. diff --git a/software/apache-frontend/common.cfg b/software/apache-frontend/common.cfg new file mode 100644 index 0000000000000000000000000000000000000000..265b5a2382a2357bd0ab1e83473dfb8d5693bfae --- /dev/null +++ b/software/apache-frontend/common.cfg @@ -0,0 +1,51 @@ +[buildout] +extends = + ../../component/binutils/buildout.cfg + ../../component/lxml-python/buildout.cfg + ../../component/apache/buildout.cfg + ../../component/stunnel/buildout.cfg + ../../component/varnish/buildout.cfg + ../../component/dcron/buildout.cfg + ../../component/logrotate/buildout.cfg + ../../component/rdiff-backup/buildout.cfg + ../../stack/slapos.cfg + +parts = + template + binutils + apache-2.2 + apache-antiloris-apache-2.2 + + stunnel + varnish-2.1 + + dcron + logrotate + rdiff-backup + +# Buildoutish + eggs + instance-recipe-egg + +[instance-recipe] +# Note: In case if specific instantiation recipe is used this is the place to +# put its name +egg = slapos.cookbook +module = apache.frontend + +[instance-recipe-egg] +recipe = zc.recipe.egg +eggs = ${instance-recipe:egg} + +[eggs] +recipe = zc.recipe.egg +eggs = + ${lxml-python:egg} + +[template] +# Default template for apache instance. +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance.cfg +md5sum = fea902a2b9dbf8c80ff201bcf73f9396 +output = ${buildout:directory}/template.cfg +mode = 0644 \ No newline at end of file diff --git a/software/apache-frontend/development.cfg b/software/apache-frontend/development.cfg new file mode 100644 index 0000000000000000000000000000000000000000..28ca92d411c01e8977fc796228ad10678b884873 --- /dev/null +++ b/software/apache-frontend/development.cfg @@ -0,0 +1,32 @@ +# Development profile of apache-frontend. +# Exactly the same as software.cfg, but fetch the slapos.cookbook +# from git repository instead of fetching stable version, +# allowing to play with bleeding edge environment. + +# You'll need to run buildout twice for this profile. + +[buildout] +extends = +# Extend in this order, otherwise "parts" will be taken from git profile + ../../component/git/buildout.cfg + common.cfg + +parts += + slapos.cookbook-repository + +develop = + ${:parts-directory}/slapos.cookbook-repository + + +[slapos.cookbook-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.git +branch = frontend +git-executable = ${git:location}/bin/git + +[check-recipe] +recipe = plone.recipe.command +stop-on-error = true +update-command = ${:command} +command = + grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link && diff --git a/software/apache-frontend/instance.cfg b/software/apache-frontend/instance.cfg index 5578977cab836a7bef1b70a8c96f6006c668a88f..952aa3838108d27fe38f83a0724e52f5ed3660a5 100644 --- a/software/apache-frontend/instance.cfg +++ b/software/apache-frontend/instance.cfg @@ -1,12 +1,26 @@ [buildout] parts = + directory instance + configtest eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} +# Create all needed directories +[directory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc/ +var = $${buildout:directory}/var/ +srv = $${buildout:directory}/srv/ +bin = $${buildout:directory}/bin/ +service = $${:etc}/service + + +# Deploy Apache (old way, with monolithic recipe) [instance] recipe = ${instance-recipe:egg}:${instance-recipe:module} +httpd_home = ${apache-2.2:location} httpd_binary = ${apache-2.2:location}/bin/httpd logrotate_binary = ${logrotate:location}/usr/sbin/logrotate openssl_binary = ${openssl:location}/bin/openssl @@ -14,5 +28,12 @@ dcrond_binary = ${dcron:location}/sbin/crond varnishd_binary = ${varnish-2.1:location}/sbin/varnishd stunnel_binary = ${stunnel:location}/bin/stunnel rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup -gcc_binary = ${gcc-java-minimal:location}/bin/gcc +gcc_binary = gcc binutils_directory = ${binutils:location}/bin/ + + +# Create wrapper for "apachectl conftest" in bin +[configtest] +recipe = slapos.cookbook:wrapper +command-line = $${instance:httpd_binary} -f $${directory:etc}/apache_frontend.conf -t +output = $${directory:bin}/apache-configtest diff --git a/software/apache-frontend/software.cfg b/software/apache-frontend/software.cfg index 7a4ccfe5708335f3205e4c568ba1423b2f26c0e0..80e0ccdf8e021ed14ebe5670c19b8b16308259c1 100644 --- a/software/apache-frontend/software.cfg +++ b/software/apache-frontend/software.cfg @@ -1,124 +1,76 @@ [buildout] -versions = versions - -extends = - ../../component/binutils/buildout.cfg - ../../component/gcc/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/apache/buildout.cfg - ../../component/stunnel/buildout.cfg - ../../component/varnish/buildout.cfg - ../../component/dcron/buildout.cfg - ../../component/logrotate/buildout.cfg - ../../component/rdiff-backup/buildout.cfg - ../../stack/slapos.cfg - -parts = - template - binutils - gcc-java-minimal - apache-2.2 - apache-antiloris-apache-2.2 - - stunnel - varnish-2.1 - - dcron - logrotate - rdiff-backup - -# Buildoutish - eggs - instance-recipe-egg - -[instance-recipe] -# Note: In case if specific instantiation recipe is used this is the place to -# put its name -egg = slapos.cookbook -module = apache.frontend - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[eggs] -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - -[template] -# Default template for apache instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = 74c0f41246d167c020854a212e919ce4 -output = ${buildout:directory}/template.cfg -mode = 0644 +extends = common.cfg [versions] Jinja2 = 2.6 Werkzeug = 0.8.3 buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.8 +hexagonit.recipe.cmmi = 1.6 +meld3 = 0.6.10 rdiff-backup = 1.0.5 -slapos.cookbook = 0.52 -slapos.recipe.template = 2.3 +slapos.cookbook = 0.71.1 +slapos.recipe.build = 0.11.5 +slapos.recipe.template = 2.4.2 # Required by: -# slapos.core==0.24 -Flask = 0.8 +# slapos.core==0.33.1 +Flask = 0.9 # Required by: -# slapos.cookbook==0.52 -PyXML = 0.8.4 +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.6 # Required by: -# slapos.cookbook==0.52 +# slapos.cookbook==0.71.1 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.52 -# slapos.core==0.24 +# slapos.cookbook==0.71.1 +# slapos.core==0.33.1 # xml-marshaller==0.9.7 -lxml = 2.3.4 +lxml = 3.0.2 # Required by: -# slapos.cookbook==0.52 -netaddr = 0.7.6 +# slapos.cookbook==0.71.1 +netaddr = 0.7.10 # Required by: -# slapos.core==0.24 +# slapos.core==0.33.1 netifaces = 0.8 # Required by: -# slapos.cookbook==0.52 -# slapos.core==0.24 -# zc.buildout==1.6.0-dev-SlapOS-004 +# slapos.cookbook==0.71.1 +pytz = 2012j + +# Required by: +# slapos.cookbook==0.71.1 +# slapos.core==0.33.1 +# zc.buildout==1.6.0-dev-SlapOS-010 # zc.recipe.egg==1.3.2 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.52 -slapos.core = 0.24 +# slapos.cookbook==0.71.1 +slapos.core = 0.33.1 # Required by: -# slapos.core==0.24 -supervisor = 3.0a12 +# slapos.core==0.33.1 +supervisor = 3.0b1 # Required by: -# slapos.cookbook==0.52 +# slapos.cookbook==0.71.1 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.52 -zc.recipe.egg = 1.3.2 +# slapos.core==0.33.1 +zope.interface = 4.0.3 -# Required by: -# slapos.core==0.24 -zope.interface = 4.0.0 [networkcache] -# Cedric de Saint Martin signature certificate +# signature certificates of the following uploaders. +# Cedric de Saint Martin +# Romain Courteaud +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -133,3 +85,29 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE + CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5 + MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl + ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF + AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw + boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX + Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA + ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX + mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC + q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g + QUUGLQ== + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- diff --git a/software/arfooo/instance.cfg b/software/arfooo/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..8174b99ee9504b3f12ef8a2ba81b2e5036020204 --- /dev/null +++ b/software/arfooo/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = users +constraint = `userId`>0 \ No newline at end of file diff --git a/software/arfooo/software.cfg b/software/arfooo/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..6ced72ebfb3e8f983d43d936a939cfdf9c480164 --- /dev/null +++ b/software/arfooo/software.cfg @@ -0,0 +1,36 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://script.arfooo.com/telecharger/arfooo-2.0.2.zip +md5sum = 51ca32fa2c66d8ad810f15a45edbf5a7 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/SilverStripe/instance.cfg b/software/chamilo/instance.cfg similarity index 100% rename from software/SilverStripe/instance.cfg rename to software/chamilo/instance.cfg diff --git a/software/chamilo/software.cfg b/software/chamilo/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c08c149dc15e99138f24b485d9ab373f319aacbf --- /dev/null +++ b/software/chamilo/software.cfg @@ -0,0 +1,33 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://chamilo.googlecode.com/files/chamilo-1.8.8.4.zip +md5sum = 38ea9bc58e1ef5baa334a9b103dda98c + +[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 +eggs = ${instance-recipe:egg} diff --git a/software/claroline/instance.cfg b/software/claroline/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..1ace972ca0602346c0933deeead15022594ad555 --- /dev/null +++ b/software/claroline/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 = claroline/install +table_name = category +constraint = `id`>0 diff --git a/software/claroline/software.cfg b/software/claroline/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..78b64b565199eafdb0d0da9c37f8240c8717d418 --- /dev/null +++ b/software/claroline/software.cfg @@ -0,0 +1,38 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://garr.dl.sourceforge.net/project/claroline/Claroline/Claroline%201.10.6/claroline1106.tar.gz +md5sum = 28b198c90a12fda0eabbbea1dc9ef042 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + diff --git a/software/dokuwiki/instance.cfg b/software/dokuwiki/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..fd50f44f39c37337b8bb2e1f94aa4d085cb16b06 --- /dev/null +++ b/software/dokuwiki/instance.cfg @@ -0,0 +1,13 @@ +[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} +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 \ No newline at end of file diff --git a/software/dokuwiki/software.cfg b/software/dokuwiki/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..a3051ba6f3b1904bf4110ea3495971fa066cce99 --- /dev/null +++ b/software/dokuwiki/software.cfg @@ -0,0 +1,53 @@ +[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.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2011-05-25a.tgz +md5sum = 6452eff54afa35e031e15fec9a737dd1 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[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 +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/dotclear/software.cfg b/software/dotclear/software.cfg index 0d1c87a407573f0f031020c3593bacfb3ab7eac7..b2a454f30521e7242e62e07556732bb84f21bcbb 100644 --- a/software/dotclear/software.cfg +++ b/software/dotclear/software.cfg @@ -16,7 +16,7 @@ extends = [application] recipe = slapos.recipe.build:download-unpacked url = http://download.dotclear.net/latest-2.0.tar.gz -md5sum = 98263b4734f93b7c54d3ab436bf344e3 +md5sum = 4ca12cbd12228ceee0b7c0f697e1ff09 [application-template] recipe = slapos.recipe.download diff --git a/software/erp5-util-testing/instance.cfg b/software/erp5-util-testing/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..377a1479f2d3a3cac6e542ef122fee67609141de --- /dev/null +++ b/software/erp5-util-testing/instance.cfg @@ -0,0 +1,56 @@ +[buildout] +parts = + test-runner + sh-environment + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +[create-directory] +recipe = slapos.cookbook:mkdirectory +bin = $${buildout:directory}/bin +etc = $${buildout:directory}/etc +services = $${:etc}/run +srv = $${buildout:directory}/srv +source-code = $${:srv}/eggs-source-code + +[download-source] +recipe = slapos.recipe.build:gitclone +git-executable = ${git:location}/bin/git + +# Local development +[erp5-util] +<= download-source +repository = ${erp5-util-repository:location} + +[test-runner] +recipe = slapos.cookbook:egg_test +run-test-suite = $${create-directory:bin}/runTestSuite +run-test-suite-binary = ${buildout:bin-directory}/runTestSuite +# The list of executables should be defined here and a combination +# of tests should dynamically generated. +#python-list = $${} +test-list = + $${erp5-util:location} +prepend-path = ${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin +environment = environment + +[environment] +CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include +LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib +PYTHONPATH = ${python-setuptools:location} +LD_LIBRARY_PATH = ${libxslt:location}/lib + +[sh-environment] +# Section exposes testing default environment as sh file. It is thus easy +# to directly develop and test the egg inside of this instance. +recipe = collective.recipe.template +input = inline: + export PATH="$${test-runner:prepend-path}:$PATH" + export CPPFLAGS="$${environment:CPPFLAGS}" + export LDFLAGS="$${environment:LDFLAGS}" + export PYTHONPATH="$${environment:PYTHONPATH}" + export PS1="[slapos-testing env Active] $PS1" +output = $${create-directory:bin}/environment.sh +mode = 755 diff --git a/software/erp5-util-testing/software.cfg b/software/erp5-util-testing/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..4a09ba8e5a60f0c684a6deef7b71350b335786eb --- /dev/null +++ b/software/erp5-util-testing/software.cfg @@ -0,0 +1,117 @@ +[buildout] + +extends = + ../../component/git/buildout.cfg + ../../component/lxml-python/buildout.cfg + ../../component/libxml2/buildout.cfg + ../../component/libxslt/buildout.cfg + ../../component/python-2.7/buildout.cfg + ../../component/python-setuptools/buildout.cfg + ../../component/zlib/buildout.cfg + ../../stack/slapos.cfg + +parts = + slapos.cookbook-repository + erp5-util-repository + eggs + template + +[eggs] +recipe = zc.recipe.egg +eggs = + ${lxml-python:egg} + erp5.util + slapos.cookbook + collective.recipe.template +entry-points = + runTestSuite=erp5.util.testsuite:runTestSuite +scripts = + runTestSuite + +[slapos.cookbook-repository] +recipe = slapos.recipe.build:gitclone +git-executable = ${git:location}/bin/git +forbid-download-cache = true +repository = http://git.erp5.org/repos/slapos.git +branch = master + +[erp5-util-repository] +recipe = slapos.recipe.build:gitclone +git-executable = ${git:location}/bin/git +forbid-download-cache = true +repository = http://git.erp5.org/repos/erp5.git +branch = master + +[template] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance.cfg +md5sum = 0cdfaa1df03885bd6004755d285e69b5 +output = ${buildout:directory}/template.cfg +mode = 640 + +[versions] +Jinja2 = 2.6 +Werkzeug = 0.8.3 +buildout-versions = 1.7 +erp5.util = 0.4.7 +hexagonit.recipe.cmmi = 1.6 +lxml = 2.3.6 +meld3 = 0.6.8 +plone.recipe.command = 1.1 +slapos.cookbook = 0.65 +slapos.libnetworkcache = 0.13.2 +slapos.recipe.build = 0.11.2 +slapos.recipe.download = 1.0.dev-r4053 +slapos.recipe.template = 2.4.2 + +# Required by: +# slapos.core==0.28.5 +Flask = 0.9 + +# Required by: +# slapos.cookbook==0.65 +PyXML = 0.8.4 + +# Required by: +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 + +# Required by: +# slapos.cookbook==0.65 +inotifyx = 0.2.0 + +# Required by: +# slapos.cookbook==0.65 +netaddr = 0.7.10 + +# Required by: +# slapos.core==0.28.5 +netifaces = 0.8 + +# Required by: +# erp5.util==0.4.7 +# slapos.cookbook==0.65 +# slapos.core==0.28.5 +# zc.buildout==1.6.0-dev-SlapOS-006 +# zc.recipe.egg==1.3.2 +setuptools = 0.6c12dev-r88846 + +# Required by: +# slapos.cookbook==0.65 +slapos.core = 0.28.5 + +# Required by: +# slapos.core==0.28.5 +supervisor = 3.0a12 + +# Required by: +# slapos.cookbook==0.65 +xml-marshaller = 0.9.7 + +# Required by: +# slapos.cookbook==0.65 +zc.recipe.egg = 1.3.2 + +# Required by: +# slapos.core==0.28.5 +zope.interface = 4.0.1 diff --git a/software/fengoffice/instance.cfg b/software/fengoffice/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/fengoffice/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/fengoffice/software.cfg b/software/fengoffice/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..bfbf7079449046f4993f0c90c1b385f532bce8ac --- /dev/null +++ b/software/fengoffice/software.cfg @@ -0,0 +1,35 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://freefr.dl.sourceforge.net/project/opengoo/fengoffice/fengoffice_2.0.0/fengoffice_2.0.0.zip +md5sum = 2f673962ac377da7942ba8a09429ddbf + +[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 +eggs = + ${instance-recipe:egg} \ No newline at end of file diff --git a/software/fluxbb/configure-fluxbb.py b/software/fluxbb/configure-fluxbb.py new file mode 100644 index 0000000000000000000000000000000000000000..8e6a5572905b607f81f524182d65b607250e84ce --- /dev/null +++ b/software/fluxbb/configure-fluxbb.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +import sys +import os + +def setup(args): + base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args + os.rename(os.path.join(htdocs, "config.inc.php"), os.path.join(htdocs, "config.php")) + config_php = os.path.join(htdocs, "config.php") + os.chmod(config_php, 0444) + +if __name__ == '__main__': + setup(sys.argv[1:]) diff --git a/software/fluxbb/instance.cfg b/software/fluxbb/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..51c2667943f16dbe777e3ae4222753cf5669f0cd --- /dev/null +++ b/software/fluxbb/instance.cfg @@ -0,0 +1,22 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +table_name = users +constraint = `id`>1 +script = ${configure-script:location}/${configure-script:filename} diff --git a/software/fluxbb/software.cfg b/software/fluxbb/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..24e5abcbd29bc0526ac64721669d0008eb48f56e --- /dev/null +++ b/software/fluxbb/software.cfg @@ -0,0 +1,53 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + configure-script + +extends = + ../../stack/lamp.cfg + +[application] +recipe = hexagonit.recipe.download:download-unpacked +url = http://fluxbb.org/download/releases/1.4.7/fluxbb-1.4.7.tar.bz2 +md5sum = bc2168205d404421729cc3b040d6fe15 + +[configure-script] +recipe = hexagonit.recipe.download +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = ${:_profile_base_location_}/configure-fluxbb.py +filename = configure-fluxbb.py + +[application-template] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/template/config.inc.php.in +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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/fluxbb/template/config.inc.php.in b/software/fluxbb/template/config.inc.php.in new file mode 100644 index 0000000000000000000000000000000000000000..3c0d76ed7e8ed804906d1843d02c1fb4b85cd98e --- /dev/null +++ b/software/fluxbb/template/config.inc.php.in @@ -0,0 +1,17 @@ +<?php + +$db_type = 'mysql'; +$db_host = '%(mysql_host)s'; +$db_name = '%(mysql_database)s'; +$db_username = '%(mysql_user)s'; +$db_password = '%(mysql_password)s'; +$db_prefix = 'fbb_'; +$p_connect = false; + +$cookie_name = 'pun_cookie_357edd'; +$cookie_domain = ''; +$cookie_path = '/'; +$cookie_secure = 0; +$cookie_seed = 'aba88f605e01bfe2'; + +define('PUN', 1); diff --git a/software/freeglobes/configure-freeglobes.py b/software/freeglobes/configure-freeglobes.py new file mode 100644 index 0000000000000000000000000000000000000000..e1d08417966c7ee7ab17e7105f9000261a623423 --- /dev/null +++ b/software/freeglobes/configure-freeglobes.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +import sys +import os + +def setup(args): + ''' + Freeglobes doesn't put the good url of the application + this script ensure the url is the good one + ''' + mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args + + config_file = os.path.join(htdocs, "conf/config.php") + new_config_file = os.path.join(htdocs, "conf/config_new.php") + install_dir = os.path.join(htdocs, "install") + software_url = "$CONFIG['site_url'] = '%s'; " % base_url + + f = open(config_file, 'r') + f1 = open(new_config_file, 'w+') + for line in f.readlines(): + if "$CONFIG['site_url']" not in line: + f1.write(line) + else: + f1.write(software_url) + f.close() + f1.close() + + os.remove(config_file) + os.rename(new_config_file, config_file) + os.rename(install_dir, '%s_done' % install_dir) + +if __name__ == '__main__': + setup(sys.argv[1:]) diff --git a/software/freeglobes/instance.cfg b/software/freeglobes/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..6f9104ee79005cc457b6356b70336f4d6fdfe557 --- /dev/null +++ b/software/freeglobes/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +table_name = user +constraint = `id`=1 +script = ${configure-script:location}/${configure-script:filename} \ No newline at end of file diff --git a/software/freeglobes/software.cfg b/software/freeglobes/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..6d7875f6bf62297ac1301074950997fe8b12dabd --- /dev/null +++ b/software/freeglobes/software.cfg @@ -0,0 +1,66 @@ +[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:download-unpacked +url = http://www.freeglobes.net/freeglobes-03.01.2009.zip +md5sum = 80e373c4a23fab7506d6e00a3ec11473 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[configure-script] +recipe = hexagonit.recipe.download +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = ${:_profile_base_location_}/configure-freeglobes.py +md5sum = 30d9bbcd410f35afc58c7b9ad101b1ec +filename = configure-freeglobes.py +download-only = True +mode = 0744 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/freewebshop/instance.cfg b/software/freewebshop/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..63788156319b510c8652e52d199895194e131cbc --- /dev/null +++ b/software/freewebshop/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +table_name = shipping_weight +constraint = `id`=2 +delete = install.php \ No newline at end of file diff --git a/software/freewebshop/software.cfg b/software/freewebshop/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..fa4738ed62df4f0df094716bc35053d0c41df990 --- /dev/null +++ b/software/freewebshop/software.cfg @@ -0,0 +1,59 @@ +[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.chaozz.nl/binaries/freewebshop/FreeWebshop.org2.2.9_R2.zip +md5sum = 9a32bfa3feb47e33c4eb81a9e00271e6 +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, "${buildout:parts-directory}/${:_buildout_section_name_}") + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/frontaccounting/instance.cfg b/software/frontaccounting/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/frontaccounting/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/frontaccounting/software.cfg b/software/frontaccounting/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..1e23b13c16712de77e028278b3266b3b3860772d --- /dev/null +++ b/software/frontaccounting/software.cfg @@ -0,0 +1,36 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://garr.dl.sourceforge.net/project/frontaccounting/FrontAccounting-2.3/2.3.7/frontaccounting-2.3.7.tgz +md5sum = d16899327dd316becd0d1abe0b19ff3e + +[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 +eggs = + ${instance-recipe:egg} + diff --git a/software/fusionnews/instance.cfg b/software/fusionnews/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2b393d68f04ede02268e0b2669cd9a9358451c19 --- /dev/null +++ b/software/fusionnews/instance.cfg @@ -0,0 +1,19 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +file_token = install.lock +delete = install.php \ No newline at end of file diff --git a/software/fusionnews/software.cfg b/software/fusionnews/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7992dba33a6e7fa826d6148d3725a1ac0266c98f --- /dev/null +++ b/software/fusionnews/software.cfg @@ -0,0 +1,59 @@ +[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://downloads.sourceforge.net/project/fnews/fnews/3.9.6-p1/fusionnews-3.9.6-p1.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ffnews%2Ffiles%2F&ts=1320325550&use_mirror=freefr +md5sum = dc4c00be8f4abab11fbab178e016c581 +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 + "/upload", "${buildout:parts-directory}/${:_buildout_section_name_}") + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/galette/instance.cfg b/software/galette/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..24cd21ae8e37226be3ed2525e7a3c495e3a3c582 --- /dev/null +++ b/software/galette/instance.cfg @@ -0,0 +1,21 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = texts +constraint = `tid`>0 + diff --git a/software/galette/software.cfg b/software/galette/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..fe00182e0accdb58748fc522ee2af684d068aaf1 --- /dev/null +++ b/software/galette/software.cfg @@ -0,0 +1,36 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://download.tuxfamily.org/galette/galette-0.7.0.tar.bz2 +md5sum = 7aadd2f8c4922f7e168d29d595b75702 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/glpi/instance.cfg b/software/glpi/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/glpi/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/glpi/software.cfg b/software/glpi/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..72bd6e13acdfa1a7e5c4739911c107bbc69ed085 --- /dev/null +++ b/software/glpi/software.cfg @@ -0,0 +1,35 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = https://forge.indepnet.net/attachments/download/1151/glpi-0.83.1.tar.gz +md5sum = 3f9cfb11c09c457a0f0a8fa1563b45a7 + +[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 +eggs = + ${instance-recipe:egg} diff --git a/software/guppy/instance.cfg b/software/guppy/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/guppy/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/guppy/software.cfg b/software/guppy/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..914482618a3057006688d25cc45b793bf0f82240 --- /dev/null +++ b/software/guppy/software.cfg @@ -0,0 +1,53 @@ +[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.freeguppy.org/file/guppy4619.zip +md5sum = 5d993b0818e195385a775880ce5d4be7 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = false + +[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 +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/html5as/software.cfg b/software/html5as/software.cfg index 304097f0efa943ffc2526d65a032dbaffcbc5fe0..22712958a94aa99db65c2f018208d608fb85e0c9 100644 --- a/software/html5as/software.cfg +++ b/software/html5as/software.cfg @@ -163,6 +163,7 @@ hexagonit.recipe.download = 1.5.1 [networkcache] # signature certificates of the following uploaders. # Åukasz Nowak +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJANLesB1hoQIEMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -177,3 +178,16 @@ signature-certificate-list = 9LnVeCSkC4Ct8kvkT/WdRFF/nqprbZ6bUrhx2yAKTH6CMhIjDJ8F7fAkH48fLD7M HPuwnRO7OewFpzT/gfQgFKpmVBNUYq7YddE= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- diff --git a/software/igalerie/instance.cfg b/software/igalerie/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c7ab193d5a7ee6fd2825a6d850c63bce4c8e4ca2 --- /dev/null +++ b/software/igalerie/instance.cfg @@ -0,0 +1,21 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = users +constraint = (`user_id`>0) and (`user_password`<>'0000000000000000000000000000000000000000') + diff --git a/software/igalerie/software.cfg b/software/igalerie/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3f0f1596941349f4320d4274d58677b0535bde0d --- /dev/null +++ b/software/igalerie/software.cfg @@ -0,0 +1,38 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.igalerie.org/igalerie-2.1.5.zip +md5sum = de7279fb1dc4cf4318218d35b0776f95 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + diff --git a/software/kubeblog/instance.cfg b/software/kubeblog/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/kubeblog/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/kubeblog/software.cfg b/software/kubeblog/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..54ae59a8c033030b37c44b1b4dfcf3f05984e835 --- /dev/null +++ b/software/kubeblog/software.cfg @@ -0,0 +1,35 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.kubelabs.com/files/kubeblog%201.1.2.zip +md5sum = 21aa12d766dca6ed632ae1806206c7cf + +[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 +eggs = + ${instance-recipe:egg} \ No newline at end of file diff --git a/software/kumofs/software.cfg b/software/kumofs/software.cfg index 3c4b1d151e8c70418bb9339cb573ffa5f092179f..a067fe431f446a2708bfab8f05c16fab94af2e79 100644 --- a/software/kumofs/software.cfg +++ b/software/kumofs/software.cfg @@ -18,6 +18,8 @@ parts = eggs instance-recipe-egg +find-links += http://www.nexedi.org/static/packages/source/ + [instance-recipe] egg = slapos.cookbook module = kumofs @@ -41,6 +43,7 @@ mode = 0644 [networkcache] # Cedric de Saint Martin signature certificate +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -55,3 +58,80 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- + + [versions] + Jinja2 = 2.6 + Werkzeug = 0.8.3 + buildout-versions = 1.7 + erp5.recipe.cmmiforcei686 = 0.1.3 + hexagonit.recipe.cmmi = 1.6 + meld3 = 0.6.10 + rdiff-backup = 1.0.5 + slapos.cookbook = 0.71.1 + slapos.recipe.template = 2.4.2 + + # Required by: + # slapos.core==0.33.1 + Flask = 0.9 + + # Required by: + # hexagonit.recipe.cmmi==1.6 + hexagonit.recipe.download = 1.6 + + # Required by: + # slapos.cookbook==0.71.1 + inotifyx = 0.2.0 + + # Required by: + # slapos.cookbook==0.71.1 + # slapos.core==0.33.1 + # xml-marshaller==0.9.7 + lxml = 3.1beta1 + + # Required by: + # slapos.cookbook==0.71.1 + netaddr = 0.7.10 + + # Required by: + # slapos.core==0.33.1 + netifaces = 0.8 + + # Required by: + # slapos.cookbook==0.71.1 + pytz = 2012j + + # Required by: + # slapos.cookbook==0.71.1 + # slapos.core==0.33.1 + # zc.buildout==1.6.0-dev-SlapOS-010 + # zc.recipe.egg==1.3.2 + setuptools = 0.6c12dev-r88846 + + # Required by: + # slapos.cookbook==0.71.1 + slapos.core = 0.33.1 + + # Required by: + # slapos.core==0.33.1 + supervisor = 3.0b1 + + # Required by: + # slapos.cookbook==0.71.1 + xml-marshaller = 0.9.7 + + # Required by: + # slapos.core==0.33.1 + zope.interface = 4.0.3 diff --git a/software/lifetype/instance.cfg b/software/lifetype/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..636bba48cc7a52afcc33ab0a354d2d682cde1a6f --- /dev/null +++ b/software/lifetype/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 = wizard.php +table_name = blogs +constraint = `id`>0 \ No newline at end of file diff --git a/software/lifetype/lifetype_for_mysql5.patch b/software/lifetype/lifetype_for_mysql5.patch new file mode 100644 index 0000000000000000000000000000000000000000..97388b502d9b2404d6195221678f9d6ed2d8afff --- /dev/null +++ b/software/lifetype/lifetype_for_mysql5.patch @@ -0,0 +1,227 @@ +*** lifetype/install/dbschemas.properties.php 2006-12-25 14:30:00.000000000 +0000 +--- lifetype_formysql5/install/dbschemas.properties.php 2012-04-04 16:36:54.000000000 +0000 +*************** +*** 2,9 **** + + $Tables["articles"]["schema"] = " + id I(10) UNSIGNED NOTNULL AUTOINCREMENT PRIMARY, +! date T(14) NOTNULL, +! modification_date T(14) NOTNULL, + user_id I(10) UNSIGNED NOTNULL DEFAULT '0', + blog_id I(10) UNSIGNED NOTNULL DEFAULT '0', + status I(5) NOTNULL DEFAULT 1, +--- 2,9 ---- + + $Tables["articles"]["schema"] = " + id I(10) UNSIGNED NOTNULL AUTOINCREMENT PRIMARY, +! date T(6) NOTNULL, +! modification_date T(6) NOTNULL, + user_id I(10) UNSIGNED NOTNULL DEFAULT '0', + blog_id I(10) UNSIGNED NOTNULL DEFAULT '0', + status I(5) NOTNULL DEFAULT 1, +*************** +*** 30,36 **** + name C(255) NOTNULL DEFAULT '', + url C(255) NOTNULL DEFAULT '', + blog_id I(10) UNSIGNED NOTNULL DEFAULT '0', +! last_modification T(14) NOTNULL, + in_main_page I1(1) NOTNULL DEFAULT '1', + parent_id I(10) NOTNULL DEFAULT '0', + description TEXT NOTNULL DEFAULT '', +--- 30,36 ---- + name C(255) NOTNULL DEFAULT '', + url C(255) NOTNULL DEFAULT '', + blog_id I(10) UNSIGNED NOTNULL DEFAULT '0', +! last_modification T(6) NOTNULL, + in_main_page I1(1) NOTNULL DEFAULT '1', + parent_id I(10) NOTNULL DEFAULT '0', + description TEXT NOTNULL DEFAULT '', +*************** +*** 51,57 **** + blog_id I(10) UNSIGNED NOTNULL DEFAULT 0, + topic TEXT NOTNULL, + text X, +! date T(14) NOTNULL, + user_id I(10) DEFAULT '0', + user_email C(255) DEFAULT '', + user_url C(255) DEFAULT '', +--- 51,57 ---- + blog_id I(10) UNSIGNED NOTNULL DEFAULT 0, + topic TEXT NOTNULL, + text X, +! date T(6) NOTNULL, + user_id I(10) DEFAULT '0', + user_email C(255) DEFAULT '', + user_url C(255) DEFAULT '', +*************** +*** 96,103 **** + mangled_blog varchar(50) NOTNULL DEFAULT '', + status I(4) NOTNULL DEFAULT '1', + show_in_summary I(4) NOTNULL DEFAULT '1', +! create_date T(14) NOTNULL, +! last_update_date T(14) NOTNULL, + num_posts I(10) NOTNULL DEFAULT '0', + num_comments I(10) NOTNULL DEFAULT '0', + num_trackbacks I(10) NOTNULL DEFAULT '0', +--- 96,103 ---- + mangled_blog varchar(50) NOTNULL DEFAULT '', + status I(4) NOTNULL DEFAULT '1', + show_in_summary I(4) NOTNULL DEFAULT '1', +! create_date T(6) NOTNULL, +! last_update_date T(6) NOTNULL, + num_posts I(10) NOTNULL DEFAULT '0', + num_comments I(10) NOTNULL DEFAULT '0', + num_trackbacks I(10) NOTNULL DEFAULT '0', +*************** +*** 118,124 **** + description TEXT NOTNULL, + blog_id I(10) UNSIGNED NOTNULL DEFAULT '0', + rss_feed C(255) NOTNULL DEFAULT '', +! date T(14) NOTNULL, + properties TEXT NOTNULL DEFAULT '', + INDEX blog_id (blog_id), + INDEX category_id (category_id) +--- 118,124 ---- + description TEXT NOTNULL, + blog_id I(10) UNSIGNED NOTNULL DEFAULT '0', + rss_feed C(255) NOTNULL DEFAULT '', +! date T(6) NOTNULL, + properties TEXT NOTNULL DEFAULT '', + INDEX blog_id (blog_id), + INDEX category_id (category_id) +*************** +*** 129,135 **** + id I(10) NOTNULL AUTOINCREMENT PRIMARY, + name varchar(100) NOTNULL DEFAULT '', + blog_id I(10) NOTNULL DEFAULT '0', +! last_modification T(14) NOTNULL, + properties TEXT NOTNULL DEFAULT '', + num_links I(10) NOTNULL DEFAULT '0', + INDEX blog_id (blog_id) +--- 129,135 ---- + id I(10) NOTNULL AUTOINCREMENT PRIMARY, + name varchar(100) NOTNULL DEFAULT '', + blog_id I(10) NOTNULL DEFAULT '0', +! last_modification T(6) NOTNULL, + properties TEXT NOTNULL DEFAULT '', + num_links I(10) NOTNULL DEFAULT '0', + INDEX blog_id (blog_id) +*************** +*** 151,157 **** + article_id I(10) NOTNULL DEFAULT '0', + blog_id I(10) NOTNULL DEFAULT '0', + hits I(10) DEFAULT '1', +! last_date T(14), + INDEX article_id (article_id), + INDEX blog_id_article_id (blog_id, article_id) + "; +--- 151,157 ---- + article_id I(10) NOTNULL DEFAULT '0', + blog_id I(10) NOTNULL DEFAULT '0', + hits I(10) DEFAULT '1', +! last_date T(6), + INDEX article_id (article_id), + INDEX blog_id_article_id (blog_id, article_id) + "; +*************** +*** 168,174 **** + status I(4) NOTNULL DEFAULT 1, + resource_picture_id I(10) NOTNULL DEFAULT 0, + site_admin I(10) NOTNULL DEFAULT '0', +! last_login T(14), + UNIQUE user (user) + "; + $Tables["users"]["options"] = "TYPE=MyISAM"; +--- 168,174 ---- + status I(4) NOTNULL DEFAULT 1, + resource_picture_id I(10) NOTNULL DEFAULT 0, + site_admin I(10) NOTNULL DEFAULT '0', +! last_login T(6), + UNIQUE user (user) + "; + $Tables["users"]["options"] = "TYPE=MyISAM"; +*************** +*** 208,214 **** + reg_exp X, + blog_id I(10) NOTNULL DEFAULT '0', + reason X, +! date T(14) NOTNULL, + INDEX blog_id (blog_id) + "; + $Tables["filtered_content"]["options"] = "TYPE=MyISAM"; +--- 208,214 ---- + reg_exp X, + blog_id I(10) NOTNULL DEFAULT '0', + reason X, +! date T(6) NOTNULL, + INDEX blog_id (blog_id) + "; + $Tables["filtered_content"]["options"] = "TYPE=MyISAM"; +*************** +*** 216,222 **** + $Tables["host_blocking_rules"]["schema"] = " + id I(10) NOTNULL AUTOINCREMENT PRIMARY, + reason X, +! date T(14) NOTNULL, + blog_id I(10) NOTNULL DEFAULT '0', + block_type I(1) DEFAULT '1', + list_type I(1) DEFAULT '1', +--- 216,222 ---- + $Tables["host_blocking_rules"]["schema"] = " + id I(10) NOTNULL AUTOINCREMENT PRIMARY, + reason X, +! date T(6) NOTNULL, + blog_id I(10) NOTNULL DEFAULT '0', + block_type I(1) DEFAULT '1', + list_type I(1) DEFAULT '1', +*************** +*** 232,238 **** + owner_id I(10) NOTNULL DEFAULT '0', + album_id I(10) NOTNULL DEFAULT '0', + description X, +! date T(14) NOTNULL, + flags I(10) DEFAULT '0', + resource_type I(3) DEFAULT NULL, + file_path C(255) DEFAULT '', +--- 232,238 ---- + owner_id I(10) NOTNULL DEFAULT '0', + album_id I(10) NOTNULL DEFAULT '0', + description X, +! date T(6) NOTNULL, + flags I(10) DEFAULT '0', + resource_type I(3) DEFAULT NULL, + file_path C(255) DEFAULT '', +*************** +*** 257,263 **** + name C(255) NOTNULL DEFAULT '', + flags I(10) NOTNULL DEFAULT '0', + parent_id I(10) NOTNULL DEFAULT '0', +! date T(14) NOTNULL, + properties TEXT NOTNULL DEFAULT '', + show_album I1(1) DEFAULT 1, + normalized_description TEXT NOTNULL DEFAULT '', +--- 257,263 ---- + name C(255) NOTNULL DEFAULT '', + flags I(10) NOTNULL DEFAULT '0', + parent_id I(10) NOTNULL DEFAULT '0', +! date T(6) NOTNULL, + properties TEXT NOTNULL DEFAULT '', + show_album I1(1) DEFAULT 1, + normalized_description TEXT NOTNULL DEFAULT '', +*************** +*** 308,314 **** + field_type I(2) NOTNULL DEFAULT '1', + field_values TEXT NOTNULL DEFAULT '', + blog_id I(10) NOTNULL DEFAULT '0', +! date T(14), + searchable I1(1) DEFAULT 1, + hidden I1(1) DEFAULT 1, + INDEX blog_id (blog_id) +--- 308,314 ---- + field_type I(2) NOTNULL DEFAULT '1', + field_values TEXT NOTNULL DEFAULT '', + blog_id I(10) NOTNULL DEFAULT '0', +! date T(6), + searchable I1(1) DEFAULT 1, + hidden I1(1) DEFAULT 1, + INDEX blog_id (blog_id) diff --git a/software/lifetype/software.cfg b/software/lifetype/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..16cade6e801dab043803067f524d4b5bcd214fa0 --- /dev/null +++ b/software/lifetype/software.cfg @@ -0,0 +1,52 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + lifetype-patch + patch + +extends = + ../../stack/lamp.cfg + +[lifetype-patch] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/lifetype_for_mysql5.patch +md5sum = c52bea61ea452b9f3caa82426a5819e5 +location = ${buildout:parts-directory}/${:_buildout_section_name_} +filename = lifetype_for_mysql5.patch + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://garr.dl.sourceforge.net/project/lifetype/lifetype/lifetype-1.2.11/lifetype-1.2.11.tar.bz2 +md5sum = 50e329dfdb6c5876c0600abe30a379fb +strip-top-level-dir = true + +[patch] +recipe = iw.recipe.cmd +on_install = true +on_update = true +cmds= patch -d ${application:location} -p1 < ${lifetype-patch:location}/${lifetype-patch:filename} + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] diff --git a/software/maarch/config.php.in b/software/maarch/config.php.in deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/software/maarch/development.cfg b/software/maarch/development.cfg new file mode 100644 index 0000000000000000000000000000000000000000..565567f93a08f65013ce98f85f12c8202aedcf50 --- /dev/null +++ b/software/maarch/development.cfg @@ -0,0 +1,70 @@ +# Exactly the same as software.cfg, but fetch the slapos.cookbook and +# slapos.toolbox from git repository instead of fetching stable version, +# allowing to play with bleeding edge environment. + +# You'll need to run buildout twice for this profile. + +[buildout] +extends = + ../../component/git/buildout.cfg + software.cfg + + +parts += + +# Development parts + slapos.cookbook-repository + slapos.core-repository + slapos.toolbox-repository + slapos.recipe.maarch-repository + check-recipe + +develop = + ${:parts-directory}/slapos.cookbook-repository + ${:parts-directory}/slapos.core-repository + ${:parts-directory}/slapos.toolbox-repository + ${:parts-directory}/slapos.recipe.maarch-repository + + +[slapos.toolbox-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.toolbox.git +branch = master +git-executable = ${git:location}/bin/git + +[slapos.cookbook-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.git +branch = lapp-resilient3 +git-executable = ${git:location}/bin/git + +[slapos.core-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.core.git +branch = master +git-executable = ${git:location}/bin/git + +[slapos.recipe.maarch-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.recipe.maarch.git +branch = master +git-executable = ${git:location}/bin/git + +[check-recipe] +recipe = plone.recipe.command +stop-on-error = true +update-command = ${:command} +command = + grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link && + grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link && + grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link && + grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link + + +# Unpin versions, in case they have been pinned in software.cfg +[versions] +slapos.cookbook = +slapos.toolbox = +slapos.core = +slapos.recipe.maarch = + diff --git a/software/maarch/instance-custom.cfg.in b/software/maarch/instance-custom.cfg.in index 4829ce57bf11aeac4b36b78b1bf27d82519b7924..67ff09b837ceb6c1ab2b62c39c59949e24de7f45 100644 --- a/software/maarch/instance-custom.cfg.in +++ b/software/maarch/instance-custom.cfg.in @@ -9,7 +9,7 @@ db_dbname = $${postgres-urlparse:path} db_username = $${postgres-urlparse:username} db_password = $${postgres-urlparse:password} language = en -php_ini_dir = $${directory:php-ini-dir} +php_ini = $${directory:php-ini-dir}/php.ini root_docservers = $${buildout:directory}/srv/docservers dependency = $${apache-php:recipe} diff --git a/software/maarch/software.cfg b/software/maarch/software.cfg index 29edbbe45e1e6beec6331281edd65ad3c9a5fa6c..1f6a03d4785e951aba370ca1e576389d244c8b6e 100644 --- a/software/maarch/software.cfg +++ b/software/maarch/software.cfg @@ -1,8 +1,15 @@ [buildout] extends = + ../../component/git/buildout.cfg ../../stack/lapp/buildout.cfg + +develop = + ${:parts-directory}/slapos.cookbook-repository + ${:parts-directory}/slapos.recipe.maarch-repository + + # += since we need rdiff-backup and friends parts += slapos-cookbook @@ -11,34 +18,45 @@ parts += eggs instance instance-apache-php + slapos.cookbook-repository + slapos.recipe.maarch-repository + check-recipe -#---------------- -#-- -#-- Main application part -#-- XXX provide a better URL -[application] -url = http://downloads.sourceforge.net/project/maarch/Maarch%20Entreprise/MaarchEntreprise-1.3.zip?r=http%3A%2F%2Fwww.maarch.org%2Ftelecharger&ts=1347961624&use_mirror=ignum -md5sum = 5c2c859dee9d0dde3ba959474fd5fc86 +[versions] +slapos.cookbook = +slapos.recipe.maarch = + + +[slapos.recipe.maarch-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.recipe.maarch.git +branch = master +git-executable = ${git:location}/bin/git + +[slapos.cookbook-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.git +branch = lapp-resilient3 +git-executable = ${git:location}/bin/git + +[check-recipe] +recipe = plone.recipe.command +stop-on-error = true +update-command = ${:command} +command = + grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link && + grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link #---------------- #-- -#-- We don't need this static configuration file. -#-- An empty file is provided because it is required by the lapp stack. +#-- Main application part #-- -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/config.php.in -md5sum = d41d8cd98f00b204e9800998ecf8427e -download-only = True -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = config.php +[application] +url = http://downloads.sourceforge.net/project/maarch/Maarch%20Entreprise/MaarchEntreprise-1.3.zip +md5sum = 5c2c859dee9d0dde3ba959474fd5fc86 #---------------- @@ -54,7 +72,7 @@ part-list = maarch-configuration recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-custom.cfg.in output = ${buildout:directory}/instance-custom.cfg -md5sum = 28f6ad42b73806901ac2cd4ec563d73b +md5sum = 22d8e4d8bb1a5b1c42c6cfb42ee490a0 mode = 0644 @@ -71,6 +89,6 @@ install_cmd = ${:pear} info maarch/CLITools-0.3.1 >/dev/null || ${:pear} install maarch/CLITools-0.3.1 ${:pear} info MIME_Type >/dev/null || ${:pear} install MIME_Type -#---------------- +#---------------- diff --git a/software/mantis/instance.cfg b/software/mantis/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..412fda95cebaa3bda1868e5ea3dbaaef7f5418a3 --- /dev/null +++ b/software/mantis/instance.cfg @@ -0,0 +1,19 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +file_token = config_inc.php +delete = admin \ No newline at end of file diff --git a/software/mantis/software.cfg b/software/mantis/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..8b61fcfc55cd6a8af5dafa6c7aedbc1ebab7043c --- /dev/null +++ b/software/mantis/software.cfg @@ -0,0 +1,57 @@ +[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/mantisbt/mantis-stable/1.2.10/mantisbt-1.2.10.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmantisbt%2F&ts=1334735181&use_mirror=freefr +md5sum = f653408a24f76723929567cba606861c +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/mariadb/software.cfg b/software/mariadb/software.cfg index 8a283516f6680fca190bb30b33c68b5dcca37a3f..fac31840a52c63c9399385dfdd919ac864255bb3 100644 --- a/software/mariadb/software.cfg +++ b/software/mariadb/software.cfg @@ -66,3 +66,20 @@ url = ${:_profile_base_location_}/instance-recover.cfg md5sum = a8df936b6abf82d0d798b83ddfebdc8a output = ${buildout:directory}/template-recover.cfg mode = 0644 + +[networkcache] +# Test agent +signature-certificate-list = + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- \ No newline at end of file diff --git a/software/memcached/software.cfg b/software/memcached/software.cfg index 0ad482438686db1e226faa26c6d7ba16d34138d6..9bba5c4d013216d9b60c94bc0727e0a0655e2923 100644 --- a/software/memcached/software.cfg +++ b/software/memcached/software.cfg @@ -86,6 +86,7 @@ zope.interface = 3.8.0 [networkcache] # Cedric de Saint Martin signature certificate +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -100,3 +101,16 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- diff --git a/software/mioga/software.cfg b/software/mioga/software.cfg index 10f53fd5ff34144dcb48e4ca703a256774444ffb..afacb6cf7e2b22b46bacf2e363354e6ee32023a2 100644 --- a/software/mioga/software.cfg +++ b/software/mioga/software.cfg @@ -6,6 +6,7 @@ extends = [networkcache] # Cedric de Saint Martin signature certificate +# Test agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -20,3 +21,16 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- \ No newline at end of file diff --git a/software/moodle/instance.cfg b/software/moodle/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/moodle/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/moodle/software.cfg b/software/moodle/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..4d4f816a4e97ddeb4139ed425bf0cb22ac866b5d --- /dev/null +++ b/software/moodle/software.cfg @@ -0,0 +1,33 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://freefr.dl.sourceforge.net/project/moodle/Moodle/stable22/moodle-2.2.tgz +md5sum = abf0cb8c0c4c482e9881173d1e501bb3 + +[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 +eggs = ${instance-recipe:egg} \ No newline at end of file diff --git a/software/moregroupware/instance.cfg b/software/moregroupware/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b09fb6f6e921d2968fa57f887e49f053e8ad146a --- /dev/null +++ b/software/moregroupware/instance.cfg @@ -0,0 +1,19 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +file_token = install.log +delete = setup \ No newline at end of file diff --git a/software/moregroupware/software.cfg b/software/moregroupware/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c39ddaf660044fe008f4c9d233d587f40a5148dd --- /dev/null +++ b/software/moregroupware/software.cfg @@ -0,0 +1,56 @@ +[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/moregroupware/moregroupware/0.7.4/moregroupware-core-0.7.4.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmoregroupware%2F&ts=1319116756&use_mirror=sunet +md5sum = b30523ab7dd2bf5003cb897be07201b7 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/mybloggie/instance.cfg b/software/mybloggie/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e5ea50d6b01f333bfb21345077241b76b6a82057 --- /dev/null +++ b/software/mybloggie/instance.cfg @@ -0,0 +1,21 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = user +constraint = `id`>0 + diff --git a/software/mybloggie/software.cfg b/software/mybloggie/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..201144709cb92d5d04758d0302360fa69ebd7a85 --- /dev/null +++ b/software/mybloggie/software.cfg @@ -0,0 +1,37 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://freefr.dl.sourceforge.net/project/mybloggie/mybloggie/myBloggie%202.1.4/mybloggie214.zip +md5sum = 0159c00829d2b20f32ce661d996870bb + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] diff --git a/software/mysql-5.1/software.cfg b/software/mysql-5.1/software.cfg index a58a8108beafc68d0ed822ce52a6c1227e99c900..42443783deb4b39a25c16ddc0d9c241fb53e4f5d 100644 --- a/software/mysql-5.1/software.cfg +++ b/software/mysql-5.1/software.cfg @@ -108,6 +108,7 @@ zope.interface = 3.8.0 [networkcache] # Cedric de Saint Martin signature certificate +# Test agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -122,3 +123,16 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- diff --git a/software/mytinytodo/instance.cfg b/software/mytinytodo/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b513f6c206a31d0a5b9013196d754e5da4210b67 --- /dev/null +++ b/software/mytinytodo/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 = setup.php +table_name = lists +constraint = `id`>0 diff --git a/software/mytinytodo/software.cfg b/software/mytinytodo/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..bb118515b411ed609c6e9836d931013b3c570199 --- /dev/null +++ b/software/mytinytodo/software.cfg @@ -0,0 +1,37 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://mytinytodo.googlecode.com/files/mytinytodo-v1.4.2.zip +md5sum = 562bcd9f04079f8ca16f767e029d22bd + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + diff --git a/software/newsevolution/instance.cfg b/software/newsevolution/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9f66ec11984e61026851d3c31c3a49911fd894b6 --- /dev/null +++ b/software/newsevolution/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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.php +table_name = user +constraint = `userid`>0 diff --git a/software/newsevolution/software.cfg b/software/newsevolution/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c9cf70fa55ea23ec0b4590cb16767eb4158dad64 --- /dev/null +++ b/software/newsevolution/software.cfg @@ -0,0 +1,37 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.phpevolution.net/download/ne/ne-3-0-2.tar.gz +md5sum = 5f1477669eb94df4094badbf3f0e4aa1 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/nucleus/configure-nucleus.py b/software/nucleus/configure-nucleus.py new file mode 100644 index 0000000000000000000000000000000000000000..4f9e6faf026cff0c36eb3205b95560bb594ac520 --- /dev/null +++ b/software/nucleus/configure-nucleus.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +import sys +import os + +def setup(args): + mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args + + config_php = os.path.join(htdocs, "config.php") + install_php = os.path.join(htdocs, "install.php") + install_sql = os.path.join(htdocs, "install.sql") + + os.chmod(config_php, 0444) + os.remove(install_php) + os.remove(install_sql) + +if __name__ == '__main__': + setup(sys.argv[1:]) diff --git a/software/nucleus/instance.cfg b/software/nucleus/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c0b7aeebd6be513a6be72225c67f9b2612d3c4f0 --- /dev/null +++ b/software/nucleus/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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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.sql, install.php +#chmod = config.php +#mode = 0444 +table_name = member +constraint = `mnumber`=1 +script = ${configure-script:location}/${configure-script:filename} \ No newline at end of file diff --git a/software/nucleus/software.cfg b/software/nucleus/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..014927b9374b566a7af5ad0cbaa402e91a536bb4 --- /dev/null +++ b/software/nucleus/software.cfg @@ -0,0 +1,66 @@ +[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://downloads.sourceforge.net/project/nucleuscms/1.%20Nucleus%20Core/Nucleus%20v3.64/nucleus3.64.zip?r=&ts=1319307841&use_mirror=freefr +md5sum = f38d23cba814e6aa05e5d82ea43cb3fd +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[configure-script] +recipe = hexagonit.recipe.download +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = ${:_profile_base_location_}/configure-nucleus.py +md5sum = c052f761180a6ee55af1e531e4c38b4b +filename = configure-nucleus.py +download-only = True +mode = 0744 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/openemr/configure-openemr.py b/software/openemr/configure-openemr.py new file mode 100644 index 0000000000000000000000000000000000000000..14fd5cbf8cf1cc568a8c7bcb55bafb3f07386b65 --- /dev/null +++ b/software/openemr/configure-openemr.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +import sys +import os + +def setup(args): + ''' + Freeglobes doesn't put the good url of the application + this script ensure the url is the good one + ''' + mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args + + htpasswd_file = os.path.join(htdocs, "sites/default/.htpasswd") + document_htaccess = os.path.join(htdocs, "sites/default/documents/.htaccess") + edi_htaccess = os.path.join(htdocs, "sites/default/edi/.htaccess") + era_htaccess = os.path.join(htdocs, "sites/default/era/.htaccess") + + f1 = open(htpasswd_file, 'w+') + f1.write("admin:OA9zt069mtqn6") #admin/admin + f1.close() + os.chmod(htpasswd_file, 0644) + + htaccess_content = "AuthUserFile %ssites/default/.htpasswd\nAuthName “OpenEMR Protected Pageâ€\nAuthType Basic\nRequire valid-user" % htdocs + + for f in [document_htaccess, edi_htaccess, era_htaccess]: + file = open(f, 'w+') + file.write(htaccess_content) + file.close() + os.chmod(f, 0644) + +if __name__ == '__main__': + setup(sys.argv[1:]) diff --git a/software/openemr/instance.cfg b/software/openemr/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/openemr/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/openemr/software.cfg b/software/openemr/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..13f9364cfa9924eafa68795378adbadb211eee43 --- /dev/null +++ b/software/openemr/software.cfg @@ -0,0 +1,66 @@ +[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://downloads.sourceforge.net/project/openemr/OpenEMR%20Current/4.1.0/openemr-4.1.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopenemr%2F&ts=1319625464&use_mirror=freefr +md5sum = 4311688c25e991825584ad529b553396 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[configure-script] +recipe = hexagonit.recipe.download +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = ${:_profile_base_location_}/configure-openemr.py +md5sum = cfb305e0fd2b996f8bfe4302dd6b6288 +filename = configure-openemr.py +download-only = True +mode = 0744 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/ouapi/instance.cfg b/software/ouapi/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..ad1cd8f57b04e302600ee5f28fdab4c272a33e84 --- /dev/null +++ b/software/ouapi/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = utilisateur +constraint = `id`>0 diff --git a/software/ouapi/software.cfg b/software/ouapi/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..492958496356d353593a8b0899efd650a97f761a --- /dev/null +++ b/software/ouapi/software.cfg @@ -0,0 +1,36 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.ouapi.org/downloads/current_version.zip +md5sum = adc5d29910450fbd75427cd720e3291c + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/owncloud/instance.cfg b/software/owncloud/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/owncloud/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/owncloud/software.cfg b/software/owncloud/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..8b88e896f4f73153eb3e26f8b988ada805ab007e --- /dev/null +++ b/software/owncloud/software.cfg @@ -0,0 +1,34 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://c702355.r55.cf3.rackcdn.com/releases/owncloud-3.0.0.tar.bz2 +md5sum = 0a48bf2b1ac10c11c4b7f6fd1de9a5d9 + +[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 +eggs = + ${instance-recipe:egg} diff --git a/software/phenix/instance.cfg b/software/phenix/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..136947fcab4fa1aa5d746ef3a6f5a2076cf5c059 --- /dev/null +++ b/software/phenix/instance.cfg @@ -0,0 +1,19 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = admin +constraint = (`admin_login`='admin' AND `admin_passwd`<>'21232f297a57a5a743894a0e4a801fc3') OR (`admin_id`>1) diff --git a/software/phenix/software.cfg b/software/phenix/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3e61af7688d6550d34c49c16698db5fa7ba95839 --- /dev/null +++ b/software/phenix/software.cfg @@ -0,0 +1,38 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.phenix.gapi.fr/download/phenix_501.zip +md5sum = 0538d2146f2cb01b24ae692928d8e92e + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + diff --git a/software/phpbms/instance.cfg b/software/phpbms/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7cddc9936213b301990d9f07fab9b80b9d090586 --- /dev/null +++ b/software/phpbms/instance.cfg @@ -0,0 +1,22 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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, modules/api/install, modules/bms/install, modules/mailchimp/install, modules/recurringinvoices/install, module/sample/install +table_name = modules +constraint = `id`>=5 diff --git a/software/phpbms/phpbms_for_mysql5.patch b/software/phpbms/phpbms_for_mysql5.patch new file mode 100644 index 0000000000000000000000000000000000000000..3631afdcf5e4d325ab597a02f7ef43e78abcd67c --- /dev/null +++ b/software/phpbms/phpbms_for_mysql5.patch @@ -0,0 +1,176 @@ +diff -crB phpbms/install/createtables.sql phpbms_timestamp/install/createtables.sql +*** phpbms/install/createtables.sql 2009-12-31 20:36:45.000000000 +0000 +--- phpbms_timestamp/install/createtables.sql 2011-11-03 12:47:29.000000000 +0000 +*************** +*** 36,42 **** + createdby int(11) NOT NULL default '0', + modifiedby int(11) default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', +! modifieddate timestamp(14) NOT NULL, + `roleid` VARCHAR(64), + PRIMARY KEY (id), + UNIQUE KEY (`uuid`) +--- 36,42 ---- + createdby int(11) NOT NULL default '0', + modifiedby int(11) default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', +! modifieddate timestamp NOT NULL, + `roleid` VARCHAR(64), + PRIMARY KEY (id), + UNIQUE KEY (`uuid`) +*************** +*** 116,122 **** + createdby int(11) NOT NULL default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', + modifiedby int(11) default '0', +! modifieddate timestamp(14) NOT NULL, + inherint tinyint(1) NOT NULL default '0', + PRIMARY KEY (id), + UNIQUE KEY (`uuid`), +--- 116,122 ---- + createdby int(11) NOT NULL default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', + modifiedby int(11) default '0', +! modifieddate timestamp NOT NULL, + inherint tinyint(1) NOT NULL default '0', + PRIMARY KEY (id), + UNIQUE KEY (`uuid`), +*************** +*** 267,273 **** + createdby int(11) NOT NULL default '0', + modifiedby int(11) default '0', + lastlogin datetime default NULL, +! modifieddate timestamp(14) NOT NULL, + email varchar(128) default '', + phone varchar(32) default '', + department varchar(128) default '', +--- 267,273 ---- + createdby int(11) NOT NULL default '0', + modifiedby int(11) default '0', + lastlogin datetime default NULL, +! modifieddate timestamp NOT NULL, + email varchar(128) default '', + phone varchar(32) default '', + department varchar(128) default '', +*************** +*** 318,324 **** + `createdby` int(11) default '0', + `creationdate` datetime default '0000-00-00 00:00:00', + `modifiedby` int(11) default '0', +! `modifieddate` timestamp(14) NOT NULL, + `roleid` VARCHAR(64), + `custom1` DOUBLE, + `custom2` DOUBLE, +--- 318,324 ---- + `createdby` int(11) default '0', + `creationdate` datetime default '0000-00-00 00:00:00', + `modifiedby` int(11) default '0', +! `modifieddate` timestamp NOT NULL, + `roleid` VARCHAR(64), + `custom1` DOUBLE, + `custom2` DOUBLE, +*************** +*** 340,346 **** + `createdby` int(11) default '0', + `creationdate` datetime default '0000-00-00 00:00:00', + `modifiedby` int(11) default '0', +! `modifieddate` timestamp(14) NOT NULL, + PRIMARY KEY (`id`), + KEY `therecord` (`recordid`), + KEY `thetable` (`tabledefid`), +--- 340,346 ---- + `createdby` int(11) default '0', + `creationdate` datetime default '0000-00-00 00:00:00', + `modifiedby` int(11) default '0', +! `modifieddate` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `therecord` (`recordid`), + KEY `thetable` (`tabledefid`), +diff -crB phpbms/modules/bms/install/createtables.sql phpbms_timestamp/modules/bms/install/createtables.sql +*** phpbms/modules/bms/install/createtables.sql 2010-01-06 00:06:44.000000000 +0000 +--- phpbms_timestamp/modules/bms/install/createtables.sql 2011-11-03 17:26:20.000000000 +0000 +*************** +*** 66,72 **** + description text, + createdby int(11) default NULL, + modifiedby int(11) default NULL, +! modifieddate timestamp(14) NOT NULL, + creationdate datetime default NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, +--- 66,72 ---- + description text, + createdby int(11) default NULL, + modifiedby int(11) default NULL, +! modifieddate timestamp NOT NULL, + creationdate datetime default NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, +*************** +*** 171,177 **** + createdby int(11) NOT NULL default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', + modifiedby int(11) default NULL, +! modifieddate timestamp(14) NOT NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, + `custom3` DATETIME, +--- 171,177 ---- + createdby int(11) NOT NULL default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', + modifiedby int(11) default NULL, +! modifieddate timestamp NOT NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, + `custom3` DATETIME, +*************** +*** 216,222 **** + `createdby` int(11) NOT NULL default 0, + `creationdate` datetime NOT NULL default '0000-00-00 00:00:00', + `modifiedby` int(11) default NULL, +! `modifieddate` timestamp(14) NOT NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, + `custom3` DATETIME, +--- 216,222 ---- + `createdby` int(11) NOT NULL default 0, + `creationdate` datetime NOT NULL default '0000-00-00 00:00:00', + `modifiedby` int(11) default NULL, +! `modifieddate` timestamp NOT NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, + `custom3` DATETIME, +*************** +*** 240,246 **** + isprepackaged tinyint(4) NOT NULL default '0', + packagesperitem double default NULL, + modifiedby int(11) default NULL, +! modifieddate timestamp(14) NOT NULL, + partname varchar(128) default NULL, + partnumber varchar(32) NOT NULL default '', + status varchar(32) NOT NULL default 'In Stock', +--- 240,246 ---- + isprepackaged tinyint(4) NOT NULL default '0', + packagesperitem double default NULL, + modifiedby int(11) default NULL, +! modifieddate timestamp NOT NULL, + partname varchar(128) default NULL, + partnumber varchar(32) NOT NULL default '', + status varchar(32) NOT NULL default 'In Stock', +*************** +*** 283,289 **** + createdby int(11) NOT NULL default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', + modifiedby int(11) default NULL, +! modifieddate timestamp(14) NOT NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, + `custom3` DATETIME, +--- 283,289 ---- + createdby int(11) NOT NULL default '0', + creationdate datetime NOT NULL default '0000-00-00 00:00:00', + modifiedby int(11) default NULL, +! modifieddate timestamp NOT NULL, + `custom1` DOUBLE, + `custom2` DOUBLE, + `custom3` DATETIME, diff --git a/software/phpbms/software.cfg b/software/phpbms/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..ee319748134474ed34b37857ad5029e8fb626384 --- /dev/null +++ b/software/phpbms/software.cfg @@ -0,0 +1,61 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + phpbms-patch + patch + +extends = + ../../stack/lamp.cfg + +[phpbms-patch] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/phpbms_for_mysql5.patch +md5sum = ddf323ac00e9e486cea8b8cc4277e065 +location = ${buildout:parts-directory}/${:_buildout_section_name_} +filename = phpbms_for_mysql5.patch + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.phpbms.org/files/phpbms/phpbms-0.98.tar.gz +md5sum = 3907c5115cf9acaab7cb5d22ce0534b7 + +[patch] +recipe = iw.recipe.cmd +on_install = true +on_update = true +cmds= patch -d ${application:location} -p1 < ${phpbms-patch:location}/${phpbms-patch:filename} + +[application-template] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/template/settings.php.in +filename = template.in +mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} + +[application-configuration] +location = settings.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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/phpbms/template/settings.php.in b/software/phpbms/template/settings.php.in new file mode 100644 index 0000000000000000000000000000000000000000..8d89bcad253809db62c20328967d5183e1f4cbc2 --- /dev/null +++ b/software/phpbms/template/settings.php.in @@ -0,0 +1,7 @@ +<?php [ +mysql_server = "%(mysql_host)s" +mysql_database = "%(mysql_database)s" +mysql_user = "%(mysql_user)s" +mysql_userpass = "%(mysql_password)s" +mysql_pconnect = "true" + end] ?> diff --git a/software/phpfin/configure-phpfin.py b/software/phpfin/configure-phpfin.py new file mode 100644 index 0000000000000000000000000000000000000000..3dff808f5364efb8a6d1082a6e15053c111ba671 --- /dev/null +++ b/software/phpfin/configure-phpfin.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +import sys +import os +import MySQLdb + +def setup(args): + renamed, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args + #base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args + sql_file = os.path.join(htdocs, "scripts/phpfin.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.read() + cursor.execute(sql_script) + conn.close() + except: + return + +if __name__ == '__main__': + setup(sys.argv[1:]) + diff --git a/software/phpfin/instance.cfg b/software/phpfin/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..50faea16a19f60e1b3f3d97f64b1557473c8cefa --- /dev/null +++ b/software/phpfin/instance.cfg @@ -0,0 +1,22 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +table_name = ** +constraint = 1 +script = ${configure-script:location}/${configure-script:filename} diff --git a/software/phpfin/software.cfg b/software/phpfin/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..86df43da374d975566bf798e4a0fc0169c9729f8 --- /dev/null +++ b/software/phpfin/software.cfg @@ -0,0 +1,57 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + configure-script + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://garr.dl.sourceforge.net/project/phpfin/phpfin/phpfinV1.00%20Free/phpfinfree1_0.zip +md5sum = 06f5ef5205c492e38ecbb6159f5417e4 + +[configure-script] +recipe = hexagonit.recipe.download +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = ${:_profile_base_location_}/configure-phpfin.py +filename = configure-phpfin.py +download-only = True + +[application-template] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/template/connection.inc.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 = connection.inc + + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/phpfin/template/connection.inc.in b/software/phpfin/template/connection.inc.in new file mode 100644 index 0000000000000000000000000000000000000000..e98689eeb5e5691319cadb32153585ca4bba673d --- /dev/null +++ b/software/phpfin/template/connection.inc.in @@ -0,0 +1,9 @@ +<?php +$databaseinfo = mysql_connect("%(mysql_host)s", "%(mysql_user)s", "%(mysql_password)s") or die ("Could not connect to server"); +mysql_select_db("%(mysql_database)s"); + +//Make sure that superglobals are loaded for PHP5 compatibility +include('superglobals.inc.php'); + + +?> diff --git a/software/phpip/instance.cfg b/software/phpip/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..6e3517ee8c9fd5c8ee9448d735af69ef3c54cb26 --- /dev/null +++ b/software/phpip/instance.cfg @@ -0,0 +1,22 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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.php +table_name = users +constraint = `uid`>0 diff --git a/software/phpip/software.cfg b/software/phpip/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..30d79eacc77b06c56fe9ff093648e443b04c598f --- /dev/null +++ b/software/phpip/software.cfg @@ -0,0 +1,49 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://flomoto.free.fr/phpip/phpip_11-05-11.tar.gz +md5sum = 94fe615f61fbb5ef0fcbf60a44ac5093 + +[application-template] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/template/database.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 = includes/database.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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] diff --git a/software/phpip/template/database.php.in b/software/phpip/template/database.php.in new file mode 100644 index 0000000000000000000000000000000000000000..8fb6075776fa62ec55e8c1a456c5c7e3efd8c1c2 --- /dev/null +++ b/software/phpip/template/database.php.in @@ -0,0 +1,23 @@ +<?php +/* ++-------------------------------------------------------------------------+ +| Copyright (C) 2006 Michael Earls | +| | +| 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 2 | +| 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. | ++-------------------------------------------------------------------------+ +| - phpIP - http://www.phpip.net/ | ++-------------------------------------------------------------------------+ + */ + +// Create database connection and select database +mysql_select_db('%(mysql_database)s', mysql_pconnect('%(mysql_host)s','%(mysql_user)s','%(mysql_password)s')) or die (mysql_error()); + +?> diff --git a/software/phpmyadmin/software.cfg b/software/phpmyadmin/software.cfg index 39d105f2fd4f096ea1a2b319ddde6399f1e6cc60..37097ef0ba0845a345422b2f954915f919a71870 100644 --- a/software/phpmyadmin/software.cfg +++ b/software/phpmyadmin/software.cfg @@ -22,7 +22,7 @@ mode = 0644 [application] recipe = slapos.recipe.build:download-unpacked -url = http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.bz2?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1300959842&use_mirror=sunet +url = http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.bz2 md5sum = cb7a632fb4f10a180ead15f7f90087f1 [application-template] diff --git a/software/phpmybackup/instance.cfg b/software/phpmybackup/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..1234ccac92542637604ec6e5e33bd0cfb3c755ef --- /dev/null +++ b/software/phpmybackup/instance.cfg @@ -0,0 +1,14 @@ +[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} + +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 \ No newline at end of file diff --git a/software/phpmybackup/software.cfg b/software/phpmybackup/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3a176aaf9fa886bf10f3a9bec049b6fdb0708c11 --- /dev/null +++ b/software/phpmybackup/software.cfg @@ -0,0 +1,56 @@ +[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://downloads.sourceforge.net/project/phpmybackup/phpMyBackupPro/phpMyBackupPro%202.2/phpMyBackupPro-2.2.zip?r=&ts=1319486570&use_mirror=freefr +md5sum = 577d9189195f358017e5910f3699b88e +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 + "/phpMyBackupPro", "${buildout:parts-directory}/${:_buildout_section_name_}") + +[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 +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/phpmyfaq/instance.cfg b/software/phpmyfaq/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..5afeb27b81e0f8d7cd927ee606eb8c582a802c2f --- /dev/null +++ b/software/phpmyfaq/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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/update.php +table_name = faquserlogin +constraint = `login`='anonymous' diff --git a/software/phpmyfaq/software.cfg b/software/phpmyfaq/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..5c97b300d5410bd232b4c89995fa321f99f4ec36 --- /dev/null +++ b/software/phpmyfaq/software.cfg @@ -0,0 +1,37 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.phpmyfaq.de/download/phpmyfaq-2.7.0.zip +md5sum = 2a19da49afe32c92f207339ff66d673a + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] diff --git a/software/phpnuke/software.cfg b/software/phpnuke/software.cfg index 61c2131a032842ce09e151b8cface8edc947807a..6c076a98bd93b13591e9b00a039c2e1ffc27c040 100644 --- a/software/phpnuke/software.cfg +++ b/software/phpnuke/software.cfg @@ -16,7 +16,7 @@ extends = [application] recipe = slapos.recipe.build:download-unpacked url = http://phpnuke.org/modules/Release/files/phpnuke-release-8.2.4.tar.gz -md5sum = 0f31895b141f50a5f2e6f083b0222fe2 +md5sum = d448586c651c811a137280b435c4e05c extract-directory = html [application-template] diff --git a/software/phprojekt/instance.cfg b/software/phprojekt/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/phprojekt/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/phprojekt/software.cfg b/software/phprojekt/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..60c71deaff4a426378886ae22657e5cdb4b697fd --- /dev/null +++ b/software/phprojekt/software.cfg @@ -0,0 +1,56 @@ +[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://downloads.sourceforge.net/project/phprojekt/PHProjekt%206.0/6.0.6/phprojekt-6.0.6.zip?r=http%3A%2F%2Fwww.google.fr%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3Ddownload%2520phprojekt%26source%3Dweb%26cd%3D4%26ved%3D0CD4QFjAD%26url%3Dhttp%253A%252F%252Fsourceforge.net%252Fprojects%252Fphprojekt%252Ffiles%252Flatest%252Fdownload%26ei%3DeWuyToW3HMWEOqubkYQC%26usg%3DAFQjCNG0ZO1Bp-VS5t4X2pI9QKAmlovXpg&ts=1320315780&use_mirror=freefr +md5sum = d139b3d9b791a39460e9a780dece7779 +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, "${buildout:parts-directory}/${:_buildout_section_name_}") + +[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 +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/pixelpost/instance.cfg b/software/pixelpost/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/pixelpost/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/pixelpost/pixelpost_for_mysql5.patch b/software/pixelpost/pixelpost_for_mysql5.patch new file mode 100644 index 0000000000000000000000000000000000000000..7b11861cd5f5e9f61d92bb4ac112e616c4ed2ea0 --- /dev/null +++ b/software/pixelpost/pixelpost_for_mysql5.patch @@ -0,0 +1,19 @@ +*** pixelpost1.7.3/includes/create_tables.php 2012-04-07 11:57:49.000000000 +0000 +--- pixelpost_for_mysql5/includes/create_tables.php 2012-04-07 12:01:30.000000000 +0000 +*************** +*** 123,129 **** + // Make future upgrade scripts easier by adding a version table + mysql_query("CREATE TABLE IF NOT EXISTS `{$prefix}version` ( + `id` INT(10) unsigned NOT NULL auto_increment, +! `upgrade_date` TIMESTAMP(14) NOT NULL, + `version` FLOAT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `version` (`version`))")or die("MySQL Error: ". mysql_error()); +--- 123,129 ---- + // Make future upgrade scripts easier by adding a version table + mysql_query("CREATE TABLE IF NOT EXISTS `{$prefix}version` ( + `id` INT(10) unsigned NOT NULL auto_increment, +! `upgrade_date` TIMESTAMP NOT NULL, + `version` FLOAT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `version` (`version`))")or die("MySQL Error: ". mysql_error()); diff --git a/software/pixelpost/software.cfg b/software/pixelpost/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..140ba1fab067abbd1fd91cd4bfcea24f8a9bc6e1 --- /dev/null +++ b/software/pixelpost/software.cfg @@ -0,0 +1,49 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + pixelpost-patch + patch + +extends = + ../../stack/lamp.cfg + +[pixelpost-patch] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/pixelpost_for_mysql5.patch +md5sum = 100883ebbe4973883a710996b91f5d23 +location = ${buildout:parts-directory}/${:_buildout_section_name_} +filename = pixelpost_for_mysql5.patch + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.pixelpost.org/releases/pixelpost_v1.7.3.zip +md5sum = 457f50312ca6dc682065ce3dbfda1a4f + +[patch] +recipe = iw.recipe.cmd +on_install = true +on_update = true +cmds= patch -d ${application:location} -p1 < ${pixelpost-patch:location}/${pixelpost-patch:filename} + +[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 +eggs = ${instance-recipe:egg} + diff --git a/software/postgres/instance.cfg.in b/software/postgres/instance.cfg.in index 8a7c190584cc9ff2943378041f0bacd983bfec28..383da8765cf76bee43d4183c6f2919f275173cc5 100644 --- a/software/postgres/instance.cfg.in +++ b/software/postgres/instance.cfg.in @@ -1,8 +1,8 @@ [buildout] parts = - symlinks publish postgres-instance + postgres-promise # Define egg directories to be the one from Software Release @@ -12,58 +12,64 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} offline = true -[instance-parameters] -# Fetches parameters defined in SlapOS Master for this instance -recipe = slapos.cookbook:slapconfiguration -computer = $${slap-connection:computer-id} -partition = $${slap-connection:partition-id} -url = $${slap-connection:server-url} -key = $${slap-connection:key-file} -cert = $${slap-connection:cert-file} - - [directories] recipe = slapos.cookbook:mkdirectory bin = $${buildout:directory}/bin etc = $${buildout:directory}/etc -services = $${directories:etc}/run/ -promises = $${directories:etc}/promise/ +services = $${directories:etc}/service +promises = $${directories:etc}/promise var = $${buildout:directory}/var -[symlinks] -recipe = cns.recipe.symlink -symlink_target = $${directories:bin} -symlink_base = ${postgresql:location}/bin - +#---------------- +#-- +#-- Creates a Postgres cluster, configuration files, and a database. [postgres-instance] -# create cluster, configuration files and a database recipe = slapos.cookbook:postgres # Options -ipv6_host = $${instance-parameters:ipv6} -ipv4_host = $${slap-network-information:local-ipv4} -user = user +ipv6 = $${instance-parameters:ipv6} +ipv4 = $${instance-parameters:ipv4} +ipv6_random = $${instance-parameters:ipv6_random} +superuser = postgres port = 5432 dbname = db # pgdata_directory is created by initdb, and should not exist beforehand. pgdata-directory = $${directories:var}/data +bin = ${postgresql:location}/bin services = $${directories:services} -bin = $${directories:bin} +#---------------- +#-- +#-- Deploy promise scripts. + +[postgres-promise] +recipe = slapos.cookbook:check_port_listening +path = $${directories:promises}/postgres +hostname = $${instance-parameters:ipv6_random} +port = $${postgres-instance:port} + + +#---------------- +#-- +#-- Publish instance parameters. + [publish] -recipe = slapos.cookbook:publishurl +recipe = slapos.cookbook:publish url = $${postgres-instance:url} -[slap-connection] -# part to migrate to new - separated words -computer-id = $${slap_connection:computer_id} -partition-id = $${slap_connection:partition_id} -server-url = $${slap_connection:server_url} -software-release-url = $${slap_connection:software_release_url} -key-file = $${slap_connection:key_file} -cert-file = $${slap_connection:cert_file} +#---------------- +#-- +#-- Fetches parameters defined in SlapOS Master for this instance + +[instance-parameters] +recipe = slapos.cookbook:slapconfiguration +computer = $${slap-connection:computer-id} +partition = $${slap-connection:partition-id} +url = $${slap-connection:server-url} +key = $${slap-connection:key-file} +cert = $${slap-connection:cert-file} diff --git a/software/postgres/software.cfg b/software/postgres/software.cfg index 46d21841829f08b1472a6ca8dcd370f71a9ee02a..77d8562cb7c60a088e3ed702fb851852f0714e7d 100644 --- a/software/postgres/software.cfg +++ b/software/postgres/software.cfg @@ -5,21 +5,60 @@ extends = ../../component/postgresql/buildout.cfg parts = - eggs slapos-cookbook - instance-template - postgresql + instance + postgresql92 -[instance-template] + +#---------------- +#-- Instance-level buildout profiles. + +[instance] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg.in -output = ${buildout:directory}/template.cfg -#md5sum = +output = ${buildout:directory}/instance.cfg +md5sum = dfba09a7cccefc5d92d455aaed2c1835 mode = 0644 -[eggs] -recipe = zc.recipe.egg -eggs = - cns.recipe.symlink +[versions] +Jinja2 = 2.6 +Werkzeug = 0.8.3 +buildout-versions = 1.7 +cns.recipe.symlink = 0.2.3 +hexagonit.recipe.cmmi = 1.6 +inotifyx = 0.2.0 +lxml = 3.1beta1 +meld3 = 0.6.10 +netaddr = 0.7.10 +pytz = 2012j +slapos.recipe.template = 2.4.2 +xml-marshaller = 0.9.7 + +# Required by: +# slapos.core==0.33.1 +Flask = 0.9 + +# Required by: +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.6 + +# Required by: +# slapos.core==0.33.1 +netifaces = 0.8 + +# Required by: +# cns.recipe.symlink==0.2.3 +# supervisor==3.0b1 +# zc.buildout==1.6.0-dev-SlapOS-010 +# zope.interface==4.0.3 +setuptools = 0.6c12dev-r88846 + +# Required by: +# slapos.core==0.33.1 +supervisor = 3.0b1 + +# Required by: +# slapos.core==0.33.1 +zope.interface = 4.0.3 diff --git a/software/prestashop/software.cfg b/software/prestashop/software.cfg index a3026764ba5100fc59a4c10d657a191e34835bfd..2368f9781f3d67d931a4c531dab8699ed42d4488 100644 --- a/software/prestashop/software.cfg +++ b/software/prestashop/software.cfg @@ -16,7 +16,7 @@ extends = [application] recipe = slapos.recipe.build:download-unpacked url = http://www.prestashop.com/download/prestashop_1.4.5.1.zip -md5sum = 49197c04bcf9523ef9deb6d691615d84 +md5sum = 6c0dcd301abe992a19dea1737d0adbe9 [instance-recipe] egg = slapos.cookbook diff --git a/software/projelead/instance.cfg b/software/projelead/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..4209b72b83f1043c6257093433cc33e7be76917e --- /dev/null +++ b/software/projelead/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 +table_name = pmsusers +constraint = `user_id`>0 \ No newline at end of file diff --git a/software/projelead/software.cfg b/software/projelead/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..84f337380e34195366c783d9284d4cdd37e97a99 --- /dev/null +++ b/software/projelead/software.cfg @@ -0,0 +1,36 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.projelead.com/downloads/Package%20installation/ProjeLead2_0.zip +md5sum = ec06dfa8f016ecc60a59e4c4a36efd94 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] \ No newline at end of file diff --git a/software/punbb/software.cfg b/software/punbb/software.cfg index f22451e5638aaf8f55c92b65dd5b376c59673c84..62825a813d475160edd51d82d2cff9173e52375c 100644 --- a/software/punbb/software.cfg +++ b/software/punbb/software.cfg @@ -16,7 +16,7 @@ extends = [application] recipe = slapos.recipe.build:download-unpacked url = http://punbb.informer.com/download/punbb-1.3.6.tar.gz -md5sum = 9454ef78101028fd5acf2731f77545c2 +md5sum = 7bb3f570cb6a61f8c3e3e25e750fd29d [application-template] recipe = slapos.recipe.download diff --git a/software/quick-cart/instance.cfg b/software/quick-cart/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/quick-cart/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/quick-cart/software.cfg b/software/quick-cart/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3acd0d1afb1804df5b96b11116b5c0b77f1aaf25 --- /dev/null +++ b/software/quick-cart/software.cfg @@ -0,0 +1,53 @@ +[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://opensolution.org/download,en,18.html?sFile=Quick.Cart/Quick.Cart_v5.1.zip +md5sum = c710d772b9b253c9cbba78dc4d619865 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = false + +[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 +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/quick-cms/instance.cfg b/software/quick-cms/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/quick-cms/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/quick-cms/software.cfg b/software/quick-cms/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..a50ad151bd2b556d452f68f06ef19e54bcb761f3 --- /dev/null +++ b/software/quick-cms/software.cfg @@ -0,0 +1,53 @@ +[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://opensolution.org/download,en,18.html?sFile=Quick.Cms/Quick.Cms_v4.1.zip +md5sum = b21ad5aaf0a367a0e7edf19f714e893a +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = false + +[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 +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/silverstripe/instance.cfg b/software/silverstripe/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..13e07c597bf6a6630282cdf056c7b3fa65669909 --- /dev/null +++ b/software/silverstripe/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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.php +table_name = Member +constraint = `ID`>0 + diff --git a/software/silverstripe/software.cfg b/software/silverstripe/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b884b97dae0c95dd40e12cd37c8396caae11d4dd --- /dev/null +++ b/software/silverstripe/software.cfg @@ -0,0 +1,55 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + downloadcache-workaround + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.6.tar.gz +md5sum = 6490d9fe5b72911ba5bda314cfc2d9dc + +[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 = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[versions] +# Use SlapOS patched zc.buildout +zc.buildout = 1.5.3-dev-SlapOS-010 +slapos.cookbook = 0.32 + +[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-invoicing/instance.cfg b/software/simple-invoicing/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..fd50f44f39c37337b8bb2e1f94aa4d085cb16b06 --- /dev/null +++ b/software/simple-invoicing/instance.cfg @@ -0,0 +1,13 @@ +[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} +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 \ No newline at end of file diff --git a/software/simple-invoicing/software.cfg b/software/simple-invoicing/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..aa01c5410a8021a113f771ea3f098b5da8e82a16 --- /dev/null +++ b/software/simple-invoicing/software.cfg @@ -0,0 +1,52 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + downloadcache-workaround + +extends = + ../../stack/lamp.cfg + +[application] +recipe = hexagonit.recipe.download +url = http://bigprof.com/appgini/sites/default/files/invoicing.zip +md5sum = b3fbc5c818e22363582f954bc04aa046 +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[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 +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/slaprunner/software.cfg b/software/slaprunner/software.cfg index 98ef557797931d327502dca687a2699716c4fd29..552a4b04bb30e3a992e5bb7026cd9f959365c97b 100644 --- a/software/slaprunner/software.cfg +++ b/software/slaprunner/software.cfg @@ -10,6 +10,7 @@ extends = common.cfg [networkcache] # signature certificates of the following uploaders. # Cedric de Saint Martin +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -24,7 +25,19 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- - + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- [versions] Flask-Auth = 0.85 diff --git a/software/sugar-crm/software.cfg b/software/sugar-crm/software.cfg index a3a7540b9ad79594bf7dd9d6bd8826d266510d59..399c546d3169acb7c50fbbfe6c3fe94040ecc3da 100644 --- a/software/sugar-crm/software.cfg +++ b/software/sugar-crm/software.cfg @@ -16,7 +16,7 @@ extends = [application] recipe = slapos.recipe.build:download-unpacked url = http://www.sugarforge.org/frs/download.php/8558/SugarCE-6.3.0RC3.zip -md5sum = ff4cf7c6f673f9f3f6e082c62736f628 +md5sum = 40bcc6ff38ef31194d46864a9f3548f3 [instance-recipe] egg = slapos.cookbook diff --git a/software/tesseract/software.cfg b/software/tesseract/software.cfg deleted file mode 100644 index 56ff8c4fe6812723ff6830283400562e892940f0..0000000000000000000000000000000000000000 --- a/software/tesseract/software.cfg +++ /dev/null @@ -1,5 +0,0 @@ -# A simple software release to test if tesseract building works -[buildout] -extends = - ../../stack/slapos.cfg - ../../component/tesseract/buildout.cfg \ No newline at end of file diff --git a/software/thelia/instance.cfg b/software/thelia/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c056c85a4e1cf630b00304a16c01b72fabf492c0 --- /dev/null +++ b/software/thelia/instance.cfg @@ -0,0 +1,20 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +table_name = lang +constraint = `defaut`=1 AND `url`<>'' +delete = install diff --git a/software/thelia/software.cfg b/software/thelia/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3f23c2c1c594432e9b8fdb4c6214d4ee24c48abf --- /dev/null +++ b/software/thelia/software.cfg @@ -0,0 +1,57 @@ +[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://thelia.net/fichiers/thelia_1.5.1.zip +md5sum = 7be32154c75e450b39bdb4478658848b +#If provided tarball does not contain top directory, option shall be changed to false +strip-top-level-dir = true + +[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 +#eggs = ${instance-recipe:egg} +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/ultimate-php-borad/instance.cfg b/software/ultimate-php-borad/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/ultimate-php-borad/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/ultimate-php-borad/software.cfg b/software/ultimate-php-borad/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..98ff45f4c19fe00c560a1335b58f2310b40df70d --- /dev/null +++ b/software/ultimate-php-borad/software.cfg @@ -0,0 +1,55 @@ +[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/textmb/UPB/UPB%202.2.7/upb2.2.7.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ftextmb%2Ffiles%2FUPB%2FUPB%25202.2.7%2F&ts=1320403647&use_mirror=freefr +md5sum = b50e2c8d222789beb399d07d3eba2206 +strip-top-level-dir = true + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + +[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/web2project/instance.cfg b/software/web2project/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f85a225d88815b0535817cc9a96c976eb649f3dd --- /dev/null +++ b/software/web2project/instance.cfg @@ -0,0 +1,16 @@ +[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} + +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/web2project/software.cfg b/software/web2project/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..14fcfb7817e15589055a57a8f3b85097c3ca2e78 --- /dev/null +++ b/software/web2project/software.cfg @@ -0,0 +1,35 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://freefr.dl.sourceforge.net/project/web2project/web2Project/v2.3%20Release/web2project-2.3.1.tar.gz +md5sum = 570e079775817ddda3c99eb302511e5a + +[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 +eggs = + ${instance-recipe:egg} \ No newline at end of file diff --git a/software/wikyblog/instance.cfg b/software/wikyblog/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9495bde7e7cadfe7dcb518156bf58a4f6a9c2a1c --- /dev/null +++ b/software/wikyblog/instance.cfg @@ -0,0 +1,15 @@ +[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} + +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/wikyblog/software.cfg b/software/wikyblog/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f4c497c2782be086e5993d03a6a04d7e25b43abd --- /dev/null +++ b/software/wikyblog/software.cfg @@ -0,0 +1,34 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://garr.dl.sourceforge.net/project/wikyblog/WikyBlog/1.7.3RC2/WikyBlog-1.7.3rc2.tar.gz +md5sum = 1d2adbb8e19f4168205f5a5b3e5c6a84 + +[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 +eggs = + ${instance-recipe:egg} diff --git a/software/wordpress/development.cfg b/software/wordpress/development.cfg new file mode 100644 index 0000000000000000000000000000000000000000..ac019acc5243445e44df8a854e0908f3600dbaf8 --- /dev/null +++ b/software/wordpress/development.cfg @@ -0,0 +1,53 @@ +# Exactly the same as software.cfg, but fetch the slapos.cookbook and +# slapos.toolbox from git repository instead of fetching stable version, +# allowing to play with bleeding edge environment. + +# You'll need to run buildout twice for this profile. + +[buildout] +extends = + ../../component/git/buildout.cfg + software.cfg + + +parts += + +# Development parts + slapos.cookbook-repository + slapos.core-repository + slapos.toolbox-repository + check-recipe + +develop = + ${:parts-directory}/slapos.cookbook-repository + ${:parts-directory}/slapos.core-repository + ${:parts-directory}/slapos.toolbox-repository + + +[slapos.toolbox-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.toolbox.git +branch = master +git-executable = ${git:location}/bin/git + +[slapos.cookbook-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.git +branch = lapp-resilient3 +git-executable = ${git:location}/bin/git + +[slapos.core-repository] +recipe = slapos.recipe.build:gitclone +repository = http://git.erp5.org/repos/slapos.core.git +branch = master +git-executable = ${git:location}/bin/git + +[check-recipe] +recipe = plone.recipe.command +stop-on-error = true +update-command = ${:command} +command = + grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link && + grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link && + grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link + diff --git a/software/wordpress/software.cfg b/software/wordpress/software.cfg index 70b7899fbd8608dde4a6d7067065e6856bb6e9a9..a7656ecc010f855b6d260705fdbed5b501dbfa72 100644 --- a/software/wordpress/software.cfg +++ b/software/wordpress/software.cfg @@ -3,8 +3,8 @@ extends = ../../stack/lamp/buildout.cfg [application] -url = http://wordpress.org/wordpress-3.4.2.tar.gz -md5sum = dfc56cee27eec8fb79070f033ecd4b25 +url = http://wordpress.org/wordpress-3.5.tar.gz +md5sum = 105b5baff67344528bb5d8b71c050b0d [application-template] recipe = slapos.recipe.download diff --git a/software/xaraya/instance.cfg b/software/xaraya/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2c9623b50852765efb8ec3f3e046ec5dae68e1fe --- /dev/null +++ b/software/xaraya/instance.cfg @@ -0,0 +1,22 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + +table_name = *_rolemembers +constraint = `xar_uid`=6 +delete = xaraya-1.2.3/html/install.php diff --git a/software/xaraya/software.cfg b/software/xaraya/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c43e9a98098943e8555dec12d3e64bc5ce7ed4ab --- /dev/null +++ b/software/xaraya/software.cfg @@ -0,0 +1,43 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://freefr.dl.sourceforge.net/project/xaraya/Core%20plus%20Modules/Xaraya%201.2.3%20Core%20Plus/xaraya-1.2.3-full.tar.gz +md5sum = c2fd2daa5335d262b4288e456c233434 +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_}") + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + diff --git a/software/xellplan/instance.cfg b/software/xellplan/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..540852f9b067663dc7f3de242bd333002df919a3 --- /dev/null +++ b/software/xellplan/instance.cfg @@ -0,0 +1,22 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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.php +table_name = sheets +constraint = `sheet_id`>=0 diff --git a/software/xellplan/software.cfg b/software/xellplan/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..0c55008bdd84d027741aaccdbb3db74e75062ac6 --- /dev/null +++ b/software/xellplan/software.cfg @@ -0,0 +1,47 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = hexagonit.recipe.download:download-unpacked +url = http://sunet.dl.sourceforge.net/project/xellplan/xellplan/xellplan-1.3/xellplan-1.3.tar.bz2 +md5sum = 37880217917367eb2d4a0a33c4a7fb65 + +[application-template] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/template/sfx.php.in +filename = template.in +mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} + +[application-configuration] +location = inc/sfx.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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] + diff --git a/software/xellplan/template/sfx.php.in b/software/xellplan/template/sfx.php.in new file mode 100644 index 0000000000000000000000000000000000000000..998222dbbdb597c25906dfe7adf2ef9327fdfc85 --- /dev/null +++ b/software/xellplan/template/sfx.php.in @@ -0,0 +1,124 @@ +<?php + +#---------------------------------------------------------------------- +# config begin + + $SITE_TITLE = "XellPlan"; + + # default language, ("de","en" are valid choices for now) + $LANGUAGE = "en"; + + $DB_NAME = "%(mysql_database)s"; + $DB_HOST = "%(mysql_host)s"; + $DB_USER = "%(mysql_user)s"; + $DB_PASS = "%(mysql_password)s"; + $DB_PREFIX = "xp_"; + + $CREATE_PASSWORD = "genesis"; # you need this one to create new plans + $MASTER_PASSWORD = "god"; # universal user and admin password + +# config end - don't modify anything below this line +#---------------------------------------------------------------------- + + + include("lang/".$LANGUAGE.".php"); + +function db_connect() { + + global $DB_LINK, $DB_HOST, $DB_USER, $DB_PASS, $DB_NAME, $CLUBS, $PLAN; + + $DB_LINK = mysql_pconnect( $DB_HOST, $DB_USER, $DB_PASS ); + mysql_select_db( $DB_NAME ); + +} + +function SfxRedirectPage($url,$Message,$time=2) { +?> +<html> +<head> +<link rel="stylesheet" type="text/css" href="std.css"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<meta name="author" content="Christoph Luehr"> +<meta http-equiv="pragma" content="no-cache"> +<meta http-equiv="content-language" content="de"> +<meta http-equiv="refresh" content="<?php echo $time; ?>;URL=<?php echo $url; ?>"> +<title>XCell-Plan: <?php echo $Message; ?></title> +</head> +<body> +<br/> +<h1><?php echo $Message; ?></h1> +<br></br> +</body> +</html> +<?php + exit; // finish after a redirect +} + +function SfxDateSel($varname, $default="today") { + + if ( $default == "today" ) $default= date('Y-m-d'); + + echo '<input type="text" name="'.$varname. + '" id="'.$varname.'" value="'.$default. + '" size="10" maxlength="10" readonly="true" />'; + echo '<input type="button" '. + 'onClick="showCalendar(this,document.getElementById(\''. + $varname.'\'),\'yyyy-mm-dd\',\''.$GLOBALS['LANGUAGE'].'\',1)" value="..." /> '; +} + +function SfxTimeSel($varname,$default="12:00:00") { + + echo '<select name="'.$varname.'">'; + for ($h=0; $h<24;$h++) { + + if (strlen($h)<2 ) $h="0".$h; # evil + foreach( array('00','30') as $m ) { + $sel=""; + if ( $default == $h.":".$m.":00") $sel=" selected"; + echo '<option value="'.$h.':'.$m.':00"'.$sel.'>'.$h.':'.$m.'</option>'; + } + } + echo '</select>'."\n"; + +} + +function SfxBegin() { + + db_connect(); + +} + +function filterVar($value) { + // recursive treatment for arrays + if (is_array($value)) { + $ret = array(); + foreach ($value as $k => $v) { + $ret[filterVar($k)] = filterVar($v); + } + return $ret; + } + // filter ascii control chars + $value = preg_replace('/[\x00-\x1f]+/', '', $value); + $value = str_replace('\\', '\\\\', $value); + $value = str_replace('\'', '\\\'', $value); + return $value; +} + +function getInputVar($name) { + if (isset($GLOBALS[$name])) { + return $GLOBALS[$name]; + } + if (isset($_GET[$name])) { + return filterVar($_GET[$name]); + } + if (isset($_POST[$name])) { + return filterVar($_POST[$name]); + } + return ''; +} + +SfxBegin(); // start DB connection + +// get often used vars + +$ID = getInputVar('ID'); diff --git a/software/xwiki/software.cfg b/software/xwiki/software.cfg index ba827197d921a259a0ea9e1f0d29f21d2c862333..5482de8e292d9b0a666503dd6a1e0da1716c2cc2 100644 --- a/software/xwiki/software.cfg +++ b/software/xwiki/software.cfg @@ -1,6 +1,7 @@ [buildout] extends = ../../stack/tomcat.cfg + ../../stack/slapos.cfg [instance-recipe] egg = slapos.cookbook @@ -23,6 +24,40 @@ recipe = hexagonit.recipe.download url = http://download.forge.objectweb.org/xwiki/xwiki-enterprise-web-2.7.war md5sum = c56e2cde96d28c5899a16a8270b6ff88 + +[networkcache] +# signature certificates of the following uploaders. +# Cedric de Saint Martin +# Test Agent +signature-certificate-list = + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT + MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB + D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1 + P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O + BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp + cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr + b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV + Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby + If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- + + [versions] slapos.cookbook = 0.18 diff --git a/software/zabbix-agent/software.cfg b/software/zabbix-agent/software.cfg index c8ae747fcee6a528ff783f3677e72db91f63fe3a..384cd78d37c4a10001a2ddc83a0114e19659be4c 100644 --- a/software/zabbix-agent/software.cfg +++ b/software/zabbix-agent/software.cfg @@ -21,6 +21,7 @@ mode = 0644 [networkcache] # signature certificates of the following uploaders. # Cedric de Saint Martin +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -35,6 +36,19 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- [versions] Jinja2 = 2.6 diff --git a/software/zenphoto/instance.cfg b/software/zenphoto/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f85a225d88815b0535817cc9a96c976eb649f3dd --- /dev/null +++ b/software/zenphoto/instance.cfg @@ -0,0 +1,16 @@ +[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} + +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/zenphoto/software.cfg b/software/zenphoto/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f1a6db9ac89131c2915871dc0c04bbe56330bd7a --- /dev/null +++ b/software/zenphoto/software.cfg @@ -0,0 +1,33 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://zenphoto.googlecode.com/files/zenphoto-1.4.2.2.tar.gz +md5sum = 1f4fff7294ffdd017d5ffc5207ec7011 + +[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 +eggs = ${instance-recipe:egg} diff --git a/software/zikula/configure-zikula.py b/software/zikula/configure-zikula.py new file mode 100644 index 0000000000000000000000000000000000000000..9b960e2899e4b0bf70fb9df4fc8a0f9cd7728e49 --- /dev/null +++ b/software/zikula/configure-zikula.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +import sys +import os +import shutil + +def setup(args): + mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args + + config_php = os.path.join(htdocs, "config/config.php") + install_php = os.path.join(htdocs, "install.php") + install_folder = os.path.join(htdocs, "install") + upgrade_php = os.path.join(htdocs, "upgrade.php") + + os.chmod(config_php, 0444) + os.remove(install_php) + os.remove(upgrade_php) + shutil.rmtree(install_folder) + +if __name__ == '__main__': + setup(sys.argv[1:]) + diff --git a/software/zikula/instance.cfg b/software/zikula/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..8923258e3dafc33590d98f1771cf671feb77096d --- /dev/null +++ b/software/zikula/instance.cfg @@ -0,0 +1,21 @@ +[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} +lampconfigure_directory = ${buildout:bin-directory}/lampconfigure + +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 + + +table_name = themes +constraint = `pn_id`>0 +script = ${configure-script:location}/${configure-script:filename} diff --git a/software/zikula/software.cfg b/software/zikula/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..06078ed28f34d0a948ffcfa944b88db3a9a3f8c7 --- /dev/null +++ b/software/zikula/software.cfg @@ -0,0 +1,45 @@ +[buildout] +versions = versions + +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg + configure-script + +extends = + ../../stack/lamp.cfg + +[application] +recipe = slapos.recipe.build:download-unpacked +url = http://ci.zikula.org/job/Zikula-1.2.8/17/artifact/build/archive/Zikula-1.2.8.build17.zip +md5sum = bc453d665605f954f1497586ccd6d267 + +[configure-script] +recipe = slapos.recipe.download +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = ${:_profile_base_location_}/configure-zikula.py +md5sum = c4d5f87d8f02cad3f20e679160195f48 +filename = configure-zikula.py +mode = 0744 + +[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 +eggs = + ${mysql-python:egg} + ${instance-recipe:egg} + slapos.toolbox[lampconfigure] diff --git a/stack/cloudooo.cfg b/stack/cloudooo.cfg index b8461ac5ea7437c57120f64dac9fce276da2781f..445a8b6ae5505f56182932a21f8a2a41d88eb38f 100755 --- a/stack/cloudooo.cfg +++ b/stack/cloudooo.cfg @@ -69,6 +69,7 @@ parts = # fonts liberation-fonts ipaex-fonts + ocrb-fonts # Dependencies libpng12 diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg index 03e99fa7efe2814adde18140ccaea922239ad24f..85d5c3ac465af098acafd75f9ecb8df569e53f69 100644 --- a/stack/erp5/buildout.cfg +++ b/stack/erp5/buildout.cfg @@ -117,6 +117,7 @@ parts = # fonts liberation-fonts ipaex-fonts + ocrb-fonts # Cloudooo specific part cloudooo @@ -489,6 +490,7 @@ eggs = Products.MimetypesRegistry Products.ExternalEditor Products.TIDStorage + Products.LongRequestLogger # Currently forked in our repository # Products.PortalTransforms diff --git a/stack/lamp/apache/instance-apache-php.cfg.in b/stack/lamp/apache/instance-apache-php.cfg.in index 203faacc3944c2b82379833c85750bb928250196..2e216e758935c419673d1a8baa4d0b7eb9241d60 100644 --- a/stack/lamp/apache/instance-apache-php.cfg.in +++ b/stack/lamp/apache/instance-apache-php.cfg.in @@ -36,7 +36,7 @@ tmp = $${buildout:directory}/tmp [basedirectory] recipe = slapos.cookbook:mkdirectory log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service run = $${rootdirectory:var}/run backup = $${rootdirectory:srv}/backup promises = $${rootdirectory:etc}/promise diff --git a/stack/lamp/buildout.cfg b/stack/lamp/buildout.cfg index fd3914ea4439ad3a25ac7d5c9e1c1f3344b442ae..5ad72334ef137324858e5c50c8b558048458e149 100644 --- a/stack/lamp/buildout.cfg +++ b/stack/lamp/buildout.cfg @@ -3,6 +3,7 @@ ignore-existing = true parts = + slapos-cookbook apache-php mariadb mydumper @@ -52,7 +53,7 @@ keep-compile-dir = false [application] recipe = hexagonit.recipe.download -#If provided tarball does not containt top directory this option shall be changed to false +# If the provided tarball does not contain top directory, this option should be changed to false strip-top-level-dir = true @@ -70,7 +71,7 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in output = ${buildout:directory}/instance-apache-php.cfg -md5sum = fc29d853dcd0802dd61c60b09e898c11 +md5sum = bf3219cd7d318e02e39c462fbb530715 mode = 0644 [instance-apache-backup] @@ -100,21 +101,21 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in output = ${buildout:directory}/instance-mariadb.cfg -md5sum = ba8dd08dfd5e6a9dc614693d066eb21d +md5sum = fafb873323c0084c522360f94ebe1df7 mode = 0644 [instance-mariadb-import] recipe = slapos.recipe.template url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in output = ${buildout:directory}/instance-mariadb-import.cfg -md5sum = ea43b8ed38a55a11b027fc283c0e718a +md5sum = 8009627bb669d1fee0df030daa8d3bdc mode = 0644 [instance-mariadb-export] recipe = slapos.recipe.template url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in output = ${buildout:directory}/instance-mariadb-export.cfg -md5sum = 685c8abf0f487c72273846002ec631a0 +md5sum = 0513bf25fbb20cccd57f285c40d96498 mode = 0644 @@ -276,108 +277,82 @@ signature-certificate-list = n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR -----END CERTIFICATE----- -[versions] -# 1.2.4b doesn't download -MySQL-python = 1.2.3 +[versions] Jinja2 = 2.6 Werkzeug = 0.8.3 -apache-libcloud = 0.11.3 +apache-libcloud = 0.11.4 async = 0.6.1 buildout-versions = 1.7 gitdb = 0.5.4 hexagonit.recipe.cmmi = 1.6 -meld3 = 0.6.9 +inotifyx = 0.2.0 +lxml = 3.0.2 +meld3 = 0.6.10 +netaddr = 0.7.10 pycrypto = 2.6 +pytz = 2012h rdiff-backup = 1.0.5 -slapos.cookbook = 0.69 slapos.recipe.build = 0.11.5 slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.template = 2.4.2 -slapos.toolbox = 0.31 smmap = 0.8.2 # Required by: -# slapos.core==0.31.2 -# slapos.toolbox==0.31 +# slapos.core==0.33.2-dev +# slapos.toolbox==0.32.1-dev Flask = 0.9 # Required by: -# slapos.toolbox==0.31 +# slapos.toolbox==0.32.1-dev GitPython = 0.3.2.RC1 # Required by: -# slapos.cookbook==0.69 -PyXML = 0.8.4 - -# Required by: -# slapos.toolbox==0.31 +# slapos.toolbox==0.32.1-dev atomize = 0.1.1 # Required by: -# slapos.toolbox==0.31 -feedparser = 5.1.2 +# slapos.toolbox==0.32.1-dev +feedparser = 5.1.3 # Required by: # hexagonit.recipe.cmmi==1.6 -hexagonit.recipe.download = 1.5.1 - -# Required by: -# slapos.cookbook==0.69 -inotifyx = 0.2.0 +hexagonit.recipe.download = 1.6 # Required by: -# slapos.cookbook==0.69 -# slapos.core==0.31.2 -# xml-marshaller==0.9.7 -lxml = 3.0.1 - -# Required by: -# slapos.cookbook==0.69 -netaddr = 0.7.10 - -# Required by: -# slapos.core==0.31.2 +# slapos.core==0.33.2-dev netifaces = 0.8 # Required by: -# slapos.toolbox==0.31 -paramiko = 1.7.7.2 +# slapos.toolbox==0.32.1-dev +paramiko = 1.9.0 # Required by: -# slapos.toolbox==0.31 +# slapos.toolbox==0.32.1-dev psutil = 0.6.1 # Required by: -# slapos.cookbook==0.69 -pytz = 2012f +# slapos.core==0.33.2-dev +pyflakes = 0.5.0 # Required by: -# slapos.cookbook==0.69 -# slapos.core==0.31.2 -# slapos.toolbox==0.31 +# slapos.cookbook==0.70.1-dev +# slapos.core==0.33.2-dev +# slapos.toolbox==0.32.1-dev +# supervisor==3.0b1 # zc.buildout==1.6.0-dev-SlapOS-010 -# zc.recipe.egg==1.3.2 +# zope.interface==4.0.2 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.69 -# slapos.toolbox==0.31 -slapos.core = 0.31.2 - -# Required by: -# slapos.core==0.31.2 +# slapos.core==0.33.2-dev supervisor = 3.0b1 # Required by: -# slapos.cookbook==0.69 -# slapos.toolbox==0.31 +# slapos.toolbox==0.32.1-dev xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.69 -zc.recipe.egg = 1.3.2 +# slapos.core==0.33.2-dev +zope.interface = 4.0.2 -# Required by: -# slapos.core==0.31.2 -zope.interface = 4.0.1 diff --git a/stack/lamp/mariadb/instance-mariadb-export.cfg.in b/stack/lamp/mariadb/instance-mariadb-export.cfg.in index 5bdeea81de923142599bcd5780709c9029c8875b..41276744538da96c4eb01d51f8136fc8c5cf81e2 100644 --- a/stack/lamp/mariadb/instance-mariadb-export.cfg.in +++ b/stack/lamp/mariadb/instance-mariadb-export.cfg.in @@ -2,7 +2,13 @@ extends = ${instance-mariadb:output} ${pbsready-export:output} -parts += mariadb + +parts += + mariadb + +# have to repeat the next one, as it's not inherited from pbsready-export + cron-entry-backup + [exporter] recipe = slapos.cookbook:mydumper diff --git a/stack/lamp/mariadb/instance-mariadb-import.cfg.in b/stack/lamp/mariadb/instance-mariadb-import.cfg.in index 42c06973a7578f28535360fa6e5a7259b399ed6c..6fba3a2a3039838e336c6949c15ec5bc7201869a 100644 --- a/stack/lamp/mariadb/instance-mariadb-import.cfg.in +++ b/stack/lamp/mariadb/instance-mariadb-import.cfg.in @@ -2,7 +2,12 @@ extends = ${instance-mariadb:output} ${pbsready-import:output} -parts += mariadb + +parts += + mariadb + +# have to repeat the next one, as it's not inherited from pbsready-import + import-on-notification [importer] recipe = slapos.cookbook:mydumper diff --git a/stack/lamp/mariadb/instance-mariadb.cfg.in b/stack/lamp/mariadb/instance-mariadb.cfg.in index df70e00b10fe002d9a38f4688c440ef73bf0a788..54c178fe16f8159e672275dd7e16953b6408696a 100644 --- a/stack/lamp/mariadb/instance-mariadb.cfg.in +++ b/stack/lamp/mariadb/instance-mariadb.cfg.in @@ -37,7 +37,7 @@ bin = $${buildout:directory}/bin [basedirectory] recipe = slapos.cookbook:mkdirectory log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service run = $${rootdirectory:var}/run script = $${rootdirectory:etc}/script backup = $${rootdirectory:srv}/backup diff --git a/stack/lapp/README.txt b/stack/lapp/README.txt index 043bac8c65a8b4bc5dbe68f875cab06fbab6ba31..74922e7f832bd1ef5cf954aaf1d9c4c80e8e0cf2 100644 --- a/stack/lapp/README.txt +++ b/stack/lapp/README.txt @@ -7,10 +7,7 @@ This fork of the LAMP stack provides: - a Postgres instance, with an empty database and a 'postgres' superuser. Log rotation is handled by Postgres itself. - - symlinks to all the postgres binaries, usable through unix socket - with no further authentication, or through ipv6 + - a psycopg2 (postgres driver) egg to be used by further configuration recipes - - a psycopg2 (postgres driver) egg - - - configuration for a maarch instance (this part should be brought outside the stack) + - a hook (custom-application-deployment) for configuring the PHP application diff --git a/stack/lapp/apache/instance-apache-backup.cfg.in b/stack/lapp/apache/instance-apache-backup.cfg.in index 5464bd05cce4316b8d63d6a1cae27b3656c9241b..ffe3b4fc7d14c61682f90d6c0cb7927857dfaec5 100644 --- a/stack/lapp/apache/instance-apache-backup.cfg.in +++ b/stack/lapp/apache/instance-apache-backup.cfg.in @@ -32,7 +32,7 @@ tmp = $${buildout:directory}/tmp [basedirectory] recipe = slapos.cookbook:mkdirectory log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service run = $${rootdirectory:var}/run backup = $${rootdirectory:srv}/backup promises = $${rootdirectory:etc}/promise diff --git a/stack/lapp/apache/instance-apache-php.cfg.in b/stack/lapp/apache/instance-apache-php.cfg.in index 6060647e7d2d52ff95f49d5d4904b5db1b63932c..5521da7e8b0f3cb27178d2a8807a1f7fb0205e5f 100644 --- a/stack/lapp/apache/instance-apache-php.cfg.in +++ b/stack/lapp/apache/instance-apache-php.cfg.in @@ -38,7 +38,7 @@ tmp = $${buildout:directory}/tmp [basedirectory] recipe = slapos.cookbook:mkdirectory log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service run = $${rootdirectory:var}/run backup = $${rootdirectory:srv}/backup promises = $${rootdirectory:etc}/promise @@ -194,8 +194,6 @@ url = $${request-postgres:connection-url} [apache-php] recipe = slapos.cookbook:apachephp source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} htdocs = $${rootdirectory:srv}/www/ pid-file = $${basedirectory:run}/apache.pid @@ -212,11 +210,6 @@ wrapper = $${basedirectory:services}/apache httpd-binary = ${apache:location}/bin/httpd -mysql-username = $${postgres-urlparse:username} -mysql-password = $${postgres-urlparse:password} -mysql-database = $${postgres-urlparse:path} -mysql-host = $${stunnel:local-host} -mysql-port = $${stunnel:local-port} [logrotate-entry-apache] <= logrotate diff --git a/stack/lapp/buildout.cfg b/stack/lapp/buildout.cfg index 0caefb1b337f98216f5377f2e3ebb8bcca1fc281..980e20f7bd580b4946a14b5613398f65893902db 100644 --- a/stack/lapp/buildout.cfg +++ b/stack/lapp/buildout.cfg @@ -1,5 +1,6 @@ [buildout] parts = + slapos-cookbook apache-php-postgres rdiff-backup dropbear @@ -38,6 +39,7 @@ extends = [application] recipe = hexagonit.recipe.download +# If the provided tarball does not contain top directory, this option should be changed to false strip-top-level-dir = true @@ -55,14 +57,14 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in output = ${buildout:directory}/instance-apache-php.cfg -md5sum = bed286b680bd8cd494da080cdc229f1e +md5sum = 72b70452d1c077cfcd0f268181506b8e mode = 0644 [instance-apache-backup] recipe = slapos.recipe.template url = ${:_profile_base_location_}/apache/instance-apache-backup.cfg.in output = ${buildout:directory}/instance-apache-backup.cfg -md5sum = 48f969d82319a9d145570f5f0fd27672 +md5sum = db879141c0b6a77ef8b3b7e699f5583a mode = 0644 [template-resilient-lapp] @@ -85,21 +87,21 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in output = ${buildout:directory}/instance-postgres.cfg -md5sum = c5cd2a644fcd8450bc5d13bf53ec9f7d +md5sum = 6e9e587ddb52fb9a3817fda7d77e4cab mode = 0644 [instance-postgres-import] recipe = slapos.recipe.template url = ${:_profile_base_location_}/postgres/instance-postgres-import.cfg.in output = ${buildout:directory}/instance-postgres-import.cfg -md5sum = 1989ba2164dd5f79793a04e0a02ea515 +md5sum = 7edfa157ddccc27e99bf128fc1c2b9ee mode = 0644 [instance-postgres-export] recipe = slapos.recipe.template url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in output = ${buildout:directory}/instance-postgres-export.cfg -md5sum = 7bce31bc22a731a8fc6119aee96586f5 +md5sum = 68080e5d861eb3474442211dd65c668b mode = 0644 @@ -160,9 +162,83 @@ eggs = ${lxml-python:egg} ${psycopg2:egg} slapos.toolbox - cns.recipe.symlink [versions] +Jinja2 = 2.6 +Werkzeug = 0.8.3 +apache-libcloud = 0.11.4 +async = 0.6.1 +buildout-versions = 1.7 +gitdb = 0.5.4 +hexagonit.recipe.cmmi = 1.6 +inotifyx = 0.2.0 +lxml = 3.0.2 meld3 = 0.6.10 +netaddr = 0.7.10 +psycopg2 = 2.4.6 +pycrypto = 2.6 +pytz = 2012h +rdiff-backup = 1.0.5 +slapos.recipe.download = 1.0.dev-r4053 +slapos.recipe.template = 2.4.2 +smmap = 0.8.2 + +# Required by: +# slapos.core==0.33.2-dev +# slapos.toolbox==0.32.1-dev +Flask = 0.9 + +# Required by: +# slapos.toolbox==0.32.1-dev +GitPython = 0.3.2.RC1 + +# Required by: +# slapos.toolbox==0.32.1-dev +atomize = 0.1.1 + +# Required by: +# slapos.toolbox==0.32.1-dev +feedparser = 5.1.3 + +# Required by: +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.6 + +# Required by: +# slapos.core==0.33.2-dev +netifaces = 0.8 + +# Required by: +# slapos.toolbox==0.32.1-dev +paramiko = 1.9.0 + +# Required by: +# slapos.toolbox==0.32.1-dev +psutil = 0.6.1 + +# Required by: +# slapos.core==0.33.2-dev +pyflakes = 0.5.0 + +# Required by: +# slapos.cookbook==0.70.1-dev +# slapos.core==0.33.2-dev +# slapos.toolbox==0.32.1-dev +# supervisor==3.0b1 +# zc.buildout==1.6.0-dev-SlapOS-010 +# zope.interface==4.0.2 +setuptools = 0.6c12dev-r88846 + +# Required by: +# slapos.core==0.33.2-dev +supervisor = 3.0b1 + +# Required by: +# slapos.toolbox==0.32.1-dev +xml-marshaller = 0.9.7 + +# Required by: +# slapos.core==0.33.2-dev +zope.interface = 4.0.2 diff --git a/stack/lapp/postgres/instance-postgres-export.cfg.in b/stack/lapp/postgres/instance-postgres-export.cfg.in index 9d54971c99d75364ddcc9bb9a087f17f607a1bd9..4bce336d727addf488fa1b69c820675c753b5c81 100644 --- a/stack/lapp/postgres/instance-postgres-export.cfg.in +++ b/stack/lapp/postgres/instance-postgres-export.cfg.in @@ -4,9 +4,12 @@ extends = ${instance-postgres:output} parts += - urls - postgres-instance - postgres-promise + urls + postgres-instance + postgres-promise + +# have to repeat the next one, as it's not inherited from pbsready-export + cron-entry-backup [exporter] diff --git a/stack/lapp/postgres/instance-postgres-import.cfg.in b/stack/lapp/postgres/instance-postgres-import.cfg.in index 5b2ac52a9eebcb928d5f54b2d91c90e4c378beb9..d053c5df630aea6c5207ff6654b9e93f4f9e5d77 100644 --- a/stack/lapp/postgres/instance-postgres-import.cfg.in +++ b/stack/lapp/postgres/instance-postgres-import.cfg.in @@ -4,7 +4,10 @@ extends = ${instance-postgres:output} parts += - postgres-instance + postgres-instance + +# have to repeat the next one, as it's not inherited from pbsready-import + import-on-notification [importer] recipe = slapos.cookbook:postgres.import diff --git a/stack/lapp/postgres/instance-postgres.cfg.in b/stack/lapp/postgres/instance-postgres.cfg.in index 58473dd82826e3207b08cccc5b59771e3876b93c..a15e72659470f68d82cf631568661120537d3ebd 100644 --- a/stack/lapp/postgres/instance-postgres.cfg.in +++ b/stack/lapp/postgres/instance-postgres.cfg.in @@ -37,7 +37,7 @@ bin = $${buildout:directory}/bin [basedirectory] recipe = slapos.cookbook:mkdirectory log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service run = $${rootdirectory:var}/run script = $${rootdirectory:etc}/script backup = $${rootdirectory:srv}/backup @@ -120,10 +120,10 @@ rotate-num = 30 notifempty = true create = true + #---------------- #-- #-- Deploy stunnel. -#-- XXX This is actually not needed with Postgres. [stunnel] recipe = slapos.cookbook:stunnel @@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf key-file = $${directory:stunnel-conf}/stunnel.key cert-file = $${directory:stunnel-conf}/stunnel.crt pid-file = $${basedirectory:run}/stunnel.pid -local-host = $${postgres-instance:ipv4_host} +local-host = $${instance-parameters:ipv4_random} local-port = $${postgres-instance:port} -remote-host = $${slap-network-information:global-ipv6} +remote-host = $${instance-parameters:ipv6_random} remote-port = 6446 client = false post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate @@ -165,25 +165,25 @@ certs = $${directory:ca-dir}/certs/ newcerts = $${directory:ca-dir}/newcerts/ crl = $${directory:ca-dir}/crl/ + #---------------- #-- #-- Creates a Postgres cluster, configuration files, and a database. [postgres-instance] recipe = slapos.cookbook:postgres -ipv6_host = $${slap-network-information:global-ipv6} -user = postgres +ipv6 = $${instance-parameters:ipv6} +ipv4 = $${instance-parameters:ipv4} +ipv6_random = $${instance-parameters:ipv6_random} +superuser = postgres port = 5432 dbname = db -# XXX the next line is required by stunnel, not by us -ipv4_host = $${slap-network-information:local-ipv4} # pgdata_directory is created by initdb, and should not exist beforehand. pgdata-directory = $${rootdirectory:var}/data backup-directory = $${basedirectory:backup}/postgres +bin = ${postgresql:location}/bin services = $${basedirectory:services} -bin = $${rootdirectory:bin} -dependency-symlinks = $${symlinks:recipe} [ca-stunnel] <= certificate-authority recipe = slapos.cookbook:certificate_authority.request @@ -192,15 +192,6 @@ wrapper = $${basedirectory:services}/stunnel key-file = $${stunnel:key-file} cert-file = $${stunnel:cert-file} -#---------------- -#-- -#-- Creates symlinks from the instance to the software release. - -[symlinks] -recipe = cns.recipe.symlink -symlink_target = $${rootdirectory:bin} -symlink_base = ${postgresql:location}/bin - #---------------- #-- @@ -227,7 +218,7 @@ path = $${directory:report}/slapmonitor-xml [postgres-promise] recipe = slapos.cookbook:check_port_listening path = $${basedirectory:promises}/postgres -hostname = $${slap-network-information:global-ipv6} +hostname = $${instance-parameters:ipv6_random} port = $${postgres-instance:port} @@ -238,7 +229,8 @@ port = $${postgres-instance:port} [urls] recipe = slapos.cookbook:publish url = $${postgres-instance:url} -ip = $${slap-network-information:global-ipv6} +ip = $${instance-parameters:ipv6_random} + #---------------- #-- diff --git a/stack/resilient/README.txt b/stack/resilient/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..e6703a14eba57c152f175e30f2b12488cf16a598 --- /dev/null +++ b/stack/resilient/README.txt @@ -0,0 +1,208 @@ + +Base resilient stack +==================== + +This stack is meant to be extended by SR profiles, or other stacks, that need to provide +automated backup/restore, election of backup candidates, and instance failover. + +As reference implementations, both stack/lamp and stack/lapp define resilient behavior for +MySQL and Postgres respectively. + +This involves three different software_types: + + * pull-backup + * {mysoftware}_export + * {mysoftware}_import + +where 'mysoftware' is the component that needs resiliency (can be postgres, mysql, erp5, and so on). + + +pull-backup +----------- + +This software type is defined in + + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/resilient/instance-pull-backup.cfg.in?js=1 + +and there should be no reason to modify or extend it. + +An instance of type 'pull-backup' will receive data from an 'export' instance and immediately populate an 'import' instance. +The backup data is automatically used to build an historical, incremental archive in srv/backup/pbs. + + +export +------ + +example: + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/lapp/postgres/instance-postgres-export.cfg.in?js=1 + +This is the *active* instance - the one providing live data to the application. + +A backup is run via the bin/exporter script: it will + 1) run bin/{mysoftware}-backup + and 2) notify the pull-backup instance that data is ready. + +The pull-backup, upon receiving the notification, will make a copy of the data and transmit it to the 'import' instances. + +You should provide the bin/{mysoftware}-exporter script, see for instance + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/postgres/__init__.py?js=1#l207 + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/mydumper.py?js=1#l71 + +By default, as defined in + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/resilient/pbsready-export.cfg.in?js=1#l27 +the bin/exporter script is run every 60 minutes. + + + +import +------ + +example: + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/lapp/postgres/instance-postgres-import.cfg.in?js=1 + +This is the *fallback* instance - the one that can be activated and thus become active. +Any number of import instances can be used. Deciding which one should take over can be done manually +or through a monitoring + election script. + + +You should provide the bin/{mysoftware}-importer script, see for instance + + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/postgres/__init__.py?js=1#l233 + http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/mydumper.py?js=1#l71 + + + + +In practice +----------- + +Add resilience to your software + +Let's say you already have a file instance-mysoftware.cfg.in that instantiates your +software. In which there is a part [mysoftware] where there is the main recipe +that instantiates the program. + +You need to create two new files, instance-mysoftware-import.cfg.in and +instance-mysoftware-export.cfg.in, following this layout: + + +IMPORT: + +[buildout] +extends = ${instance-mysoftware:output} + ${pbsready-import:output} + +parts += + mysoftware + import-on-notification + +[importer] +recipe = YourImportRecipe +wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-importer +backup-directory = $${directory:backup} +... + + + +EXPORT: + +[buildout] +extends = ${instance-mysoftware:output} + ${pbsready-export:output} + +parts += + mysoftware + cron-entry-backup + +[exporter] +recipe = YourExportRecipe +wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-exporter +backup-directory = $${directory:backup} +... + + +In the [exporter] / [importer] part, you are free to do whatever you want, but +you need to dump / import your data from $${directory:backup} and specify a +wrapper. I suggest you only add options and specify your export/import recipe. + + + +----------------------------------------------------------------------------------------- + +Finally, instance-mysoftware-import.cfg.in and +instance-mysoftware-export.cfg.in need to be downloaded and accessible by +switch_softwaretype, and you need to extend stack/resilient/buildout.cfg and +stack/resilient/switchsoftware.cfg to download the whole resiliency bundle. + +Here is how it's done in the mariadb case for the lamp stack: + + + + ** buildout.cfg ** + +extends = + ../resilient/buildout.cfg + +[instance-mariadb-import] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in +output = ${buildout:directory}/instance-mariadb-import.cfg +md5sum = ... +mode = 0644 + +[instance-mariadb-export] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in +output = ${buildout:directory}/instance-mariadb-export.cfg +md5sum = ... +mode = 0644 + + + + ** instance.cfg.in ** + +extends = + ../resilient/switchsoftware.cfg + +[switch-softwaretype] +... +mariadb = ${instance-mariadb:output} +mariadb-import = ${instance-mariadb-import:output} +mariadb-export = ${instance-mariadb-export:output} +... + + + +Then, in the .cfg file where you want to instantiate your software, you can do, instead of requesting your software + + * template-resilient.cfg.in * + +[buildout] +... +parts += + {{ parts.replicate("Name","3") }} + ... + +[...] +... +[ArgLeader] +... + +[ArgBackup] +... + +{{ replicated.replicate("Name", "3", + "mysoftware-export", "mysoftware-import", + "ArgLeader","ArgBackup") }} + +and it'll expend into the sections require to request Name0, Name1 and Name2, +backuped and resilient. The leader will expend the section [ArgLeader], backups +will expend [ArgBackup]. If you don't need to specify any options, you can +omit the last two arguments in replicate(). + +Since you will compile your template with jinja2, there should be no $${}, +because it is not yet possible to use jinja2 -> buildout template. + +To compile with jinja2, see jinja2's recipe. + + diff --git a/stack/resilient/buildout.cfg b/stack/resilient/buildout.cfg index 9c7a3b47fb4161e26d15c97dfffb815ee8a6a8e8..bc545a0d361edd18fa2a69d252dada3b08a3afb2 100644 --- a/stack/resilient/buildout.cfg +++ b/stack/resilient/buildout.cfg @@ -22,7 +22,7 @@ parts = recipe = slapos.recipe.template url = ${:_profile_base_location_}/pbsready.cfg.in output = ${buildout:directory}/pbsready.cfg -md5sum = a2edaadfe652b4b131626b4801768f40 +md5sum = e602f6746cbe5a1da82b90097719c4a1 mode = 0644 [pbsready-import] @@ -47,7 +47,7 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-pull-backup.cfg.in output = ${buildout:directory}/instance-pull-backup.cfg -md5sum = 18b88cd012e886fbaa457b03928c2d10 +md5sum = 453d96f5a6c1230c01c878cc7640bae6 mode = 0644 [template-replicated] diff --git a/stack/resilient/instance-pull-backup.cfg.in b/stack/resilient/instance-pull-backup.cfg.in index 6879b44060633b16c84e1b7380f31ae072ae021b..e97069435cb9902a653fa844dbee8d9d848c7030 100644 --- a/stack/resilient/instance-pull-backup.cfg.in +++ b/stack/resilient/instance-pull-backup.cfg.in @@ -30,7 +30,7 @@ var = $${buildout:directory}/var [basedirectory] recipe = slapos.cookbook:mkdirectory log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service run = $${rootdirectory:var}/run backup = $${rootdirectory:srv}/backup promises = $${rootdirectory:etc}/promise diff --git a/stack/resilient/pbsready.cfg.in b/stack/resilient/pbsready.cfg.in index 052aeaef1a439b33c3d634eab23eff4f8a94138b..69e5f9305b1f8ab2b1139c49a32a1a1b17e2ca43 100644 --- a/stack/resilient/pbsready.cfg.in +++ b/stack/resilient/pbsready.cfg.in @@ -24,7 +24,7 @@ parts += #-- Creation of all needed directories. [basedirectory] -services = $${rootdirectory:etc}/run +services = $${rootdirectory:etc}/service cache = $${rootdirectory:var}/cache notifier = $${rootdirectory:etc}/notifier diff --git a/stack/slapos.cfg b/stack/slapos.cfg index 1c4e8ee8d1272814afb2d9b4d9b04ff24a864aaa..3f92a14768be5821b7720294903ec596463bcf41 100644 --- a/stack/slapos.cfg +++ b/stack/slapos.cfg @@ -21,6 +21,7 @@ exec-sitecustomize = false # Add location for modified non-official slapos.buildout find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ + http://www.nexedi.org/static/packages/source/ # Use only quite well working sites. allow-hosts +=