diff --git a/CHANGES.txt b/CHANGES.txt index 24aa9f7da384819c5e306962ccac970b37d0ca34..5be87ef42c97c15a4f2ff5f376ccddcaee62fc6d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,10 +1,103 @@ Changes ======= -0.48 (Unreleased) +0.58 (Unreleased) ----------------- - * No change yet. + +0.57 (2012-06-22) +----------------- + + * Do not use system curl. [Romain Courteaud] + +0.56 (2012-06-18) +----------------- + + * Add signalwrapper, generate.mac, generate.password recipes. [Romain + Courteaud] + +0.55 (2012-06-18) +----------------- + + * Add slapmonitor and slapreport recipes. [Mohamadou Mbengue] + +0.54.1 (2012-06-18) +----------------- + + * Fix 0.54 release containing wrong code in request.py. + +0.54 (2012-06-18) +----------------- + + * Apache frontend: won't block sending slave informations to SlapOS Master + in case of problem from one slave instance.[Cedric de Saint Martin] + * Apache frontend will send IP informations for slaves in case slave is about + custom domain. [Cedric de Saint Martin] + * Ability to use LAMP applications without configuration. [Cedric de Saint + Martin] + * Users can specify custom domain in LAMP applications. [Cedric de Saint + Martin] + +0.53 (2012-06-07) +----------------- + + * Switch slaprunner into generic recipe, and add cloud9 recipe. [Cedric de + Saint Martin] + +0.52 (2012-05-16) +----------------- + + * Request bugfix: Correct default software_type (was: RootInstanceSoftware). + [Cedric de Saint Martin] + * Request will raise again if requested instance is not ready + [Romain Courteaud] + * Apache Frontend: assume apache is available from standard ports. + Consequence: url connection parameter of slave instance doesn't contain + port. [Cedric de Saint Martin] + * Apache Frontend bugfix: correctly detect slave instance type (zope). + [Cedric de Saint Martin] + * Apache Frontend: "default" slave instances are available through http + in addition to https. [Cedric de Saint Martin] + * Apache Frontend: Configuration: Add mod_deflate and set ProxyPreserveHost + [Cedric de Saint Martin] + +0.51 (2012-05-14) +----------------- + + * LAMP stack bugfix: Users were losing data when slapgrid is ran (Don't + erase htdocs if it already exist). [Cedric de Saint Martin] + +0.50 (2012-05-12) +----------------- + + * LAMP stack bugfix: fix a crash where recipe was trying to restart + non-existent httpd process. [Cedric de Saint Martin] + * LAMP stack bugfix: don't erase htdocs at update [Cedric de Saint Martin] + * Apache Frontend: Improve Apache configuration, inspired by Nexedi + production frontend. [Cedric de Saint Martin] + * Allow sysadmin of node to customize frontend instance. + [Cedric de Saint Martin] + * Apache Frontend: Change 'zope=true' option to 'type=zope'. + [Cedric de Saint Martin] + * Apache Frontend: listens to plain http port as well to redirect to https. + [Cedric de Saint Martin] + +0.49 (2012-05-10) +----------------- + + * Apache Frontend supports Zope and Varnish. [Cedric de Saint Martin] + +0.48 (2012-04-26) +----------------- + + * New utility recipe: slapos.recipe.generate_output_if_input_not_null. + [Cedric de Saint Martin] + * New promise recipe: slapos.recipe.url_available: check if url returns http + code 200. [Cedric de Saint Martin] + * Fix: slapos.recipe.request won't raise anymore if instance is not ready. + [Cedric de Saint Martin] + * Fix: slapos.recipe.request won't assume instance reference if not + specified. [Cedric de Saint Martin] 0.47 (2012-04-19) ----------------- diff --git a/component/apache-php/buildout.cfg b/component/apache-php/buildout.cfg index 92b031152085153554e863cf4f9c249213e61d4a..b9d146958fe012faa658b868c5c959eeb51ff509 100644 --- a/component/apache-php/buildout.cfg +++ b/component/apache-php/buildout.cfg @@ -22,8 +22,8 @@ extends = recipe = hexagonit.recipe.cmmi depends = ${mariadb:version} -url = http://fr2.php.net/distributions/php-5.3.10.tar.gz -md5sum = 2b3d2d0ff22175685978fb6a5cbcdc13 +url = http://fr2.php.net/distributions/php-5.3.13.tar.gz +md5sum = 179c67ce347680f468edbfc3c425476a configure-options = --with-apxs2=${apache:location}/bin/apxs --with-libxml-dir=${libxml2:location} diff --git a/component/apache/buildout.cfg b/component/apache/buildout.cfg index ccdea77b49a9e1e7b4c53df2c376a0b950a754f5..72863f6703666d351d890d4701d0960ace8fa801 100644 --- a/component/apache/buildout.cfg +++ b/component/apache/buildout.cfg @@ -45,6 +45,7 @@ configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_na --enable-cgid --enable-charset-lite --enable-disk-cache + --enable-mem-cache --enable-echo --enable-exception-hook --enable-mods-shared=all @@ -115,3 +116,73 @@ configure-options = -c mod_antiloris.c make-binary = ${:configure-command} make-options = -i -a -n antiloris mod_antiloris.la make-targets = + +[apache-2.2] +# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/ +recipe = hexagonit.recipe.cmmi +url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.22.tar.gz +md5sum = d77fa5af23df96a8af68ea8114fa6ce1 +patch-options = -p1 +configure-options = --disable-static + --enable-authn-alias + --enable-bucketeer + --enable-cache + --enable-case-filter + --enable-case-filter-in + --enable-cgid + --enable-charset-lite + --enable-disk-cache + --enable-mem-cache + --enable-echo + --enable-exception-hook + --enable-mods-shared=all + --enable-optional-fn-export + --enable-optional-fn-import + --enable-optional-hook-export + --enable-optional-hook-import + --enable-proxy + --enable-proxy-ajp + --enable-proxy-balancer + --enable-proxy-connect + --enable-proxy-ftp + --enable-proxy-http + --enable-proxy-scgi + --enable-dav + --enable-dav-fs + --enable-so + --enable-ssl + --with-included-apr + --with-ssl=${openssl:location} + --with-z=${zlib:location} + --with-expat=${libexpat:location} + --with-pcre=${pcre:location} + --with-sqlite3=${sqlite3:location} + --with-gdbm=${gdbm:location} + --without-lber + --without-ldap + --without-ndbm + --without-berkeley-db + --without-pgsql + --without-mysql + --without-sqlite2 + --without-oracle + --without-freedts + --without-odbc + --without-iconv + +environment = + PATH=${pkgconfig:location}/bin:%(PATH)s + PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig + CPPFLAGS =-I${libuuid: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 + +[apache-antiloris-apache-2.2] +# Note: Shall react on each build of apache and reinstall itself +recipe = hexagonit.recipe.cmmi +url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download +md5sum = 66862bf10e9be3a023e475604a28a0b4 +configure-command = ${apache-2.2:location}/bin/apxs +configure-options = -c mod_antiloris.c +make-binary = ${:configure-command} +make-options = -i -a -n antiloris mod_antiloris.la +make-targets = diff --git a/component/cloud9/buildout.cfg b/component/cloud9/buildout.cfg index 71f299a6b3d56290a39ec8bedf92fa95f71e9a70..95258281e44e0968b0e6dc0514d0f32e7fc1b091 100644 --- a/component/cloud9/buildout.cfg +++ b/component/cloud9/buildout.cfg @@ -14,6 +14,13 @@ parts = [cloud9] <= cloud9-git +[node-sm] +recipe = slapos.recipe.build:npm +packages = sm +node = nodejs +environment = + PATH=${nodejs:location}/bin:%(PATH)s + [cloud9-git] # Online IDE written in javascript/node.js # URL : c9.io @@ -21,12 +28,13 @@ parts = # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} recipe = plone.recipe.command stop-on-error = true -commit = 97db1467c517d265438684bd2a70b0b76ee282f6 +commit = 4bde3206ac0dc1e5736cb18a42851e203a6cc68f repository = https://github.com/ajaxorg/cloud9.git location = ${buildout:parts-directory}/${:_buildout_section_name_} git-binary = ${git:location}/bin/git -npm-binary = ${nodejs-0.4:location}/bin/node ${npm:location}/bin/npm -command = export GIT_SSL_NO_VERIFY=true; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${:git-binary} submodule update --init && cd support/jsdav && PATH=${nodejs-0.4:location}/bin:$PATH LDFLAGS=-L${libxml2:location}/lib ${:npm-binary} install) || (rm -fr ${:location}; exit 1) +npm-binary = ${nodejs:location}/bin/node ${nodejs:location}/bin/npm +environment = export GIT_SSL_NO_VERIFY=true; export PATH=${nodejs:location}/bin:$PATH; export LDFLAGS=-L${libxml2:location}/lib; +command = ${:environment} (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${node-sm:location}/node_modules/.bin/sm install && ${:npm-binary} install) || (rm -fr ${:location}; exit 1) update-command = [cloud9-npm] @@ -36,10 +44,10 @@ update-command = # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} recipe = slapos.recipe.npm # Node part has to be specified, otherwise system node is used. -node = nodejs-0.6 +node = nodejs # List of packages to install packages = - cloud9 + cloud9==0.7 # Specify environment jsDAV (dependency of cloud9) needs libxml2 environment = LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib diff --git a/component/couchdb/buildout.cfg b/component/couchdb/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f38f5484914c0756438a76a9b860ba713b2a8f85 --- /dev/null +++ b/component/couchdb/buildout.cfg @@ -0,0 +1,27 @@ +[buildout] + +extends = + ../openssl/buildout.cfg + ../curl/buildout.cfg + ../erlang/buildout.cfg + ../icu/buildout.cfg + ../spidermonkey/buildout.cfg + +parts = couchdb + +[couchdb] +recipe = hexagonit.recipe.cmmi +url = http://mir2.ovh.net/ftp.apache.org/dist//couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz +md5sum = cd126219b9cb69a4c521abd6960807a6 +configure-options = + --with-erlang=${erlang:location}/lib/erlang/usr/include + --with-js-include=${spidermonkey-1.7:location}/include + --with-js-lib=${erlang:location}/lib + --enable-js-trunk +environment-section = couchdb-environ + +[couchdb-environ] +PATH = ${erlang:location}/bin:${icu4c:location}/bin:${curl:location}/bin:%(PATH)s +# XXX: Gotta put everything on the same line. If not, it won't compile +CFLAGS = -I${icu4c:location}/include -I${spidermonkey-1.7:location}/include -I${curl:location}/include +LDFLAGS = -L${icu4c:location}/lib -Wl,-rpath=${icu4c:location}/lib -L${spidermonkey-1.7:location}/lib -Wl,-rpath=${spidermonkey-1.7:location}/lib -L${curl:location}/lib -Wl,-rpath=${curl:location}/lib diff --git a/component/erlang/buildout.cfg b/component/erlang/buildout.cfg index 4e39c26d9431bb4e40c2eeec850060242c7f2138..0743100b9ded9bd7d3464c19d30ae098c9a879ac 100644 --- a/component/erlang/buildout.cfg +++ b/component/erlang/buildout.cfg @@ -1,8 +1,26 @@ [buildout] -parts = - erlang +extends = + ../openssl/buildout.cfg + ../ncurses/buildout.cfg + ../zlib/buildout.cfg + ../java/buildout.cfg + +parts = erlang [erlang] recipe = hexagonit.recipe.cmmi -url = http://www.erlang.org/download/otp_src_R14B03.tar.gz -md5sum = 7979e662d11476b97c462feb7c132fb7 +url = http://www.erlang.org/download/otp_src_R14B04.tar.gz +md5sum = 4b469729f103f52702bfb1fb24529dc0 +configure-options = + --with-ssl=${openssl:location} + --with-java + --enable-dynamic-ssl-lib + --enable-shared-zlib + --enable-native-libs +environment= + PATH=${java-sdk-1.6.0:location}/bin:%(PATH)s + CFLAGS=-I${ncurses:location}/include -I${zlib:location}/include/ + LDFLAGS=-L${ncurses:location}/lib/ -L${zlib:location}/lib/ -Wl,-rpath=${ncurses:location}/lib/ -Wl,-rpath=${zlib:location}/lib/ + +make-options = + -j1 diff --git a/component/git/buildout.cfg b/component/git/buildout.cfg index 58fac379cf5a14022a8c0500dbd30025b8b62a7c..6673e211fb0948e96117f585167d5d68fb82a2cf 100644 --- a/component/git/buildout.cfg +++ b/component/git/buildout.cfg @@ -6,25 +6,24 @@ extends = ../curl/buildout.cfg ../libexpat/buildout.cfg ../openssl/buildout.cfg - ../perl/buildout.cfg ../zlib/buildout.cfg parts = git [git] recipe = hexagonit.recipe.cmmi -url = http://git-core.googlecode.com/files/git-1.7.10.tar.gz -md5sum = ab2716db51580037c7ebda4c8e9d56eb +url = http://git-core.googlecode.com/files/git-1.7.10.4.tar.gz +md5sum = 68319d593d051ef76c26e945bbd2d7ac configure-options = --with-curl=${curl:location} --with-openssl=${openssl:location} --with-zlib=${zlib:location} --with-expat=${libexpat:location} - --with-perl=${perl:location}/bin/perl --without-python --without-tcltk environment = - PATH=${curl:location}/bin:%(PATH)s + NO_PERL=y + PATH=${curl:location}/bin:${gettext:location}/bin:%(PATH)s CPPFLAGS=-I${zlib:location}/include LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib diff --git a/component/groonga/buildout.cfg b/component/groonga/buildout.cfg index 7991f23088c1ba39c6e6ea5ee541fe8866ace9bf..5d5345d01ab15d0683d2ee38e11fb6e22fa3d7ae 100644 --- a/component/groonga/buildout.cfg +++ b/component/groonga/buildout.cfg @@ -7,8 +7,8 @@ parts = [groonga] recipe = hexagonit.recipe.cmmi -url = http://packages.groonga.org/source/groonga/groonga-2.0.3.tar.gz -md5sum = 37c8539c78b19442a31a27cac0f15980 +url = http://packages.groonga.org/source/groonga/groonga-2.0.4.tar.gz +md5sum = c26aaf2944ed0ffba9e1e051b1c86642 configure-options = --disable-static --disable-glibtest diff --git a/component/icu/buildout.cfg b/component/icu/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..966be46e1ff47a92c0d998b8ac7f1379bf5111dc --- /dev/null +++ b/component/icu/buildout.cfg @@ -0,0 +1,11 @@ +[buildout] + +parts = icu4c + +[icu4c] +recipe = hexagonit.recipe.cmmi +location = ${buildout:parts-directory}/${:_buildout_section_name_} +url = http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz +md5sum = ea93970a0275be6b42f56953cd332c17 +configure-command = source/configure +configure-options = --prefix=${:location} diff --git a/component/imagemagick/buildout.cfg b/component/imagemagick/buildout.cfg index f1ca251cb6196dce57b786ac7d8b2f2d1432db7d..548bd13013c71ed3e07ada8db7988dea8548b44b 100644 --- a/component/imagemagick/buildout.cfg +++ b/component/imagemagick/buildout.cfg @@ -28,8 +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.7-7.tar.bz2 -md5sum = 5cc2d3cce6309840f8238482b82d6785 +url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.7-9.tar.bz2 +md5sum = 1ab883719ce3c9787c45971c7fc3c532 depends = ${libtiff:version} ${librsvg:version} diff --git a/component/libpng/buildout.cfg b/component/libpng/buildout.cfg index d990f7f1a630fe5c7aca10b51bfc1755576b436e..f90521da3805d569e7dfbbcbacb57b4c44810ff0 100644 --- a/component/libpng/buildout.cfg +++ b/component/libpng/buildout.cfg @@ -21,5 +21,5 @@ md5sum = d5106b70b4f8b464a7da66bffe4565fb [libpng] <= libpng-common -url = http://download.sourceforge.net/libpng/libpng-1.5.10.tar.bz2 -md5sum = f4395eaf426bdd870446c246df307aae +url = http://download.sourceforge.net/libpng/libpng-1.5.11.tar.bz2 +md5sum = cc1f78c87292161464c6f6f51fa19428 diff --git a/component/libtiff/buildout.cfg b/component/libtiff/buildout.cfg index 088b7997207adc9be3d64574a0c5cacd13b4f519..cb11f00058ed1beeed7dbb1c5b0addfb7dfe8d55 100644 --- a/component/libtiff/buildout.cfg +++ b/component/libtiff/buildout.cfg @@ -9,11 +9,11 @@ parts = [libtiff] recipe = hexagonit.recipe.cmmi -version = 4.0.1 +version = 4.0.2 #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 = fae149cc9da35c598d8be897826dfc63 +md5sum = 04a08fa1e07e696e820a0c3f32465a13 configure-options = --disable-static --without-x diff --git a/component/libuuid/buildout.cfg b/component/libuuid/buildout.cfg index 03ed76929a027ca9854359d7277157db1b50ed87..95f3a1d067cb0f5aa86c4f0ad25a491b036e177e 100644 --- a/component/libuuid/buildout.cfg +++ b/component/libuuid/buildout.cfg @@ -4,7 +4,7 @@ parts = [libuuid] recipe = hexagonit.recipe.cmmi -url = http://mirror.be.gbxs.net/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-2.18.tar.bz2 +url = http://www.kernel.org/pub/linux/utils/util-linux/v2.18/util-linux-ng-2.18.tar.bz2 md5sum = 2f5f71e6af969d041d73ab778c141a77 configure-options = --disable-static diff --git a/component/mariadb/buildout.cfg b/component/mariadb/buildout.cfg index c38a49e9820ca9ccda5db436a7ed1163aacc4764..27bc73111352a8864705515942fe275518bb2b95 100644 --- a/component/mariadb/buildout.cfg +++ b/component/mariadb/buildout.cfg @@ -25,10 +25,10 @@ download-only = true [mariadb] recipe = hexagonit.recipe.cmmi -version = 5.5.24 +version = 5.5.25 revision = 1 url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb -md5sum = caf9461227eeadd4e57cf3f2a74b1165 +md5sum = 943f67c267d73a4080ab497e11740daf # compile directory is required to build mysql plugins. keep-compile-dir = true patch-options = -p0 @@ -60,8 +60,8 @@ environment = [mroonga-mariadb] recipe = hexagonit.recipe.cmmi -url = https://github.com/downloads/mroonga/mroonga/mroonga-2.03.tar.gz -md5sum = 0f7c7035a0266fee8fc6d021145804b5 +url = https://github.com/downloads/mroonga/mroonga/mroonga-2.04.tar.gz +md5sum = 3c77aa2bf989f8b5531af08a5ffab359 configure-options = --with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version} --with-mysql-config=${mariadb:location}/bin/mysql_config diff --git a/component/mariadb/plugin_handler_socket_libhsclient_fatal.patch b/component/mariadb/plugin_handler_socket_libhsclient_fatal.patch new file mode 100644 index 0000000000000000000000000000000000000000..f49be3d9050e847cba1002cdee653b53a7f67d93 --- /dev/null +++ b/component/mariadb/plugin_handler_socket_libhsclient_fatal.patch @@ -0,0 +1,16 @@ +# inspired by handlersocket-1.0.6-80-g88bf1e0-1.1-nmu.diff by gregoa@debian.org + +Description: add missing include to avoid FTBFS with gcc 4.7 +bug-debian: http://bugs.debian.org/667198 +More informations: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667198 +Author: gregor herrmann <gregoa@debian.org> + +--- plugin/handler_socket/libhsclient/fatal.cpp ++++ plugin/handler_socket/libhsclient/fatal.cpp +@@ -9,6 +9,7 @@ + #include <stdlib.h> + #include <stdio.h> + #include <syslog.h> ++#include <unistd.h> + + #include "fatal.hpp" diff --git a/component/nodejs/buildout.cfg b/component/nodejs/buildout.cfg index dddcf4bef82274e0e4d7c02f1c275fac93574b0c..c19d668f81843504c37c75183ff0b55c954a74d9 100644 --- a/component/nodejs/buildout.cfg +++ b/component/nodejs/buildout.cfg @@ -12,8 +12,8 @@ parts = [nodejs] # Server-side Javascript. recipe = hexagonit.recipe.cmmi -url = http://nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz -md5sum = a12766ae4003c9712927d1fa134ed9f6 +url = http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz +md5sum = f5669a9717422b811c6bad1cc961b1e5 configure-options = --openssl-includes=${openssl:location}/include --openssl-libpath=${openssl:location}/lib diff --git a/component/openldap/buildout.cfg b/component/openldap/buildout.cfg index c9f83157328261bb1c3aed1e83fbd002ccb195a1..58e7a88fbb20f373e318039b9c466a11f80f2ac6 100644 --- a/component/openldap/buildout.cfg +++ b/component/openldap/buildout.cfg @@ -8,8 +8,8 @@ extends = [openldap] recipe = hexagonit.recipe.cmmi -url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.26.tgz -md5sum = f36f3086031dd56ae94f722ffae8df5e +url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.31.tgz +md5sum = 804c6cb5698db30b75ad0ff1c25baefd configure-options = --disable-static --disable-slapd diff --git a/component/slapos/buildout.cfg b/component/slapos/buildout.cfg index 0088c4709030c33159f60734cb6acb5402071282..94e3573cfad6e0c6403fc60b65a12f49f20a7d61 100644 --- a/component/slapos/buildout.cfg +++ b/component/slapos/buildout.cfg @@ -123,14 +123,14 @@ hexagonit.recipe.cmmi = 1.5.0 lxml = 2.3.4 meld3 = 0.6.8 netaddr = 0.7.6 -slapos.core = 0.24 +slapos.core = 0.25 slapos.libnetworkcache = 0.12 xml-marshaller = 0.9.7 z3c.recipe.scripts = 1.0.1 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 Flask = 0.8 # Required by: @@ -138,11 +138,11 @@ Flask = 0.8 hexagonit.recipe.download = 1.5.0 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 netifaces = 0.8 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 # slapos.libnetworkcache==0.12 # supervisor==3.0a12 # zc.buildout==1.6.0-dev-SlapOS-004 @@ -150,9 +150,9 @@ netifaces = 0.8 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 supervisor = 3.0a12 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 zope.interface = 3.8.0 diff --git a/component/spidermonkey/buildout.cfg b/component/spidermonkey/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..df41ec6f0fabbe7e1984c9953fa923dcb2d16e7f --- /dev/null +++ b/component/spidermonkey/buildout.cfg @@ -0,0 +1,24 @@ +[buildout] + +parts = spidermonkey + +[spidermonkey-1.7] +recipe = slapos.recipe.build +url = ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz +md5sum = 5571134c3863686b623ebe4e6b1f6fe6 +slapos_promise = + directory:include/ + directory:bin/ + file:bin/js + statlib:lib/libjs.a + file:lib/libjs.so +script = + url = self.download(self.options['url'], self.options['md5sum']) + extract_dir = self.extract(url) + workdir = os.path.join(guessworkdir(extract_dir), 'src') + env.update(JS_DIST=self.options['location']) + call(['make', '-f', 'Makefile.ref'], cwd=workdir, env=env) + call(['make', '-f', 'Makefile.ref', 'export'], cwd=workdir, env=env) + +[spidermonkey] +<= spidermonkey-1.7 diff --git a/component/sqlite3/buildout.cfg b/component/sqlite3/buildout.cfg index 679109459c2feffd3862eddd88eba5557c3194b3..d06637e3b5f2eac677b58191a43511652cc34274 100644 --- a/component/sqlite3/buildout.cfg +++ b/component/sqlite3/buildout.cfg @@ -5,8 +5,8 @@ parts = [sqlite3] recipe = hexagonit.recipe.cmmi -url = http://www.sqlite.org/sqlite-autoconf-3071201.tar.gz -md5sum = eb7bbd258913518ad30971ea7ecb0ca9 +url = http://www.sqlite.org/sqlite-autoconf-3071300.tar.gz +md5sum = c97df403e8a3d5b67bb408fcd6aabd8e configure-options = --disable-static --enable-readline diff --git a/setup.py b/setup.py index 09e9fc7bbe0e65ce85ee42380c860451e67ed674..fcf690808a45b1d4e486e19fb3fa1d6e12449302 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import glob import os -version = '0.48-dev' +version = '0.58-dev' name = 'slapos.cookbook' long_description = open("README.txt").read() + "\n" + \ open("CHANGES.txt").read() + "\n" @@ -48,6 +48,8 @@ setup(name=name, 'certificate_authority = slapos.recipe.certificate_authority:Recipe', 'certificate_authority.request = slapos.recipe.certificate_authority:Request', 'check_port_listening = slapos.recipe.check_port_listening:Recipe', + 'check_url_available = slapos.recipe.check_url_available:Recipe', + 'cloud9 = slapos.recipe.cloud9:Recipe', 'cron = slapos.recipe.dcron:Recipe', 'cron.d = slapos.recipe.dcron:Part', 'davstorage = slapos.recipe.davstorage:Recipe', @@ -59,8 +61,9 @@ setup(name=name, 'equeue = slapos.recipe.equeue:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'generate.mac = slapos.recipe.generatemac:Recipe', + 'generate.password = slapos.recipe.generatepassword:Recipe', 'nbdserver = slapos.recipe.nbdserver:Recipe', - 'generic.onetimeupload = slapos.recipe.generic_onetimeupload:Recipe', + 'onetimeupload = slapos.recipe.onetimeupload:Recipe', 'helloworld = slapos.recipe.helloworld:Recipe', 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', 'cloudooo.test = slapos.recipe.cloudooo_test:Recipe', @@ -109,6 +112,8 @@ setup(name=name, 'siptester = slapos.recipe.siptester:SipTesterRecipe', 'simplelogger = slapos.recipe.simplelogger:Recipe', 'slaprunner = slapos.recipe.slaprunner:Recipe', + 'slapmonitor = slapos.recipe.slapmonitor:Recipe', + 'slapreport = slapos.recipe.slapreport:Recipe', 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request', 'sphinx= slapos.recipe.sphinx:Recipe', @@ -130,6 +135,7 @@ setup(name=name, 'erp5.test = slapos.recipe.erp5_test:Recipe', 'generic.varnish = slapos.recipe.generic_varnish:Recipe', 'webchecker = slapos.recipe.web_checker:Recipe', + 'signalwrapper= slapos.recipe.signal_wrapper:Recipe', ], 'slapos.recipe.nosqltestbed.plugin': [ 'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed', diff --git a/slapos/recipe/README.apache_frontend.txt b/slapos/recipe/README.apache_frontend.txt deleted file mode 100644 index 89da1b88f1d91025b3cff543c0025a5d39dd727a..0000000000000000000000000000000000000000 --- a/slapos/recipe/README.apache_frontend.txt +++ /dev/null @@ -1,36 +0,0 @@ -apache_frontend -========== - -Frontend using Apache, allowing to rewrite and proxy URLs like -myinstance.myfrontenddomainname.com to real IP/URL of myinstance. - -apache_frontend works using the master instance / slave instance design. -It means that a single main instance of Apache will be used to act as frontend -for many slaves. - - -How to use -======== -First, you will need to request a "master" instance of Apache Frontend with -"domain" parameter, like : -<?xml version='1.0' encoding='utf-8'?> -<instance> - <parameter id="domain">moulefrite.com</parameter> - <parameter id="port">443</parameter> -</instance> - -Then, it is possible to request many slave instances -(currently only from slapconsole, UI doesn't work yet) -of Apache Frontend, like : -instance = request( - software_release=apache_frontend, - partition_reference='frontend2', - shared=True, - partition_parameter_kw={"url":"https://[1:2:3:4]:1234/someresource"} - ) -Those slave instances will be redirected to the "master" instance, -and you will see on the "master" instance the associated RewriteRules of -all slave instances. - -Finally, the slave instance will be accessible from : -https://someidentifier.moulefrite.com. diff --git a/slapos/recipe/agent/__init__.py b/slapos/recipe/agent/__init__.py index 0ea8a163be9fbbf56113af7cf4104a961b40e1ea..1f1f82947c595f4b36911d25b00dd90535da4745 100644 --- a/slapos/recipe/agent/__init__.py +++ b/slapos/recipe/agent/__init__.py @@ -55,6 +55,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe): configuration.add_section("agent") configuration.set("agent", "portal_url", self.parameter_dict["portal_url"]) configuration.set("agent", "master_url", self.parameter_dict["master_url"]) + configuration.set("agent", "report_url", self.parameter_dict["report_url"]) key_filepath = os.path.join(self.work_directory, "key") key_file = open(key_filepath, "w") key_file.write(self.parameter_dict["key"]) @@ -87,7 +88,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe): agent_crond_path = os.path.join(self.crond, "agent") agent_crond = open(agent_crond_path, "w") - agent_crond.write("*/1 * * * * %s -S %s" % \ + agent_crond.write("*/3 * * * * %s -S %s" % \ (self.options["python_binary"], "%s --pidfile=%s %s" % \ (self.options["agent_binary"], self.options["pidfile"], diff --git a/slapos/recipe/apache_frontend/__init__.py b/slapos/recipe/apache_frontend/__init__.py index acb67c8d418c51a42bb7251ceb05831bef64bb56..d0589641e17e265ecc62816b053732fed0a6d4bb 100644 --- a/slapos/recipe/apache_frontend/__init__.py +++ b/slapos/recipe/apache_frontend/__init__.py @@ -33,6 +33,7 @@ import zc.buildout import zc.recipe.egg import ConfigParser import re +import traceback class Recipe(BaseSlapRecipe): @@ -42,6 +43,19 @@ class Recipe(BaseSlapRecipe): 'template/%s' % template_name) def _install(self): + # Check for mandatory arguments + frontend_domain_name = self.parameter_dict.get("domain") + if frontend_domain_name is None: + raise zc.buildout.UserError('No domain name specified. Please define ' + 'the "domain" instance parameter.') + + # Define optional arguments + frontend_port_number = self.parameter_dict.get("port", 4443) + frontend_plain_http_port_number = self.parameter_dict.get( + "plain_http_port", 8080) + base_varnish_port = 26009 + slave_instance_list = self.parameter_dict.get("slave_instance_list", []) + self.path_list = [] self.requirements, self.ws = self.egg.working_set() @@ -51,72 +65,65 @@ class Recipe(BaseSlapRecipe): self.killpidfromfile = zc.buildout.easy_install.scripts( [('killpidfromfile', 'slapos.recipe.erp5.killpidfromfile', 'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0] - self.path_list.append(self.killpidfromfile) - frontend_port_number = self.parameter_dict.get("port", 4443) - frontend_domain_name = self.parameter_dict.get("domain", - "host.vifib.net") - - base_varnish_port = 26009 - slave_instance_list = self.parameter_dict.get("slave_instance_list", []) rewrite_rule_list = [] + rewrite_rule_zope_list = [] slave_dict = {} service_dict = {} - if frontend_port_number is 443: - base_url = "%s/" % frontend_domain_name - else: - base_url = "%s:%s/" % (frontend_domain_name, frontend_port_number) + for slave_instance in slave_instance_list: - url = slave_instance.get("url") - if url is None: - continue + backend_url = slave_instance.get("url", None) reference = slave_instance.get("slave_reference") - subdomain = reference.replace("-", "").lower() - slave_dict[reference] = "https://%s.%s" % (subdomain, base_url) - - enable_cache = slave_instance.get("enable_cache", "") - if enable_cache.upper() in ('1', 'TRUE'): - # Varnish should use stunnel to connect to the backend - base_varnish_control_port = base_varnish_port - base_varnish_port += 1 - # Use regex - host_regex = "((\[\w*|[0-9]+\.)(\:|)).*(\]|\.[0-9]+)" - slave_host = re.search(host_regex, url).group(0) - port_regex = "\w+(\/|)$" - matcher = re.search(port_regex, url) - if matcher is not None: - slave_port = matcher.group(0) - slave_port = slave_port.replace("/", "") - elif url.startswith("https://"): - slave_port = 443 - else: - slave_port = 80 - service_name = "varnish_%s" % reference - varnish_ip = self.getLocalIPv4Address() - stunnel_port = base_varnish_port + 1 - self.installVarnishCache(service_name, - ip=varnish_ip, - port=base_varnish_port, - control_port=base_varnish_control_port, - backend_host=varnish_ip, - backend_port=stunnel_port, - size="1G") - service_dict[service_name] = dict(public_ip=varnish_ip, - public_port=stunnel_port, - private_ip=slave_host.replace("[", "").replace("]", ""), - private_port=slave_port) - rewrite_rule_list.append("%s.%s http://%s:%s" % \ - (reference.replace("-", ""), frontend_domain_name, - varnish_ip, base_varnish_port)) + # Set scheme (http? https?) + # Future work may allow to choose between http and https (or both?) + scheme = 'http://' + + self.logger.info('Processing slave instance: %s' % reference) + + # Check for mandatory slave fields + if backend_url is None: + self.logger.warn('No "url" parameter is defined for %s slave'\ + 'instance. Ignoring it.' % reference) + continue + + # Check for custom domain (like mypersonaldomain.com) + # If no custom domain, use generated one. + # Note: if we get an empty custom_domain parameter, we ignore it + domain = slave_instance.get('custom_domain') + if isinstance(domain, basestring): + domain = domain.strip() + if domain is None or domain.strip() == '': + domain = "%s.%s" % (reference.replace("-", "").lower(), + frontend_domain_name) + + # Define the URL where the instance will be available + # WARNING: we use default ports (443, 80) here. + slave_dict[reference] = "%s%s/" % (scheme, domain) + + # Check if we want varnish+stunnel cache. + if slave_instance.get("enable_cache", "").upper() in ('1', 'TRUE'): + # XXX-Cedric : need to refactor to clean code? (to many variables) + rewrite_rule = self.configureVarnishSlave( + base_varnish_port, backend_url, reference, service_dict, domain) base_varnish_port += 2 else: - rewrite_rule_list.append("%s.%s %s" % (subdomain, frontend_domain_name, - url)) + rewrite_rule = "%s %s" % (domain, backend_url) + + # Finally, if successful, we add the rewrite rule to our list of rules + if rewrite_rule: + # We check if we have a zope slave. It requires different rewrite + # rule structure. + # So we will have one RewriteMap for normal websites, and one + # RewriteMap for Zope Virtual Host Monster websites. + if slave_instance.get("type", "").lower() in ['zope']: + rewrite_rule_zope_list.append(rewrite_rule) + else: + rewrite_rule_list.append(rewrite_rule) + # Certificate stuff valid_certificate_str = self.parameter_dict.get("domain_ssl_ca_cert") valid_key_str = self.parameter_dict.get("domain_ssl_ca_key") - if valid_certificate_str is None and valid_key_str is None: ca_conf = self.installCertificateAuthority() key, certificate = self.requestCertificate(frontend_domain_name) @@ -125,14 +132,13 @@ class Recipe(BaseSlapRecipe): frontend_domain_name, valid_certificate_str, valid_key_str) key = ca_conf.pop("key") certificate = ca_conf.pop("certificate") - if service_dict != {}: if valid_certificate_str is not None and valid_key_str is not None: self.installCertificateAuthority() stunnel_key, stunnel_certificate = \ self.requestCertificate(frontend_domain_name) else: - stunnel_key, stunnet_certificate = key, certificate + stunnel_key, stunnel_certificate = key, certificate self.installStunnel(service_dict, stunnel_certificate, stunnel_key, ca_conf["ca_crl"], @@ -142,19 +148,98 @@ class Recipe(BaseSlapRecipe): ip_list=["[%s]" % self.getGlobalIPv6Address(), self.getLocalIPv4Address()], port=frontend_port_number, + plain_http_port=frontend_plain_http_port_number, name=frontend_domain_name, rewrite_rule_list=rewrite_rule_list, + rewrite_rule_zope_list=rewrite_rule_zope_list, key=key, certificate=certificate) + # Send connection informations about each slave for reference, url in slave_dict.iteritems(): - self.setConnectionDict(dict(site_url=url), reference) - + self.logger.debug("Sending connection parameters of slave " + "instance: %s" % reference) + try: + connection_dict = { + 'frontend_ipv6_address': self.getGlobalIPv6Address(), + 'frontend_ipv4_address': self.getLocalIPv4Address(), + 'site_url': url + } + self.setConnectionDict(connection_dict, reference) + except: + self.logger.fatal("Error while sending slave %s informations: %s", + reference, traceback.format_exc()) + + # Then set it for master instance self.setConnectionDict( dict(site_url=apache_parameter_dict["site_url"], - domain_ipv6_address=self.getGlobalIPv6Address(), - domain_ipv4_address=self.getLocalIPv4Address())) + frontend_ipv6_address=self.getGlobalIPv6Address(), + frontend_ipv4_address=self.getLocalIPv4Address())) + + # Promises + promise_config = dict( + hostname=self.getGlobalIPv6Address(), + port=frontend_port_number, + python_path=sys.executable, + ) + promise_v6 = self.createPromiseWrapper( + 'apache_ipv6', + self.substituteTemplate( + pkg_resources.resource_filename( + 'slapos.recipe.check_port_listening', + 'template/socket_connection_attempt.py.in'), + promise_config)) + self.path_list.append(promise_v6) + + promise_config = dict( + hostname=self.getLocalIPv4Address(), + port=frontend_port_number, + python_path=sys.executable, + ) + promise_v4 = self.createPromiseWrapper( + 'apache_ipv4', + self.substituteTemplate( + pkg_resources.resource_filename( + 'slapos.recipe.check_port_listening', + 'template/socket_connection_attempt.py.in'), + promise_config)) + self.path_list.append(promise_v4) + return self.path_list + def configureVarnishSlave(self, base_varnish_port, url, reference, + service_dict, domain): + # Varnish should use stunnel to connect to the backend + base_varnish_control_port = base_varnish_port + base_varnish_port += 1 + # Use regex + host_regex = "((\[\w*|[0-9]+\.)(\:|)).*(\]|\.[0-9]+)" + slave_host = re.search(host_regex, url).group(0) + port_regex = "\w+(\/|)$" + matcher = re.search(port_regex, url) + if matcher is not None: + slave_port = matcher.group(0) + slave_port = slave_port.replace("/", "") + elif url.startswith("https://"): + slave_port = 443 + else: + slave_port = 80 + service_name = "varnish_%s" % reference + varnish_ip = self.getLocalIPv4Address() + stunnel_port = base_varnish_port + 1 + self.installVarnishCache(service_name, + ip=varnish_ip, + port=base_varnish_port, + control_port=base_varnish_control_port, + backend_host=varnish_ip, + backend_port=stunnel_port, + size="1G") + service_dict[service_name] = dict(public_ip=varnish_ip, + public_port=stunnel_port, + private_ip=slave_host.replace("[", "").replace("]", ""), + private_port=slave_port) + return "%s http://%s:%s" % \ + (domain, varnish_ip, base_varnish_port) + def installLogrotate(self): """Installs logortate main configuration file and registers its to cron""" logrotate_d = os.path.abspath(os.path.join(self.etc_directory, @@ -301,9 +386,9 @@ class Recipe(BaseSlapRecipe): apache_conf['port'] = port apache_conf['server_admin'] = 'admin@' apache_conf['error_log'] = os.path.join(self.log_directory, - name + '-error.log') + 'frontend-apache-error.log') apache_conf['access_log'] = os.path.join(self.log_directory, - name + '-access.log') + 'frontend-apache-access.log') self.registerLogRotation(name, [apache_conf['error_log'], apache_conf['access_log']], self.killpidfromfile + ' ' + apache_conf['pid_file'] + ' SIGUSR1') @@ -383,7 +468,8 @@ class Recipe(BaseSlapRecipe): self.path_list.append(wrapper) return stunnel_conf - def installFrontendApache(self, ip_list, port, key, certificate, name, + def installFrontendApache(self, ip_list, key, certificate, name, + port=4443, plain_http_port=8080, rewrite_rule_list=[], rewrite_rule_zope_list=[], access_control_string=None): # Create htdocs, populate it with default 404 document @@ -395,10 +481,36 @@ class Recipe(BaseSlapRecipe): notfound_file_content = open(notfound_template_file_location, 'r').read() self._writeFile(notfound_file_location, notfound_file_content) + # Create mod_ssl cache directory + cache_directory_location = os.path.join(self.var_directory, 'cache') + mod_ssl_cache_location = os.path.join(cache_directory_location, + 'httpd_mod_ssl') + 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. + # 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) + 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() + + # Create backup of custom apache configuration + backup_path = self.createBackupDirectory('custom_apache_conf_backup') + backup_cron = os.path.join(self.cron_d, 'custom_apache_conf_backup') + open(backup_cron, 'w').write( + '''0 0 * * * %(rdiff_backup)s %(source)s %(destination)s'''%dict( + rdiff_backup=self.options['rdiff_backup_binary'], + source=custom_apache_configuration_directory, + destination=backup_path)) + self.path_list.append(backup_cron) + # Create configuration file and rewritemaps apachemap_name = "apachemap.txt" - # XXX-Cedric : implement zope specific rewrites list. Current apachemap is - # generic and does not use VirtualHost Monster. apachemapzope_name = "apachemapzope.txt" self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list)) self.createConfigurationFile(apachemapzope_name, @@ -406,9 +518,17 @@ class Recipe(BaseSlapRecipe): apache_conf = self._getApacheConfigurationDict(name, ip_list, port) apache_conf['ssl_snippet'] = self.substituteTemplate( self.getTemplateFilename('apache.ssl-snippet.conf.in'), - dict(login_certificate=certificate, login_key=key)) + dict(login_certificate=certificate, + login_key=key, + httpd_mod_ssl_cache_directory=mod_ssl_cache_location, + ) + ) - apache_conf["listen"] = "\n".join(["Listen %s:%s" % (ip, port) for ip in ip_list]) + apache_conf["listen"] = "\n".join([ + "Listen %s:%s" % (ip, port) + for port in (plain_http_port, port) + for ip in ip_list + ]) path = self.substituteTemplate( self.getTemplateFilename('apache.conf.path-protected.in'), @@ -419,7 +539,9 @@ class Recipe(BaseSlapRecipe): apachemap_path=os.path.join(self.etc_directory, apachemap_name), apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name), apache_domain=name, - port=port, + https_port=port, + plain_http_port=plain_http_port, + custom_apache_conf=custom_apache_configuration_file_location, )) apache_conf_string = self.substituteTemplate( @@ -427,11 +549,10 @@ class Recipe(BaseSlapRecipe): apache_config_file = self.createConfigurationFile('apache_frontend.conf', apache_conf_string) - - self.path_list.append(apache_config_file) + self.path_list.extend(zc.buildout.easy_install.scripts([( - name, 'slapos.recipe.erp5.apache', 'runApache')], self.ws, + 'frontend_apache', 'slapos.recipe.erp5.apache', 'runApache')], self.ws, sys.executable, self.wrapper_directory, arguments=[ dict( required_path_list=[key, certificate], diff --git a/slapos/recipe/apache_frontend/template/apache.conf.in b/slapos/recipe/apache_frontend/template/apache.conf.in index 1ec1e6cd12b02dd24f2d6ab9232f6c2cfe89254a..6090c18319df658a321733ef6e64ad5173fdf17a 100644 --- a/slapos/recipe/apache_frontend/template/apache.conf.in +++ b/slapos/recipe/apache_frontend/template/apache.conf.in @@ -3,7 +3,6 @@ # Basic server configuration PidFile "%(pid_file)s" -LockFile "%(lock_file)s" ServerName %(server_name)s DocumentRoot %(document_root)s @@ -18,8 +17,7 @@ AddType application/x-gzip .gz .tgz # As backend is trusting REMOTE_USER header unset it always RequestHeader unset REMOTE_USER -# SSL Configuration -%(ssl_snippet)s +ServerTokens Prod # Log configuration ErrorLog "%(error_log)s" @@ -28,38 +26,15 @@ LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \" LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common CustomLog "%(access_log)s" common -# Directory protection -<Directory /> - Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all -</Directory> - %(path_enable)s -# Rewrite part -RewriteEngine On - -# Define the two rewritemaps : one for zope, one generic -RewriteMap apachemapzope txt:%(apachemapzope_path)s -RewriteMap apachemapgeneric txt:%(apachemap_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 ^/(\w+)($|/.*) ${apachemapzope:$1}/VirtualHostBase/https/%(apache_domain)s:%(port)s/VirtualHostRoot/_vh_$1$2 [L,P] - -# If we have generic backend server, let's rewrite without virtual host daemon -RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" -RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P] - -# If nothing exist : put a nice error -ErrorDocument 404 /notfound.html - # List of modules +#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 @@ -71,4 +46,91 @@ 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 + +# The following directives modify normal HTTP response behavior to +# handle known problems with browser implementations. +BrowserMatch "Mozilla/2" nokeepalive +BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 +BrowserMatch "RealPlayer 4\.0" force-response-1.0 +BrowserMatch "Java/1\.0" force-response-1.0 +BrowserMatch "JDK/1\.0" force-response-1.0 +# The following directive disables redirects on non-GET requests for +# a directory that does not include the trailing slash. This fixes a +# problem with Microsoft WebFolders which does not appropriately handle +# redirects for folders with DAV methods. +# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully +BrowserMatch "MS FrontPage" redirect-carefully +BrowserMatch "^WebDrive" redirect-carefully +BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully +BrowserMatch "^gnome-vfs" redirect-carefully +BrowserMatch "^XML Spy" redirect-carefully +BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully + +# Cache directives +CacheEnable mem / +CacheDefaultExpire 3600 +MCacheSize 8192 +MCacheMaxObjectCount 1000 +MCacheMaxObjectSize 8192 +MCacheRemovalAlgorithm LRU + +# Deflate +AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript +BrowserMatch ^Mozilla/4 gzip-only-text/html +BrowserMatch ^Mozilla/4\.0[678] no-gzip +BrowserMatch \bMSIE !no-gzip !gzip-only-text/html +# Make sure proxies don't deliver the wrong content +Header append Vary User-Agent + +# SSL Configuration +%(ssl_snippet)s + +<VirtualHost *:%(https_port)s> + SSLEngine on + SSLProxyEngine on + # Rewrite part + ProxyVia On + ProxyPreserveHost On + ProxyTimeout 600 + RewriteEngine On + + # Define the two rewritemaps : one for zope, one generic + RewriteMap apachemapzope txt:%(apachemapzope_path)s + RewriteMap apachemapgeneric txt:%(apachemap_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] + + # If we have generic backend server, let's rewrite without virtual host daemon + RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" + RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P] + + # If nothing exist : put a nice error + ErrorDocument 404 /notfound.html +</VirtualHost> + +<VirtualHost *:%(plain_http_port)s> + RewriteEngine On + ProxyPreserveHost On + + # We accept generic (i.e not lamp) backends on http + RewriteMap apachemapgeneric txt:%(apachemap_path)s + RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" + RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P] + + # Not using HTTPS? Ask that guy over there. + # Dummy redirection to https. Note: will work only if https listens + # on standard port (443). + RewriteRule ^/(.*)$ https://%%{SERVER_NAME}%%{REQUEST_URI} +</VirtualHost> + +# 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_conf)s diff --git a/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in b/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in index 67e6766ef23dfac6021247daa5dadebc8f69a126..624d6a23533f4672ea804a9fb71bc24eb8fe43f7 100644 --- a/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in +++ b/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in @@ -1,6 +1,17 @@ -SSLEngine on -SSLProxyEngine on SSLCertificateFile %(login_certificate)s SSLCertificateKeyFile %(login_key)s SSLRandomSeed startup builtin SSLRandomSeed connect builtin +SSLSessionCache shmcb:/%(httpd_mod_ssl_cache_directory)s/ssl_scache(512000) +SSLSessionCacheTimeout 300 +SSLRandomSeed startup /dev/urandom 256 +SSLRandomSeed connect builtin +SSLProtocol -ALL +SSLv3 +TLSv1 +SSLHonorCipherOrder On +SSLCipherSuite RC4-SHA:HIGH:!ADH +<FilesMatch "\.(cgi|shtml|phtml|php)$"> + SSLOptions +StdEnvVars +</FilesMatch> +# Accept proxy to sites using self-signed SSL certificates +SSLProxyCheckPeerCN off +SSLProxyCheckPeerExpire off diff --git a/slapos/recipe/apachephp/__init__.py b/slapos/recipe/apachephp/__init__.py index 927749ad980ddef9e7b859787a10b5f8874f3957..1292784df2218cae3eae61cda5b96e6e367d082d 100644 --- a/slapos/recipe/apachephp/__init__.py +++ b/slapos/recipe/apachephp/__init__.py @@ -37,9 +37,9 @@ class Recipe(GenericBaseRecipe): path_list = [] # Copy application - shutil.rmtree(self.options['htdocs']) - shutil.copytree(self.options['source'], - self.options['htdocs']) + if not os.path.exists(self.options['htdocs']): + shutil.copytree(self.options['source'], + self.options['htdocs']) # Install php.ini php_ini = self.createFile(os.path.join(self.options['php-ini-dir'], @@ -85,33 +85,37 @@ class Recipe(GenericBaseRecipe): with open(secret_key_filename, 'r') as secret_key_file: secret_key = secret_key_file.read() - application_conf = dict(mysql_database=self.options['mysql-database'], - mysql_user=self.options['mysql-username'], - mysql_password=self.options['mysql-password'], - mysql_host='%s:%s' % (self.options['mysql-host'], - self.options['mysql-port']), - secret_key=secret_key, - ) + # Generate application configuration file + if self.options.get('template'): + application_conf = dict(mysql_database=self.options['mysql-database'], + mysql_user=self.options['mysql-username'], + mysql_password=self.options['mysql-password'], + mysql_host='%s:%s' % (self.options['mysql-host'], + self.options['mysql-port']), + secret_key=secret_key, + ) - directory, file_ = os.path.split(self.options['configuration']) + directory, file_ = os.path.split(self.options['configuration']) - path = self.options['htdocs'] - if directory: - path = os.path.join(path, directory) - if not os.path.exists(path): - os.makedirs(path) - if not os.path.isdir(path): - raise OSError("Cannot create %r." % path) + path = self.options['htdocs'] + if directory: + path = os.path.join(path, directory) + if not os.path.exists(path): + os.makedirs(path) + if not os.path.isdir(path): + raise OSError("Cannot create %r." % path) - destination = os.path.join(path, file_) - config = self.createFile(destination, - self.substituteTemplate(self.options['template'], application_conf)) - path_list.append(config) + destination = os.path.join(path, file_) + config = self.createFile(destination, + 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) - os.kill(pid, signal.SIGUSR1) # Graceful restart - + try: + os.kill(pid, signal.SIGUSR1) # Graceful restart + except OSError: + pass return path_list diff --git a/slapos/recipe/check_url_available/__init__.py b/slapos/recipe/check_url_available/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ae0c3459a1767aaae28fd8a4c35a999ea325b66f --- /dev/null +++ b/slapos/recipe/check_url_available/__init__.py @@ -0,0 +1,48 @@ +############################################################################## +# +# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +from slapos.recipe.librecipe import GenericBaseRecipe +import sys + +class Recipe(GenericBaseRecipe): + """ + Create script that will check if "url" is available (e.g page answers 200 OK). + """ + + def install(self): + config = { + 'url': self.options['url'], + 'shell_path': self.options['dash_path'], + 'curl_path': self.options['curl_path'], + } + + # XXX-Cedric in this script, curl won't check certificate + promise = self.createExecutable( + self.options['path'], + self.substituteTemplate(self.getTemplateFilename('check_url.in'), config) + ) + + return [promise] diff --git a/slapos/recipe/check_url_available/template/check_url.in b/slapos/recipe/check_url_available/template/check_url.in new file mode 100644 index 0000000000000000000000000000000000000000..2b61fd088d1e01c08e5f980a25fb220fd1960747 --- /dev/null +++ b/slapos/recipe/check_url_available/template/check_url.in @@ -0,0 +1,16 @@ +#!%(shell_path)s +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically + +URL="%(url)s" +CODE=$(%(curl_path)s -k -sL $URL -w %%{http_code} -o /dev/null) + +if [ $CODE -eq 000 ]; then + echo "$URL is not available (server not reachable)" >&2 + exit 1 +fi + +if ! [ $CODE -eq 200 ]; then + echo "$URL is not available (returned $CODE)" >&2 + exit 2 +fi diff --git a/slapos/recipe/cloud9/__init__.py b/slapos/recipe/cloud9/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5dd16089ab081b8c81dd542464c7c0622f7956c --- /dev/null +++ b/slapos/recipe/cloud9/__init__.py @@ -0,0 +1,60 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +from slapos.recipe.librecipe import GenericBaseRecipe +import os + +class Recipe(GenericBaseRecipe): + """Deploy a fully operational cloud9 service.""" + + def _options(self, options): + self.ip = options['ip'].strip() + self.port = options['port'].strip() + self.git = options['git-binary'].strip() + self.node_executable = options['node-binary'].strip() + self.cloud9 = options['cloud9'].strip() + self.workdir = options['working-directory'].strip() + self.wrapper = options['wrapper'].strip() + # Set cloud9 access URL + options['access-url'] = 'http://[%s]:%s' % (self.ip, self.port) + + def install(self): + path_list = [] + + environment = { + 'PATH': os.path.dirname(self.git) + ':' + os.environ['PATH'], + } + + cloud9_args = [self.node_executable, self.cloud9, '-l', self.ip, '-p', + self.port, '-w', self.workdir] + + wrapper = self.createPythonScript(self.wrapper, + 'slapos.recipe.librecipe.execute.executee', + (cloud9_args, environment) + ) + path_list.append(wrapper) + + return path_list diff --git a/slapos/recipe/generatemac.py b/slapos/recipe/generatemac.py index 45abf6d2ee8961b025539b442403af8a62ee2036..33efc8e8308f710ea783ca1f47fac29e3b4e5fa2 100644 --- a/slapos/recipe/generatemac.py +++ b/slapos/recipe/generatemac.py @@ -1,4 +1,3 @@ - ############################################################################## # # Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. @@ -26,15 +25,26 @@ # ############################################################################## import random +import os from slapos.recipe.librecipe import GenericBaseRecipe class Recipe(GenericBaseRecipe): def __init__(self, buildout, name, options): - # First octet has to represent a locally administered address - octet_list = [254] + [random.randint(0x00, 0xff) for x in range(5)] - options['mac-address'] = ':'.join(['%02x' % x for x in octet_list]) + if os.path.exists(options['storage-path']): + open_file = open(options['storage-path'], 'r') + options['mac-address'] = open_file.read() + open_file.close() + + if options.get('mac-address', '') == '': + # First octet has to represent a locally administered address + octet_list = [254] + [random.randint(0x00, 0xff) for x in range(5)] + options['mac-address'] = ':'.join(['%02x' % x for x in octet_list]) + return GenericBaseRecipe.__init__(self, buildout, name, options) def install(self): - return [] + open_file = open(self.options['storage-path'], 'w') + open_file.write(self.options['mac-address']) + open_file.close() + return [self.options['storage-path']] diff --git a/slapos/recipe/generatepassword.py b/slapos/recipe/generatepassword.py new file mode 100644 index 0000000000000000000000000000000000000000..c84259364044007127503984cd6142b4b5e62fdd --- /dev/null +++ b/slapos/recipe/generatepassword.py @@ -0,0 +1,50 @@ +############################################################################## +# +# Copyright (c) 2012 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 random +import os +import binascii + +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + + def __init__(self, buildout, name, options): + if os.path.exists(options['storage-path']): + open_file = open(options['storage-path'], 'r') + options['passwd'] = open_file.read() + open_file.close() + + if options.get('passwd', '') == '': + options['passwd'] = binascii.hexlify(os.urandom( + int(options.get('bytes', '24')))) + return GenericBaseRecipe.__init__(self, buildout, name, options) + + def install(self): + open_file = open(self.options['storage-path'], 'w') + open_file.write(self.options['passwd']) + open_file.close() + return [self.options['storage-path']] diff --git a/slapos/recipe/kvm/__init__.py b/slapos/recipe/kvm/__init__.py index 54ec9a442a48014717616d341d37e705fcd53bd3..c6033cc921ee5217f33e2e96e100b28d8344c0b0 100644 --- a/slapos/recipe/kvm/__init__.py +++ b/slapos/recipe/kvm/__init__.py @@ -25,7 +25,6 @@ # ############################################################################## from slapos.recipe.librecipe import GenericBaseRecipe -import binascii import os import sys @@ -33,11 +32,6 @@ class Recipe(GenericBaseRecipe): """ kvm instance configuration. """ - - def __init__(self, buildout, name, options): - options['passwd'] = binascii.hexlify(os.urandom(4)) - return GenericBaseRecipe.__init__(self, buildout, name, options) - def install(self): config = dict( tap_interface=self.options['tap'], diff --git a/slapos/recipe/kvm/template/kvm_run.in b/slapos/recipe/kvm/template/kvm_run.in index d4f770a2d6f471b0ab208f67e57816b93a8f82c7..ba705b02b569c72c4e4b92e62ef36414caf90256 100644 --- a/slapos/recipe/kvm/template/kvm_run.in +++ b/slapos/recipe/kvm/template/kvm_run.in @@ -32,7 +32,7 @@ if not os.path.exists(disk_path): subprocess.Popen(['%(qemu_img_path)s', 'create' ,'-f', 'qcow2', '%(disk_path)s', '%(disk_size)sG']) -kvm_argument_list = ['kvm', '-net', 'nic,macaddr=%(mac_address)s', +kvm_argument_list = ['%(qemu_path)s', '-enable-kvm', '-net', 'nic,macaddr=%(mac_address)s', '-net', 'tap,ifname=%(tap_interface)s,script=no,downscript=no', '-smp', '%(smp_count)s', '-m', '%(ram_size)s', diff --git a/slapos/recipe/librecipe/__init__.py b/slapos/recipe/librecipe/__init__.py index 9d3fea2e55c7f9df9dc467d78951832522c4a89d..b4f737a44dba2caaae7bec10626907a7371ffbe0 100644 --- a/slapos/recipe/librecipe/__init__.py +++ b/slapos/recipe/librecipe/__init__.py @@ -236,6 +236,8 @@ class BaseSlapRecipe: return 'insecure' def install(self): + self.logger.warning("BaseSlapRecipe has been deprecated. Use " \ + "GenericBaseRecipe or GenericSlapRecipe instead.") self.slap.initializeConnection(self.server_url, self.key_file, self.cert_file) self.computer_partition = self.slap.registerComputerPartition( diff --git a/slapos/recipe/librecipe/generic.py b/slapos/recipe/librecipe/generic.py index d949270be5933bf407980e921f7c638b5a1fa9c4..c2f56ac1be6029fe4c0e2b2c2290e02d95752b6b 100644 --- a/slapos/recipe/librecipe/generic.py +++ b/slapos/recipe/librecipe/generic.py @@ -36,6 +36,10 @@ import pkg_resources import zc.buildout class GenericBaseRecipe(object): + """Boilerplate class for all Buildout recipes providing helpful methods like + creating configuration file, creating wrappers, generating passwords, etc. + Can be extended in SlapOS recipes to ease development. + """ TRUE_VALUES = ['y', 'yes', '1', 'true'] FALSE_VALUES = ['n', 'no', '0', 'false'] @@ -154,9 +158,6 @@ class GenericBaseRecipe(object): * if the host is an ipv6 address, brackets will be added to surround it. """ - # XXX-Antoine: I didn't find any standard module to join an url with - # login, password, ipv6 host and port. - # So instead of copy and past in every recipe I factorized it right here. netloc = '' if auth is not None: auth = tuple(auth) diff --git a/slapos/recipe/librecipe/genericslap.py b/slapos/recipe/librecipe/genericslap.py index a4525b7ce4b58daa968e8abbff5d748fac146db2..4033b349ea0ffae73d539189131409f7caf6f209 100644 --- a/slapos/recipe/librecipe/genericslap.py +++ b/slapos/recipe/librecipe/genericslap.py @@ -30,7 +30,10 @@ import time from generic import GenericBaseRecipe class GenericSlapRecipe(GenericBaseRecipe): - """Base class for all slap.recipe.*""" + """Base class for all slap.recipe.* needing SLAP informations like instance + parameters. + recipes that don't explicitely need to retrieve from server informations + should use GenericBaseRecipe.""" def __init__(self, buildout, name, options): """Default initialisation""" diff --git a/slapos/recipe/mysql/__init__.py b/slapos/recipe/mysql/__init__.py index 8624d0815d96bd1c78ac8e962cca4a91df0938a7..e8c8d8201aa42a1906769eb72a7dfc9ce431d079 100644 --- a/slapos/recipe/mysql/__init__.py +++ b/slapos/recipe/mysql/__init__.py @@ -58,7 +58,7 @@ class Recipe(GenericBaseRecipe): post_rotate = self.createPythonScript( self.options['logrotate-post'], 'slapos.recipe.librecipe.execute.execute', - [mysql_binary, '--no-defaults', '-B', '--socket=%s' % socket, '-e', + [mysql_binary, '--no-defaults', '-B', '-u', 'root', '--socket=%s' % socket, '-e', 'FLUSH LOGS'] ) path_list.append(post_rotate) diff --git a/slapos/recipe/generic_onetimeupload/__init__.py b/slapos/recipe/onetimeupload/__init__.py similarity index 92% rename from slapos/recipe/generic_onetimeupload/__init__.py rename to slapos/recipe/onetimeupload/__init__.py index 97ef798220e045de31c3d917ba7daf1167b182b1..402b3c20c3a20f04160118c81f4282ebc2a4fb5b 100644 --- a/slapos/recipe/generic_onetimeupload/__init__.py +++ b/slapos/recipe/onetimeupload/__init__.py @@ -33,11 +33,6 @@ class Recipe(GenericBaseRecipe): """ kvm instance configuration. """ - - def __init__(self, buildout, name, options): - options['key'] = binascii.hexlify(os.urandom(24)) - return GenericBaseRecipe.__init__(self, buildout, name, options) - def install(self): config = dict( ip=self.options['ip'], diff --git a/slapos/recipe/generic_onetimeupload/template/onetimeupload_run.in b/slapos/recipe/onetimeupload/template/onetimeupload_run.in similarity index 100% rename from slapos/recipe/generic_onetimeupload/template/onetimeupload_run.in rename to slapos/recipe/onetimeupload/template/onetimeupload_run.in diff --git a/slapos/recipe/request.py b/slapos/recipe/request.py index 07231b4b23d3b31c0330dc820d80716e2516575d..9b74022d1f8111e28e3a682888dd39c8755d6673 100644 --- a/slapos/recipe/request.py +++ b/slapos/recipe/request.py @@ -88,6 +88,7 @@ class Recipe(object): slap = slapmodule.slap() software_url = options['software-url'] + name = options['name'] slap.initializeConnection(options['server-url'], options.get('key-file'), @@ -120,7 +121,7 @@ class Recipe(object): options['config-%s' % config_parameter] self.instance = instance = request(software_url, software_type, - options.get('name', name), partition_parameter_kw=partition_parameter_kw, + name, partition_parameter_kw=partition_parameter_kw, filter_kw=filter_kw, shared=isSlave) for param in return_parameters: @@ -138,12 +139,14 @@ class Recipe(object): try: status = self.instance.getState() except slapmodule.NotFoundError: - status = "not ready yet, please try again" - # XXX-Cedric : currently raise an error. So swallow it... + status = 'not ready yet, please try again' except AttributeError: - status = "unknown" - raise KeyError("Connection parameter %s not found. " - "Status of requested instance is : %s." % (self.failed, status)) + status = 'unknown' + error_message = 'Connection parameter %s not found. '\ + 'Requested instance is currently %s. If this error persists, '\ + 'check status of this instance.' % (self.failed, status) + self.logger.error(error_message) + raise KeyError(error_message) return [] update = install diff --git a/slapos/recipe/signal_wrapper.py b/slapos/recipe/signal_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..77f63aa5140d5531e0923f49ee92a530e73e1021 --- /dev/null +++ b/slapos/recipe/signal_wrapper.py @@ -0,0 +1,37 @@ +############################################################################## +# +# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + def install(self): + return [ + self.createPythonScript( + self.options['wrapper-path'], + 'slapos.recipe.librecipe.execute.execute_with_signal_translation', + [self.options['wrapped-path']] + ) + ] diff --git a/slapos/recipe/slapmonitor/__init__.py b/slapos/recipe/slapmonitor/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6dc288366a80aac5ff868ffbb1ba21ad21666fd1 --- /dev/null +++ b/slapos/recipe/slapmonitor/__init__.py @@ -0,0 +1,54 @@ +############################################################################## +# +# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + """ + Slapmonitor instance configuration. + """ + + def __init__(self, buildout, name, options): + return GenericBaseRecipe.__init__(self, buildout, name, options) + + def install(self): + config = dict( + pid_file_path=self.options['pid-file'], + database_path=self.options['database-path'], + slapmonitor_path = self.options['slapmonitor-path'], + shell_path=self.options['shell-path'], + ) + + # Runners + runner_path = self.createExecutable( + self.options['path'], + self.substituteTemplate(self.getTemplateFilename('slapmonitor_run.in'), + config)) + + return [runner_path] + + def update(self): + pass diff --git a/slapos/recipe/slapmonitor/template/slapmonitor_run.in b/slapos/recipe/slapmonitor/template/slapmonitor_run.in new file mode 100644 index 0000000000000000000000000000000000000000..c0f96430765f9b79b2fd92a89146a49fbee2adb9 --- /dev/null +++ b/slapos/recipe/slapmonitor/template/slapmonitor_run.in @@ -0,0 +1,6 @@ +#!%(shell_path)s +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically +# +exec %(slapmonitor_path)s %(pid_file_path)s %(database_path)s + diff --git a/slapos/recipe/slapreport/__init__.py b/slapos/recipe/slapreport/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5f6a57ddf5c33ce521752b481dca80e8fefab4f --- /dev/null +++ b/slapos/recipe/slapreport/__init__.py @@ -0,0 +1,59 @@ +############################################################################## +# +# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + """ + Slapmonitor instance configuration. + """ + + def __init__(self, buildout, name, options): + return GenericBaseRecipe.__init__(self, buildout, name, options) + + def install(self): + config = dict( + pid_file_path=self.options['pid-file'], + consumption_log_path=self.options['consumption-log-path'], + database_path=self.options['database-path'], + slapreport_path = self.options['slapreport-path'], + logbox_ip = self.options['logbox-ip'], + logbox_port = self.options['logbox-port'], + logbox_user = self.options['logbox-user'], + logbox_passwd = self.options['logbox-passwd'], + shell_path=self.options['shell-path'], + ) + + # Runners + runner_path = self.createExecutable( + self.options['path'], + self.substituteTemplate(self.getTemplateFilename('slapreport_run.in'), + config)) + + return [runner_path] + + def update(self): + pass diff --git a/slapos/recipe/slapreport/template/slapreport_run.in b/slapos/recipe/slapreport/template/slapreport_run.in new file mode 100644 index 0000000000000000000000000000000000000000..19bafc12040a9bd7440ee0b01cd8dbde5f1179c9 --- /dev/null +++ b/slapos/recipe/slapreport/template/slapreport_run.in @@ -0,0 +1,5 @@ +#!%(shell_path)s +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically +# +exec %(slapreport_path)s %(pid_file_path)s %(consumption_log_path)s %(database_path)s %(logbox_ip)s %(logbox_port)s %(logbox_user)s %(logbox_passwd)s diff --git a/slapos/recipe/slaprunner/__init__.py b/slapos/recipe/slaprunner/__init__.py index 347c13ef9e06c238dc01e6ef326336a684ce4078..4cdb935c8a43d9c30cede89fa81528733b2ee4f6 100644 --- a/slapos/recipe/slaprunner/__init__.py +++ b/slapos/recipe/slaprunner/__init__.py @@ -24,74 +24,70 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## -from slapos.recipe.librecipe import BaseSlapRecipe +from slapos.recipe.librecipe import GenericBaseRecipe import os -import pkg_resources -import sys -import zc.buildout -import zc.recipe.egg +class Recipe(GenericBaseRecipe): + + def _options(self, options): + self.ipv4 = options['ipv4'].strip() + self.ipv6 = options['ipv6'].strip() + self.proxy_port = options['proxy_port'].strip() + self.runner_port = options['runner_port'].strip() + self.workdir = options['working-directory'].strip() + self.software_directory = options['software-directory'].strip() + self.instance_directory = options['instance-directory'].strip() + self.partition_amount = options['partition-amount'].strip() + self.cloud9_url = options['cloud9-url'].strip() + # Set slaprunner access URL + options['access-url'] = 'http://[%s]:%s' % (self.ipv6, self.runner_port) + + def install(self): + path_list = [] -class Recipe(BaseSlapRecipe): - def _install(self): - self.path_list = [] - self.requirements, self.ws = self.egg.working_set() - ipv4 = self.getLocalIPv4Address() - ipv6 = self.getGlobalIPv6Address() - proxy_port = '50000' - runner_port = '50000' - cloud9_port = '30000' - workdir = self.createDataDirectory('runner') - software_root = os.path.join(workdir, 'software') - instance_root = os.path.join(workdir, 'instance') configuration = dict( - software_root=software_root, - instance_root=instance_root, - master_url='http://%s:%s/' % (ipv4, proxy_port), + software_root=self.software_directory, + instance_root=self.instance_directory, + master_url='http://%s:%s/' % (self.ipv4, self.proxy_port), computer_id='slaprunner', - partition_amount=7, + partition_amount=self.partition_amount, slapgrid_sr=self.options['slapgrid_sr'], slapgrid_cp=self.options['slapgrid_cp'], slapproxy=self.options['slapproxy'], supervisor=self.options['supervisor'], - supervisord_config=os.path.join(instance_root, 'etc', + supervisord_config=os.path.join(self.instance_directory, 'etc', 'supervisord.conf'), - runner_workdir=workdir, - runner_host=ipv6, - runner_port=runner_port, - ipv4_address=ipv4, - ipv6_address=ipv6, - proxy_host=ipv4, - proxy_port=proxy_port, - proxy_database=os.path.join(workdir, 'proxy.db'), - git=self.options['git'], - cloud9_url='http://[%s]:%s' % (ipv6, cloud9_port), - ssh_client=self.options['ssh_client'], - public_key=self.options['public_key'], - private_key=self.options['private_key'], - + runner_workdir=self.workdir, + runner_host=self.ipv6, + runner_port=self.runner_port, + ipv4_address=self.ipv4, + ipv6_address=self.ipv6, + proxy_host=self.ipv4, + proxy_port=self.proxy_port, + proxy_database=os.path.join(self.workdir, 'proxy.db'), + git=self.options['git-binary'], + ssh_client=self.options['ssh_client'], + public_key=self.options['public_key'], + private_key=self.options['private_key'], + cloud9_url=self.cloud9_url ) - config_file = self.createConfigurationFile('slapos.cfg', - self.substituteTemplate(pkg_resources.resource_filename(__name__, - 'template/slapos.cfg.in'), configuration)) - self.path_list.append(config_file) + + config_file = self.createFile(self.options['slapos.cfg'], + self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'), + configuration)) + path_list.append(config_file) environment = dict( - PATH=os.path.dirname(self.options['git']) + ':' + os.environ['PATH'], + PATH=os.path.dirname(self.options['git-binary']) + ':' + os.environ['PATH'], GIT_SSH=self.options['ssh_client'] ) - workdir = os.path.join(workdir, 'project') - if not os.path.exists(workdir): - os.mkdir(workdir) + launch_args = [self.options['slaprunner'].strip(), config_file, '--debug'] - cloud9_args = [self.options['node-bin'].strip(), self.options['cloud9'].strip(), - '-l', ipv6, '-p', cloud9_port, '-w', workdir] - self.path_list.extend(zc.buildout.easy_install.scripts([('slaprunner', - 'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable, - self.wrapper_directory, arguments=[launch_args, environment])) - self.path_list.extend(zc.buildout.easy_install.scripts([('cloud9IDE', - 'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable, - self.wrapper_directory, arguments=[cloud9_args, environment])) - self.setConnectionDict(dict(slaprunner_url='http://[%s]:%s' % (ipv6, runner_port), - cloud9_url='http://[%s]:%s' % (ipv6, cloud9_port))) - return self.path_list + + wrapper = self.createPythonScript(self.options['wrapper'], + 'slapos.recipe.librecipe.execute.executee', + (launch_args, environment) + ) + path_list.append(wrapper) + + return path_list diff --git a/slapos/recipe/slaprunner/template/slapos.cfg.in b/slapos/recipe/slaprunner/template/slapos.cfg.in index a10da0cf5e11a414df22ed6f8dd6adb7955b6e4b..c8ee60bfeec5bbb9955374f41a548b13bd184f79 100644 --- a/slapos/recipe/slaprunner/template/slapos.cfg.in +++ b/slapos/recipe/slaprunner/template/slapos.cfg.in @@ -3,6 +3,7 @@ software_root = %(software_root)s instance_root = %(instance_root)s master_url = %(master_url)s computer_id = %(computer_id)s +maximal_delay = 0 [slapformat] partition_amount = %(partition_amount)s diff --git a/software/apache-frontend/README.apache_frontend.txt b/software/apache-frontend/README.apache_frontend.txt new file mode 100644 index 0000000000000000000000000000000000000000..ffff4255ad025cb915113f73bffb6afc909aea8e --- /dev/null +++ b/software/apache-frontend/README.apache_frontend.txt @@ -0,0 +1,119 @@ +apache_frontend +=============== + +Frontend system using Apache, allowing to rewrite and proxy URLs like +myinstance.myfrontenddomainname.com to real IP/URL of myinstance. + +apache_frontend works using the master instance / slave instance design. +It means that a single main instance of Apache will be used to act as frontend +for many slaves. + + +How to use +========== + +First, you will need to request a "master" instance of Apache Frontend with +"domain" parameter, like:: + <?xml version='1.0' encoding='utf-8'?> + <instance> + <parameter id="domain">moulefrite.org</parameter> + <parameter id="port">443</parameter> + </instance> + +Then, it is possible to request many slave instances +(currently only from slapconsole, UI doesn't work yet) +of Apache Frontend, like:: + instance = request( + software_release=apache_frontend, + partition_reference='frontend2', + shared=True, + partition_parameter_kw={"url":"https://[1:2:3:4]:1234/someresource"} + ) +Those slave instances will be redirected to the "master" instance, +and you will see on the "master" instance the associated RewriteRules of +all slave instances. + +Finally, the slave instance will be accessible from: +https://someidentifier.moulefrite.org. + +Instance Parameters +=================== + +Master Instance Parameters +-------------------------- + +domain +~~~~~~ +name of the domain to be used (example: mydomain.com). Subdomains of this +domain will be used for the slave instances (example: +instance12345.mydomain.com). It is then recommended to add a wildcard in DNS +for the subdomains of the chosen domain like:: + *.mydomain.com. IN A 123.123.123.123 +Using the IP given by the Master Instance. +"domain" is a mandatory Parameter. + +port +~~~~ +Port used by Apache. Optional parameter, defaults to 4443. + +plain_http_port +Port used by apache to serve plain http (only used to redirect to https). +Optional parameter, defaults to 8080. + +Slave Instance Parameters +------------------------- + +url +~~~ +url of backend to use. +"url" is a mandatory parameter. +Example: http://mybackend.com/myresource + +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". +Example: true + +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". +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]. +Example: www.mycustomdomain.com + + +Advanced example +================ + +Request slave frontend instance using a Zope backend, with Varnish activated, +listening to a custom domain:: + instance = request( + software_release=apache_frontend, + partition_reference='frontend2', + shared=True, + partition_parameter_kw={ + "url":"https://[1:2:3:4]:1234/someresource", + "cache":"true", + "type":"zope", + "custom_domain":"mycustomdomain.com", + } + ) + +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 diff --git a/software/apache-frontend/instance.cfg b/software/apache-frontend/instance.cfg index fecc536ddae08643a9b55bb2f92277fb695321c9..5578977cab836a7bef1b70a8c96f6006c668a88f 100644 --- a/software/apache-frontend/instance.cfg +++ b/software/apache-frontend/instance.cfg @@ -7,7 +7,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} [instance] recipe = ${instance-recipe:egg}:${instance-recipe:module} -httpd_binary = ${apache:location}/bin/httpd +httpd_binary = ${apache-2.2:location}/bin/httpd logrotate_binary = ${logrotate:location}/usr/sbin/logrotate openssl_binary = ${openssl:location}/bin/openssl dcrond_binary = ${dcron:location}/sbin/crond diff --git a/software/apache-frontend/software.cfg b/software/apache-frontend/software.cfg index 90df60953ac66f8b889e8196dadca64e940ff92e..7a4ccfe5708335f3205e4c568ba1423b2f26c0e0 100644 --- a/software/apache-frontend/software.cfg +++ b/software/apache-frontend/software.cfg @@ -17,8 +17,8 @@ parts = template binutils gcc-java-minimal - apache - apache-antiloris + apache-2.2 + apache-antiloris-apache-2.2 stunnel varnish-2.1 @@ -50,78 +50,72 @@ eggs = # Default template for apache instance. recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg -md5sum = 17180caef7d1c477fbb037d28b705e8b +md5sum = 74c0f41246d167c020854a212e919ce4 output = ${buildout:directory}/template.cfg mode = 0644 [versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-004 Jinja2 = 2.6 Werkzeug = 0.8.3 buildout-versions = 1.7 hexagonit.recipe.cmmi = 1.5.0 meld3 = 0.6.8 rdiff-backup = 1.0.5 -slapos.recipe.template = 2.2 -slapos.cookbook = 0.40.1 +slapos.cookbook = 0.52 +slapos.recipe.template = 2.3 # Required by: -# slapos.core==0.23 +# slapos.core==0.24 Flask = 0.8 # Required by: -# slapos.cookbook==0.40.1 +# slapos.cookbook==0.52 PyXML = 0.8.4 # Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.40.1 +# slapos.cookbook==0.52 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.40.1 -# slapos.core==0.23 +# slapos.cookbook==0.52 +# slapos.core==0.24 # xml-marshaller==0.9.7 -lxml = 2.3.3 +lxml = 2.3.4 # Required by: -# slapos.cookbook==0.40.1 +# slapos.cookbook==0.52 netaddr = 0.7.6 # Required by: -# slapos.core==0.23 +# slapos.core==0.24 netifaces = 0.8 # Required by: -# slapos.cookbook==0.40.1 -# slapos.core==0.23 +# slapos.cookbook==0.52 +# slapos.core==0.24 # zc.buildout==1.6.0-dev-SlapOS-004 # zc.recipe.egg==1.3.2 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.40.1 -slapos.core = 0.23 +# slapos.cookbook==0.52 +slapos.core = 0.24 # Required by: -# slapos.core==0.23 +# slapos.core==0.24 supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.40.1 +# slapos.cookbook==0.52 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.40.1 +# slapos.cookbook==0.52 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.23 -zope.interface = 3.8.0 +# slapos.core==0.24 +zope.interface = 4.0.0 [networkcache] # Cedric de Saint Martin signature certificate diff --git a/software/cloudooo/software.cfg b/software/cloudooo/software.cfg index c4d60f9fd21041778afdab2b7be17c8f2dee2fca..078909aa8258408447a6ecb1ebceee7b414d1df2 100755 --- a/software/cloudooo/software.cfg +++ b/software/cloudooo/software.cfg @@ -100,3 +100,39 @@ recipe = slapos.recipe.build:download url = ${:_profile_base_location_}/instance-cloudoo.cfg.in md5sum = b41e6607cd619648babac4c99ca87202 mode = 640 + +[networkcache] +# signature certificates of the following uploaders. +# Gabriel Monnerat +# Rafael Monnerat +signature-certificate-list = + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAPHoWu90gbsgMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV + BAMMCXZpZmlibm9kZTAeFw0xMjAzMTkyMzIwNTVaFw0xMzAzMTkyMzIwNTVaMBQx + EjAQBgNVBAMMCXZpZmlibm9kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + ozBijpO8PS5RTeKTzA90vi9ezvv4vVjNaguqT4UwP9+O1+i6yq1Y2W5zZxw/Klbn + oudyNzie3/wqs9VfPmcyU9ajFzBv/Tobm3obmOqBN0GSYs5fyGw+O9G3//6ZEhf0 + NinwdKmrRX+d0P5bHewadZWIvlmOupcnVJmkks852BECAwEAAaNQME4wHQYDVR0O + BBYEFF9EtgfZZs8L2ZxBJxSiY6eTsTEwMB8GA1UdIwQYMBaAFF9EtgfZZs8L2ZxB + JxSiY6eTsTEwMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAc43YTfc6 + baSemaMAc/jz8LNLhRE5dLfLOcRSoHda8y0lOrfe4lHT6yP5l8uyWAzLW+g6s3DA + Yme/bhX0g51BmI6gjKJo5DoPtiXk/Y9lxwD3p7PWi+RhN+AZQ5rpo8UfwnnN059n + yDuimQfvJjBFMVrdn9iP6SfMjxKaGk6gVmI= + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMc2zhpXKIp9qvjL + aedq9ujY5Ys9mqMSF25zgVMg3PzhrZPZ1gObgbU3Ns8Ede7puildGxsr7gQO/F3L + 1PgCFf+bNKIQQF+8o0SphIQGHBb6L9xMlknYzq6qqOKhUszqyrFUAZcSA6Y0AR+B + d5X+nQb+vzPrQk94kr92jmW7BtBPAgMBAAECgYBFzdpiOHAoNuiVzREK2dwysu2b + 4LYytcAoH6kNK9LDeYCM8iOfl/nXOcWmvHVmhdeJbup0luwL2ARuCWJSlMiH7N9X + 7XX1yxRWIUbko8M2MxbSp4cexvVI1A8zNvtwkBldO736FU+//G+GYQ/FKul+1640 + DyRbaRnnfgDhvAAcAQJBAPznTEUX3LcjiB6443kQoPJlx992hH3fV+zDEDV9KwWS + u6LKEGFO6Lp8exZzCtCrwpjwFOYtCOHqNkRiGfL4ys8CQQDJpzkF6KpAHPPoKJ+s + kpibmVJh3gRt105uysNTMLzsSYOR94/AEdUx/676zS5D8OQRHjq9pJCBSMqRdgI9 + fQKBAkAD2enZa4Ga8FmUTjB4mX458r7WclGWMR5/poDKr7tF/HQLCJSzRqZYoKin + MN1LTDJMbeuDjdAC0LQ+2leW0Z8VAkABJDwzZ1zHXiKXVtuIi4/nmZeYzDv0LzrX + b7hpWSZIpCXlhqQ+rxso3EyuSMkRQ2TXH/evKSZURQg4iJV8qZ+BAkEA48lej9PT + cw2o9zohoD3iMeVcM3O0tOnP+gCH//++0yKG5V2m08CFtqR6oQeA9HtQjJ7znrW2 + wmro1zayUIH/+Q== + -----END PRIVATE KEY----- + diff --git a/software/drupal/instance.cfg b/software/drupal/instance.cfg deleted file mode 100644 index 644d6d54dddb77c39d57ec31f9ad10fdb58223b0..0000000000000000000000000000000000000000 --- a/software/drupal/instance.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[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_base_directory = ${mariadb:location} -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/bin/mysqld diff --git a/software/drupal/settings.php.in b/software/drupal/settings.php.in new file mode 100644 index 0000000000000000000000000000000000000000..073f889747cfa666d5dec21b7f0099f64f63eb9b --- /dev/null +++ b/software/drupal/settings.php.in @@ -0,0 +1,519 @@ +<?php + +/** + * @file + * Drupal site-specific configuration file. + * + * IMPORTANT NOTE: + * This file may have been set to read-only by the Drupal installation + * program. If you make changes to this file, be sure to protect it again + * after making your modifications. Failure to remove write permissions + * to this file is a security risk. + * + * The configuration file to be loaded is based upon the rules below. + * + * The configuration directory will be discovered by stripping the + * website's hostname from left to right and pathname from right to + * left. The first configuration file found will be used and any + * others will be ignored. If no other configuration file is found + * then the default configuration file at 'sites/default' will be used. + * + * For example, for a fictitious site installed at + * http://www.drupal.org/mysite/test/, the 'settings.php' + * is searched in the following directories: + * + * - sites/www.drupal.org.mysite.test + * - sites/drupal.org.mysite.test + * - sites/org.mysite.test + * + * - sites/www.drupal.org.mysite + * - sites/drupal.org.mysite + * - sites/org.mysite + * + * - sites/www.drupal.org + * - sites/drupal.org + * - sites/org + * + * - sites/default + * + * If you are installing on a non-standard port number, prefix the + * hostname with that number. For example, + * http://www.drupal.org:8080/mysite/test/ could be loaded from + * sites/8080.www.drupal.org.mysite.test/. + */ + +/** + * Database settings: + * + * The $databases array specifies the database connection or + * connections that Drupal may use. Drupal is able to connect + * to multiple databases, including multiple types of databases, + * during the same request. + * + * Each database connection is specified as an array of settings, + * similar to the following: + * @code + * array( + * 'driver' => 'mysql', + * 'database' => 'databasename', + * 'username' => 'username', + * 'password' => 'password', + * 'host' => 'localhost', + * 'port' => 3306, + * 'prefix' => 'myprefix_', + * 'collation' => 'utf8_general_ci', + * ); + * @endcode + * + * The "driver" property indicates what Drupal database driver the + * connection should use. This is usually the same as the name of the + * database type, such as mysql or sqlite, but not always. The other + * properties will vary depending on the driver. For SQLite, you must + * specify a database file name in a directory that is writable by the + * webserver. For most other drivers, you must specify a + * username, password, host, and database name. + * + * Some database engines support transactions. In order to enable + * transaction support for a given database, set the 'transactions' key + * to TRUE. To disable it, set it to FALSE. Note that the default value + * varies by driver. For MySQL, the default is FALSE since MyISAM tables + * do not support transactions. + * + * For each database, you may optionally specify multiple "target" databases. + * A target database allows Drupal to try to send certain queries to a + * different database if it can but fall back to the default connection if not. + * That is useful for master/slave replication, as Drupal may try to connect + * to a slave server when appropriate and if one is not available will simply + * fall back to the single master server. + * + * The general format for the $databases array is as follows: + * @code + * $databases['default']['default'] = $info_array; + * $databases['default']['slave'][] = $info_array; + * $databases['default']['slave'][] = $info_array; + * $databases['extra']['default'] = $info_array; + * @endcode + * + * In the above example, $info_array is an array of settings described above. + * The first line sets a "default" database that has one master database + * (the second level default). The second and third lines create an array + * of potential slave databases. Drupal will select one at random for a given + * request as needed. The fourth line creates a new database with a name of + * "extra". + * + * For a single database configuration, the following is sufficient: + * @code + * $databases['default']['default'] = array( + * 'driver' => 'mysql', + * 'database' => 'databasename', + * 'username' => 'username', + * 'password' => 'password', + * 'host' => 'localhost', + * 'prefix' => 'main_', + * 'collation' => 'utf8_general_ci', + * ); + * @endcode + * + * You can optionally set prefixes for some or all database table names + * by using the 'prefix' setting. If a prefix is specified, the table + * name will be prepended with its value. Be sure to use valid database + * characters only, usually alphanumeric and underscore. If no prefixes + * are desired, leave it as an empty string ''. + * + * To have all database names prefixed, set 'prefix' as a string: + * @code + * 'prefix' => 'main_', + * @endcode + * To provide prefixes for specific tables, set 'prefix' as an array. + * The array's keys are the table names and the values are the prefixes. + * The 'default' element is mandatory and holds the prefix for any tables + * not specified elsewhere in the array. Example: + * @code + * 'prefix' => array( + * 'default' => 'main_', + * 'users' => 'shared_', + * 'sessions' => 'shared_', + * 'role' => 'shared_', + * 'authmap' => 'shared_', + * ), + * @endcode + * You can also use a reference to a schema/database as a prefix. This maybe + * useful if your Drupal installation exists in a schema that is not the default + * or you want to access several databases from the same code base at the same + * time. + * Example: + * @code + * 'prefix' => array( + * 'default' => 'main.', + * 'users' => 'shared.', + * 'sessions' => 'shared.', + * 'role' => 'shared.', + * 'authmap' => 'shared.', + * ); + * @endcode + * NOTE: MySQL and SQLite's definition of a schema is a database. + * + * Advanced users can add or override initial commands to execute when + * connecting to the database server, as well as PDO connection settings. For + * example, to enable MySQL SELECT queries to exceed the max_join_size system + * variable, and to reduce the database connection timeout to 5 seconds: + * + * @code + * $databases['default']['default'] = array( + * 'init_commands' => array( + * 'big_selects' => 'SET SQL_BIG_SELECTS=1', + * ), + * 'pdo' => array( + * PDO::ATTR_TIMEOUT => 5, + * ), + * ); + * @endcode + * + * WARNING: These defaults are designed for database portability. Changing them + * may cause unexpected behavior, including potential data loss. + * + * @see DatabaseConnection_mysql::__construct + * @see DatabaseConnection_pgsql::__construct + * @see DatabaseConnection_sqlite::__construct + * + * Database configuration format: + * @code + * $databases['default']['default'] = array( + * 'driver' => 'mysql', + * 'database' => 'databasename', + * 'username' => 'username', + * 'password' => 'password', + * 'host' => 'localhost', + * 'prefix' => '', + * ); + * $databases['default']['default'] = array( + * 'driver' => 'pgsql', + * 'database' => 'databasename', + * 'username' => 'username', + * 'password' => 'password', + * 'host' => 'localhost', + * 'prefix' => '', + * ); + * $databases['default']['default'] = array( + * 'driver' => 'sqlite', + * 'database' => '/path/to/databasefilename', + * ); + * @endcode + */ +$databases['default']['default'] = array( + 'driver' => 'mysql', + 'database' => '%(mysql_database)s', + 'username' => '%(mysql_user)s', + 'password' => '%(mysql_password)s', + 'host' => '%(mysql_host)s', + 'prefix' => '', +); + +/** + * Access control for update.php script. + * + * If you are updating your Drupal installation using the update.php script but + * are not logged in using either an account with the "Administer software + * updates" permission or the site maintenance account (the account that was + * created during installation), you will need to modify the access check + * statement below. Change the FALSE to a TRUE to disable the access check. + * After finishing the upgrade, be sure to open this file again and change the + * TRUE back to a FALSE! + */ +$update_free_access = FALSE; + +/** + * Salt for one-time login links and cancel links, form tokens, etc. + * + * This variable will be set to a random value by the installer. All one-time + * login links will be invalidated if the value is changed. Note that if your + * site is deployed on a cluster of web servers, you must ensure that this + * variable has the same value on each server. If this variable is empty, a hash + * of the serialized database credentials will be used as a fallback salt. + * + * For enhanced security, you may set this variable to a value using the + * contents of a file outside your docroot that is never saved together + * with any backups of your Drupal files and database. + * + * Example: + * $drupal_hash_salt = file_get_contents('/home/example/salt.txt'); + * + */ +$drupal_hash_salt = ''; + +/** + * Base URL (optional). + * + * If Drupal is generating incorrect URLs on your site, which could + * be in HTML headers (links to CSS and JS files) or visible links on pages + * (such as in menus), uncomment the Base URL statement below (remove the + * leading hash sign) and fill in the absolute URL to your Drupal installation. + * + * You might also want to force users to use a given domain. + * See the .htaccess file for more information. + * + * Examples: + * $base_url = 'http://www.example.com'; + * $base_url = 'http://www.example.com:8888'; + * $base_url = 'http://www.example.com/drupal'; + * $base_url = 'https://www.example.com:8888/drupal'; + * + * It is not allowed to have a trailing slash; Drupal will add it + * for you. + */ +# $base_url = 'http://www.example.com'; // NO trailing slash! + +/** + * PHP settings: + * + * To see what PHP settings are possible, including whether they can be set at + * runtime (by using ini_set()), read the PHP documentation: + * http://www.php.net/manual/en/ini.list.php + * See drupal_initialize_variables() in includes/bootstrap.inc for required + * runtime settings and the .htaccess file for non-runtime settings. Settings + * defined there should not be duplicated here so as to avoid conflict issues. + */ + +/** + * Some distributions of Linux (most notably Debian) ship their PHP + * installations with garbage collection (gc) disabled. Since Drupal depends on + * PHP's garbage collection for clearing sessions, ensure that garbage + * collection occurs by using the most common settings. + */ +ini_set('session.gc_probability', 1); +ini_set('session.gc_divisor', 100); + +/** + * Set session lifetime (in seconds), i.e. the time from the user's last visit + * to the active session may be deleted by the session garbage collector. When + * a session is deleted, authenticated users are logged out, and the contents + * of the user's $_SESSION variable is discarded. + */ +ini_set('session.gc_maxlifetime', 200000); + +/** + * Set session cookie lifetime (in seconds), i.e. the time from the session is + * created to the cookie expires, i.e. when the browser is expected to discard + * the cookie. The value 0 means "until the browser is closed". + */ +ini_set('session.cookie_lifetime', 2000000); + +/** + * If you encounter a situation where users post a large amount of text, and + * the result is stripped out upon viewing but can still be edited, Drupal's + * output filter may not have sufficient memory to process it. If you + * experience this issue, you may wish to uncomment the following two lines + * and increase the limits of these variables. For more information, see + * http://php.net/manual/en/pcre.configuration.php. + */ +# ini_set('pcre.backtrack_limit', 200000); +# ini_set('pcre.recursion_limit', 200000); + +/** + * Drupal automatically generates a unique session cookie name for each site + * based on its full domain name. If you have multiple domains pointing at the + * same Drupal site, you can either redirect them all to a single domain (see + * comment in .htaccess), or uncomment the line below and specify their shared + * base domain. Doing so assures that users remain logged in as they cross + * between your various domains. Make sure to always start the $cookie_domain + * with a leading dot, as per RFC 2109. + */ +# $cookie_domain = '.example.com'; + +/** + * Variable overrides: + * + * To override specific entries in the 'variable' table for this site, + * set them here. You usually don't need to use this feature. This is + * useful in a configuration file for a vhost or directory, rather than + * the default settings.php. Any configuration setting from the 'variable' + * table can be given a new value. Note that any values you provide in + * these variable overrides will not be modifiable from the Drupal + * administration interface. + * + * The following overrides are examples: + * - site_name: Defines the site's name. + * - theme_default: Defines the default theme for this site. + * - anonymous: Defines the human-readable name of anonymous users. + * Remove the leading hash signs to enable. + */ +# $conf['site_name'] = 'My Drupal site'; +# $conf['theme_default'] = 'garland'; +# $conf['anonymous'] = 'Visitor'; + +/** + * A custom theme can be set for the offline page. This applies when the site + * is explicitly set to maintenance mode through the administration page or when + * the database is inactive due to an error. It can be set through the + * 'maintenance_theme' key. The template file should also be copied into the + * theme. It is located inside 'modules/system/maintenance-page.tpl.php'. + * Note: This setting does not apply to installation and update pages. + */ +# $conf['maintenance_theme'] = 'bartik'; + +/** + * Reverse Proxy Configuration: + * + * Reverse proxy servers are often used to enhance the performance + * of heavily visited sites and may also provide other site caching, + * security, or encryption benefits. In an environment where Drupal + * is behind a reverse proxy, the real IP address of the client should + * be determined such that the correct client IP address is available + * to Drupal's logging, statistics, and access management systems. In + * the most simple scenario, the proxy server will add an + * X-Forwarded-For header to the request that contains the client IP + * address. However, HTTP headers are vulnerable to spoofing, where a + * malicious client could bypass restrictions by setting the + * X-Forwarded-For header directly. Therefore, Drupal's proxy + * configuration requires the IP addresses of all remote proxies to be + * specified in $conf['reverse_proxy_addresses'] to work correctly. + * + * Enable this setting to get Drupal to determine the client IP from + * the X-Forwarded-For header (or $conf['reverse_proxy_header'] if set). + * If you are unsure about this setting, do not have a reverse proxy, + * or Drupal operates in a shared hosting environment, this setting + * should remain commented out. + * + * In order for this setting to be used you must specify every possible + * reverse proxy IP address in $conf['reverse_proxy_addresses']. + * If a complete list of reverse proxies is not available in your + * environment (for example, if you use a CDN) you may set the + * $_SERVER['REMOTE_ADDR'] variable directly in settings.php. + * Be aware, however, that it is likely that this would allow IP + * address spoofing unless more advanced precautions are taken. + */ +# $conf['reverse_proxy'] = TRUE; + +/** + * Specify every reverse proxy IP address in your environment. + * This setting is required if $conf['reverse_proxy'] is TRUE. + */ +# $conf['reverse_proxy_addresses'] = array('a.b.c.d', ...); + +/** + * Set this value if your proxy server sends the client IP in a header + * other than X-Forwarded-For. + */ +# $conf['reverse_proxy_header'] = 'HTTP_X_CLUSTER_CLIENT_IP'; + +/** + * Page caching: + * + * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page + * views. This tells a HTTP proxy that it may return a page from its local + * cache without contacting the web server, if the user sends the same Cookie + * header as the user who originally requested the cached page. Without "Vary: + * Cookie", authenticated users would also be served the anonymous page from + * the cache. If the site has mostly anonymous users except a few known + * editors/administrators, the Vary header can be omitted. This allows for + * better caching in HTTP proxies (including reverse proxies), i.e. even if + * clients send different cookies, they still get content served from the cache. + * However, authenticated users should access the site directly (i.e. not use an + * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid + * getting cached pages from the proxy. + */ +# $conf['omit_vary_cookie'] = TRUE; + +/** + * CSS/JS aggregated file gzip compression: + * + * By default, when CSS or JS aggregation and clean URLs are enabled Drupal will + * store a gzip compressed (.gz) copy of the aggregated files. If this file is + * available then rewrite rules in the default .htaccess file will serve these + * files to browsers that accept gzip encoded content. This allows pages to load + * faster for these users and has minimal impact on server load. If you are + * using a webserver other than Apache httpd, or a caching reverse proxy that is + * configured to cache and compress these files itself you may want to uncomment + * one or both of the below lines, which will prevent gzip files being stored. + */ +# $conf['css_gzip_compression'] = FALSE; +# $conf['js_gzip_compression'] = FALSE; + +/** + * String overrides: + * + * To override specific strings on your site with or without enabling locale + * module, add an entry to this list. This functionality allows you to change + * a small number of your site's default English language interface strings. + * + * Remove the leading hash signs to enable. + */ +# $conf['locale_custom_strings_en'][''] = array( +# 'forum' => 'Discussion board', +# '@count min' => '@count minutes', +# ); + +/** + * + * IP blocking: + * + * To bypass database queries for denied IP addresses, use this setting. + * Drupal queries the {blocked_ips} table by default on every page request + * for both authenticated and anonymous users. This allows the system to + * block IP addresses from within the administrative interface and before any + * modules are loaded. However on high traffic websites you may want to avoid + * this query, allowing you to bypass database access altogether for anonymous + * users under certain caching configurations. + * + * If using this setting, you will need to add back any IP addresses which + * you may have blocked via the administrative interface. Each element of this + * array represents a blocked IP address. Uncommenting the array and leaving it + * empty will have the effect of disabling IP blocking on your site. + * + * Remove the leading hash signs to enable. + */ +# $conf['blocked_ips'] = array( +# 'a.b.c.d', +# ); + +/** + * Fast 404 pages: + * + * Drupal can generate fully themed 404 pages. However, some of these responses + * are for images or other resource files that are not displayed to the user. + * This can waste bandwidth, and also generate server load. + * + * The options below return a simple, fast 404 page for URLs matching a + * specific pattern: + * - 404_fast_paths_exclude: A regular expression to match paths to exclude, + * such as images generated by image styles, or dynamically-resized images. + * If you need to add more paths, you can add '|path' to the expression. + * - 404_fast_paths: A regular expression to match paths that should return a + * simple 404 page, rather than the fully themed 404 page. If you don't have + * any aliases ending in htm or html you can add '|s?html?' to the expression. + * - 404_fast_html: The html to return for simple 404 pages. + * + * Add leading hash signs if you would like to disable this functionality. + */ +$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//'; +$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +$conf['404_fast_html'] = '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>'; + +/** + * By default, fast 404s are returned as part of the normal page request + * process, which will properly serve valid pages that happen to match and will + * also log actual 404s to the Drupal log. Alternatively you can choose to + * return a 404 now by uncommenting the following line. This will reduce server + * load, but will cause even valid pages that happen to match the pattern to + * return 404s, rather than the actual page. It will also prevent the Drupal + * system log entry. Ensure you understand the effects of this before enabling. + * + * To enable this functionality, remove the leading hash sign below. + */ +# drupal_fast_404(); + +/** + * Authorized file system operations: + * + * The Update manager module included with Drupal provides a mechanism for + * site administrators to securely install missing updates for the site + * directly through the web user interface by providing either SSH or FTP + * credentials. This allows the site to update the new files as the user who + * owns all the Drupal files, instead of as the user the webserver is running + * as. However, some sites might wish to disable this functionality, and only + * update the code directly via SSH or FTP themselves. This setting completely + * disables all functionality related to these authorized file operations. + * + * Remove the leading hash signs to disable. + */ +# $conf['allow_authorize_operations'] = FALSE; diff --git a/software/drupal/software.cfg b/software/drupal/software.cfg index 7c48e25aa084f6e5bc3366a8a54f60474f30fbdc..ed9c81d0e8da00ae0049ec667ebdd3a8da00dafd 100644 --- a/software/drupal/software.cfg +++ b/software/drupal/software.cfg @@ -1,129 +1,21 @@ [buildout] -versions = versions -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg + ../../stack/lamp/buildout.cfg [application] recipe = slapos.recipe.build:download-unpacked -url = http://ftp.drupal.org/files/projects/drupal-7.8.tar.gz -md5sum = e0226b56e8d5c57c6b126e8ed5866b1f - -[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 +url = http://ftp.drupal.org/files/projects/drupal-7.14.tar.gz +md5sum = af7abd95c03ecad4e1567ed94a438334 + +[application-template] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/settings.php.in +md5sum = add9e4e96094a9d3fb7cf0f4d26ae544 +download-only = True +filename = template.in mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} -[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.0 - -# 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 +[application-configuration] +location = sites/default/default.settings.php diff --git a/software/erp5/instance-erp5-production.cfg.in b/software/erp5/instance-erp5-production.cfg.in index f6f29c3b2a74775be5b200be4ee81b023309935f..35213794a4b17e370512776a9083877a34599d2e 100644 --- a/software/erp5/instance-erp5-production.cfg.in +++ b/software/erp5/instance-erp5-production.cfg.in @@ -6,11 +6,6 @@ [buildout] parts = - request-mariadb - request-sphinx - request-cloudooo - request-memcached - request-kumofs request-tidstorage basedirectory @@ -66,7 +61,17 @@ sla-computer_guid = ${slap-parameter:kumofs-computer-guid} <=request-common name = TidStorage return = url-login -config = json mysql-url memcached-url cloudooo-url kumofs-url sphinx-url-sphinx sphinx-url-sphinx-sql smtp-url bt5 bt5-repository-url +config = + json + mysql-url + memcached-url + cloudooo-url + kumofs-url + sphinx-url-sphinx + sphinx-url-sphinx-sql + smtp-url + bt5 + bt5-repository-url config-json = ${slap-parameter:json} config-mysql-url = ${request-mariadb:connection-url} config-memcached-url = ${request-memcached:connection-url} @@ -108,11 +113,6 @@ bt5 = erp5_full_text_myisam_catalog bt5-repository-url = {{ local_bt5_repository }} smtp-url = smtp://localhost:25/ -# rest of parts are candidates for some generic stuff [basedirectory] recipe = slapos.cookbook:mkdirectory -services = ${rootdirectory:etc}/run - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = ${buildout:directory}/etc +etc = ${buildout:directory}/etc/run diff --git a/software/erp5/instance-tidstorage.cfg.in b/software/erp5/instance-tidstorage.cfg.in index 5d25777c4550fb0fd897645e22110dfb75ad1c66..e3572480baaaa6647252f3c406cadd031e6cf364 100644 --- a/software/erp5/instance-tidstorage.cfg.in +++ b/software/erp5/instance-tidstorage.cfg.in @@ -336,7 +336,7 @@ recipe = slapos.cookbook:pwgen.stable [zope-conf-parameter-base] ip = {{ ipv4 }} site-id = {{ site_id }} -zodb-list = {{ json_module.dumps(zodb_connection_list) }} +zodb-list = {{ dumps(zodb_connection_list) }} [zope-conf-base] recipe = slapos.recipe.template:jinja2 @@ -347,7 +347,6 @@ context = key instance_products directory:instance-products raw deadlock_path /manage_debug_threads key deadlock_debugger_password deadlock-debugger-password:password - import json_module json key tidstorage_ip tidstorage:ip key tidstorage_port tidstorage:port key promise_path erp5-promise:promise-path diff --git a/software/erp5/software.cfg b/software/erp5/software.cfg index ee065d9502e24afdaa4a8ff745a90c8240540391..71d14fbd653e87405488bb5d3deb86e588234772 100644 --- a/software/erp5/software.cfg +++ b/software/erp5/software.cfg @@ -111,7 +111,7 @@ extra-context = [template-tidstorage] recipe = slapos.recipe.build:download url = ${:_profile_base_location_}/instance-tidstorage.cfg.in -md5sum = 5c52385b4f12fd9719975655bc2eddec +md5sum = 520e39f2612a045b42c0ad914bfdc5a9 mode = 640 [template-cloudooo] @@ -126,7 +126,7 @@ configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catal [template-zope-conf] recipe = slapos.recipe.build:download url = ${:_profile_base_location_}/zope.conf.in -md5sum = ec4203f1f54b05505d8f35cb5799a75c +md5sum = 599e004c18fd3461aa846ae75bd112f2 mode = 640 [template] @@ -140,6 +140,7 @@ extra-context = key aspell_location aspell:location key buildout_bin_directory buildout:bin-directory key coreutils_location coreutils:location + key dash_location dash:location key dcron_location dcron:location key dmtx_utils_location dmtx-utils:location key erp5_location erp5:location @@ -153,7 +154,6 @@ extra-context = key gzip_location gzip:location key haproxy_location haproxy:location key imagemagick_location imagemagick:location - key librsvg_location librsvg:location key libICE_location libICE:location key libSM_location libSM:location key libX11_location libX11:location @@ -163,6 +163,7 @@ extra-context = key libXrender_location libXrender:location key libpng12_location libpng12:location key libreoffice_bin_location libreoffice-bin:location + key librsvg_location librsvg:location key libxcb_location libxcb:location key logrotate_location logrotate:location key mariadb_location mariadb:location @@ -170,23 +171,22 @@ extra-context = key pdftk_location pdftk:location key poppler_location poppler:location key sed_location sed:location + key template_cloudooo template-cloudooo:target key template_erp5_development template-erp5-development:target key template_erp5_production template-erp5-production:rendered key template_kumofs template-kumofs:rendered key template_mariadb template-mariadb:rendered key template_memcached template-memcached:rendered - key template_cloudooo template-cloudooo:target key template_sphinx template-sphinx:rendered key template_tidstorage template-tidstorage:target key template_varnish template-varnish:target key template_zope template-zope:target key template_zope_conf template-zope-conf:target key tesseract_location tesseract:location - key w3m_location w3m:location - key zlib_location zlib:location - key dash_location dash:location key varnish_location varnish-3.0:location + key w3m_location w3m:location key wget_location wget:location + key zlib_location zlib:location [template-memcached] < = template-jinja2-base @@ -205,7 +205,7 @@ mode = 640 [template-erp5-production] < = template-jinja2-base filename = instance-erp5-production.cfg -md5sum = 1b458ff6a9b82f24f29f71b58f559186 +md5sum = 3051f3fea39d7409c417dcac26027b56 extra-context = key local_bt5_repository local-bt5-repository:list @@ -224,6 +224,7 @@ mode = 640 # Cedric de Saint Martin # Yingjie Xu # Gabriel Monnerat +# Rafael Monnerat signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE @@ -303,3 +304,19 @@ signature-certificate-list = Yme/bhX0g51BmI6gjKJo5DoPtiXk/Y9lxwD3p7PWi+RhN+AZQ5rpo8UfwnnN059n yDuimQfvJjBFMVrdn9iP6SfMjxKaGk6gVmI= -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMc2zhpXKIp9qvjL + aedq9ujY5Ys9mqMSF25zgVMg3PzhrZPZ1gObgbU3Ns8Ede7puildGxsr7gQO/F3L + 1PgCFf+bNKIQQF+8o0SphIQGHBb6L9xMlknYzq6qqOKhUszqyrFUAZcSA6Y0AR+B + d5X+nQb+vzPrQk94kr92jmW7BtBPAgMBAAECgYBFzdpiOHAoNuiVzREK2dwysu2b + 4LYytcAoH6kNK9LDeYCM8iOfl/nXOcWmvHVmhdeJbup0luwL2ARuCWJSlMiH7N9X + 7XX1yxRWIUbko8M2MxbSp4cexvVI1A8zNvtwkBldO736FU+//G+GYQ/FKul+1640 + DyRbaRnnfgDhvAAcAQJBAPznTEUX3LcjiB6443kQoPJlx992hH3fV+zDEDV9KwWS + u6LKEGFO6Lp8exZzCtCrwpjwFOYtCOHqNkRiGfL4ys8CQQDJpzkF6KpAHPPoKJ+s + kpibmVJh3gRt105uysNTMLzsSYOR94/AEdUx/676zS5D8OQRHjq9pJCBSMqRdgI9 + fQKBAkAD2enZa4Ga8FmUTjB4mX458r7WclGWMR5/poDKr7tF/HQLCJSzRqZYoKin + MN1LTDJMbeuDjdAC0LQ+2leW0Z8VAkABJDwzZ1zHXiKXVtuIi4/nmZeYzDv0LzrX + b7hpWSZIpCXlhqQ+rxso3EyuSMkRQ2TXH/evKSZURQg4iJV8qZ+BAkEA48lej9PT + cw2o9zohoD3iMeVcM3O0tOnP+gCH//++0yKG5V2m08CFtqR6oQeA9HtQjJ7znrW2 + wmro1zayUIH/+Q== + -----END PRIVATE KEY----- diff --git a/software/erp5/zope.conf.in b/software/erp5/zope.conf.in index 2fa95981e72e121dd4bfa424f343eed60fbd38df..af01a8bca7e69abbca0632d6b33ce38666e6c9e1 100644 --- a/software/erp5/zope.conf.in +++ b/software/erp5/zope.conf.in @@ -80,7 +80,7 @@ products {{ instance_products }} container-class Products.TemporaryFolder.TemporaryContainer </zodb_db> -{% for db_name, mount_point, cache_size, storage_type, storage_dict in json_module.loads(parameter_dict['zodb-list']) -%} +{% for db_name, mount_point, cache_size, storage_type, storage_dict in parameter_dict['zodb-list'] -%} <zodb_db {{ db_name }}> {%- if cache_size %} cache-size {{ cache_size }} diff --git a/software/kvm/instance-frontend.cfg b/software/kvm/instance-frontend.cfg index 277674c850734d60e80fecbc604b724bf59aa44b..230d361fca1a488097ec627348ece090be880fa7 100644 --- a/software/kvm/instance-frontend.cfg +++ b/software/kvm/instance-frontend.cfg @@ -12,7 +12,6 @@ parts = ca-frontend certificate-authority frontend-promise - publish-kvm-frontend-connection-information eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} @@ -48,7 +47,7 @@ logrotate-entries = $${rootdirectory:etc}/logrotate.d recipe = slapos.cookbook:kvm.frontend domain = $${ca-frontend:name} # port = $${slap-parameter:port} -ip = $${slap-network-information:global-ipv6} +ip = $${slap-network-information:local-ipv4} port = $${slap-parameter:port} http-redirection = $${slap-parameter:http-redirection} ssl-key-path = $${ca-frontend:key-file} @@ -130,11 +129,6 @@ logrotate-entries = $${directory:logrotate-entries} backup = $${directory:logrotate-backup} state-file = $${rootdirectory:srv}/logrotate.status -[publish-kvm-frontend-connection-information] -recipe = slapos.cookbook:publish -ip = $${frontend-instance:ip} -port = $${frontend-instance:port} - [slap-parameter] # Default value if no port is specified port = 4443 diff --git a/software/kvm/instance-kvm.cfg b/software/kvm/instance-kvm.cfg index bfd9715ba9cbaecca2f66a5bf87a8e699daa6ea8..d9f9bc0896473c0a01df4fd168abb816cadb5e65 100644 --- a/software/kvm/instance-kvm.cfg +++ b/software/kvm/instance-kvm.cfg @@ -5,11 +5,13 @@ ############################# [buildout] parts = - request-slave-frontend certificate-authority + publish-kvm-backend-connection-information + publish-kvm-frontend-connection-information kvm-promise + websockify-sighandler novnc-promise - publish-kvm-connection-information + frontend-promise eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} @@ -32,6 +34,12 @@ ca-dir = $${rootdirectory:srv}/ssl [create-mac] recipe = slapos.cookbook:generate.mac +storage-path = $${rootdirectory:srv}/mac + +[gen-passwd] +recipe = slapos.cookbook:generate.password +storage-path = $${rootdirectory:srv}/passwd +bytes = 4 [kvm-instance] recipe = slapos.cookbook:kvm @@ -52,6 +60,7 @@ controller-path = $${basedirectory:services}/kvm_controller shell-path = ${dash:location}/bin/dash qemu-path = ${kvm:location}/bin/qemu-system-x86_64 qemu-img-path = ${kvm:location}/bin/qemu-img +passwd = $${gen-passwd:passwd} [kvm-promise] recipe = slapos.cookbook:check_port_listening @@ -59,6 +68,7 @@ path = $${basedirectory:promises}/vnc_promise hostname = $${kvm-instance:vnc-ip} port = $${kvm-instance:vnc-port} + [novnc-instance] recipe = slapos.cookbook:novnc path = $${ca-novnc:executable} @@ -71,6 +81,11 @@ websockify-path = ${buildout:directory}/bin/websockify ssl-key-path = $${ca-novnc:key-file} ssl-cert-path = $${ca-novnc:cert-file} +[websockify-sighandler] +recipe = slapos.cookbook:signalwrapper +wrapper-path = $${basedirectory:services}/websockify +wrapped-path = $${novnc-instance:path} + [certificate-authority] recipe = slapos.cookbook:certificate_authority openssl-binary = ${openssl:location}/bin/openssl @@ -96,7 +111,7 @@ recipe = slapos.cookbook:certificate_authority.request key-file = $${basedirectory:novnc-conf}/novnc.key cert-file = $${basedirectory:novnc-conf}/novnc.crt executable = $${rootdirectory:bin}/novnc -wrapper = $${basedirectory:services}/websockify +wrapper = $${rootdirectory:bin}/websockify [novnc-promise] recipe = slapos.cookbook:check_port_listening @@ -104,33 +119,42 @@ path = $${basedirectory:promises}/novnc_promise hostname = $${novnc-instance:ip} port = $${novnc-instance:port} + [kvm-monitor] recipe = slapos.cookbook:generic.slapmonitor db-path = $${rootdirectory:srv}/slapmonitor_database -[request-common] + +[request-slave-frontend] recipe = slapos.cookbook:request -software-url = $${slap-connection:software-release-url} -sla = computer_guid -sla-computer_guid = $${slap-connection:computer-id} +software-url = $${slap-parameter:frontend-software-url} server-url = $${slap-connection:server-url} key-file = $${slap-connection:key-file} cert-file = $${slap-connection:cert-file} computer-id = $${slap-connection:computer-id} partition-id = $${slap-connection:partition-id} - -[request-slave-frontend] -<=request-common name = SlaveFrontend -software-type = frontend +software-type = $${slap-parameter:frontend-software-type} slave = true config = host port config-host = $${novnc-instance:ip} config-port = $${novnc-instance:port} return = url resource port domainname +sla = instance_guid +sla-instance_guid = $${slap-parameter:frontend-instance-guid} -[publish-kvm-connection-information] +[publish-kvm-backend-connection-information] recipe = slapos.cookbook:publish backend_url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1 -url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource} password = $${kvm-instance:passwd} + +[publish-kvm-frontend-connection-information] +<= publish-kvm-backend-connection-information +url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource} + +[frontend-promise] +recipe = slapos.cookbook:check_url_available +path = $${basedirectory:promises}/frontend_promise +url = $${publish-kvm-frontend-connection-information:url} +dash_path = ${dash:location}/bin/dash +curl_path = ${curl:location}/bin/curl diff --git a/software/kvm/instance-nbd.cfg b/software/kvm/instance-nbd.cfg index 9df5cfcf508fd4dab3bb10e32eadbc041979c748..af8a61aadee240a98edff83b6d8e5a780e34a992 100644 --- a/software/kvm/instance-nbd.cfg +++ b/software/kvm/instance-nbd.cfg @@ -40,8 +40,13 @@ path = $${basedirectory:promises}/nbd_promise hostname = $${nbd-instance:ip} port = $${nbd-instance:port} +[gen-passwd] +recipe = slapos.cookbook:generate.password +storage-path = $${rootdirectory:srv}/passwd +bytes = 24 + [onetimeupload-instance] -recipe = slapos.cookbook:generic.onetimeupload +recipe = slapos.cookbook:onetimeupload ip = $${slap-network-information:global-ipv6} port = 9999 image-path = $${rootdirectory:srv}/cdrom.iso @@ -49,6 +54,7 @@ log-path = $${rootdirectory:log}/onetimeupload.log shell-path = ${dash:location}/bin/dash onetimeupload-path = ${buildout:bin-directory}/onetimeupload path = $${basedirectory:services}/onetimeupload +key = $${gen-passwd:passwd} [onetimeupload-promise] recipe = slapos.cookbook:check_port_listening diff --git a/software/kvm/software.cfg b/software/kvm/software.cfg index 5100d46b330b8ffff16631e5af90e1494637068a..d1abf701f489d26283a934d8d7b6a92a6fa84712 100644 --- a/software/kvm/software.cfg +++ b/software/kvm/software.cfg @@ -14,6 +14,7 @@ extends = ../../component/openssl/buildout.cfg ../../component/dash/buildout.cfg ../../component/lxml-python/buildout.cfg + ../../component/curl/buildout.cfg ../../stack/nodejs.cfg develop = @@ -104,14 +105,14 @@ eggs = # https://github.com/nodejitsu/node-http-proxy recipe = slapos.recipe.build:download-unpacked #XXX-Cedric : use upstream when merged -url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/master +url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/20120621 md5sum = 20204d0b29c2cef26e1c91e99eedca6b [proxy-by-url] # https://github.com/dominictarr/proxy-by-url recipe = slapos.recipe.build:download-unpacked #XXX-Cedric : use upstream when merged -url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/master +url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/20120621 md5sum = c2609948aa708581f93b981b23880314 [npm-modules] @@ -132,7 +133,7 @@ command = [template-kvm] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-kvm.cfg -md5sum = b6572c018e44d4676e76805116bcade0 +md5sum = c0f24f40e3c55a30fb584c40e81956da output = ${buildout:directory}/template-kvm.cfg mode = 0644 @@ -146,14 +147,14 @@ mode = 0644 [template-nbd] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-nbd.cfg -md5sum = 7691fadfc8d4392c58ac1bf0ebd5aaf2 +md5sum = 692b3da84473fbc962bea9b371b5355b output = ${buildout:directory}/template-nbd.cfg mode = 0644 [template-frontend] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-frontend.cfg -md5sum = 123bf4e5bea9e86c03b62e9afb8ca04b +md5sum = 73359b52013b1b65f75005e8698ed180 output = ${buildout:directory}/template-frontend.cfg mode = 0644 @@ -199,53 +200,53 @@ signature-certificate-list = [versions] Jinja2 = 2.6 Werkzeug = 0.8.3 -apache-libcloud = 0.8.0 +apache-libcloud = 0.9.1 async = 0.6.1 buildout-versions = 1.7 gitdb = 0.5.4 hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3.3 +lxml = 2.3.4 meld3 = 0.6.8 plone.recipe.command = 1.1 pycrypto = 2.5 -slapos.cookbook = 0.41 +slapos.cookbook = 0.57 slapos.recipe.build = 0.7 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.18 +slapos.recipe.template = 2.3 +slapos.toolbox = 0.24 smmap = 0.8.2 z3c.recipe.scripts = 1.0.1 # Required by: -# slapos.core==0.23 -# slapos.toolbox==0.18 +# slapos.core==0.24 +# slapos.toolbox==0.24 Flask = 0.8 # Required by: -# slapos.toolbox==0.18 +# slapos.toolbox==0.24 GitPython = 0.3.2.RC1 # Required by: -# slapos.cookbook==0.41 +# slapos.cookbook==0.57 PyXML = 0.8.4 # Required by: -# slapos.toolbox==0.18 +# slapos.toolbox==0.24 atomize = 0.1.1 # Required by: -# slapos.toolbox==0.18 +# slapos.toolbox==0.24 feedparser = 5.1.1 # Required by: -# slapos.cookbook==0.41 +# slapos.cookbook==0.57 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.41 +# slapos.cookbook==0.57 netaddr = 0.7.6 # Required by: -# slapos.core==0.23 +# slapos.core==0.24 netifaces = 0.8 # Required by: @@ -253,37 +254,39 @@ netifaces = 0.8 numpy = 1.6.1 # Required by: -# slapos.toolbox==0.18 +# slapos.toolbox==0.24 paramiko = 1.7.7.1 # Required by: -# slapos.toolbox==0.18 +# slapos.toolbox==0.24 psutil = 0.4.1 # Required by: -# slapos.cookbook==0.41 -# slapos.core==0.23 -# slapos.toolbox==0.18 +# slapos.cookbook==0.57 +# slapos.core==0.24 +# slapos.toolbox==0.24 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.41 -# slapos.toolbox==0.18 -slapos.core = 0.23 +# slapos.cookbook==0.57 +# slapos.toolbox==0.24 +slapos.core = 0.24 # Required by: -# slapos.core==0.23 +# slapos.core==0.24 supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.41 -# slapos.toolbox==0.18 +# slapos.cookbook==0.57 +# slapos.toolbox==0.24 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.41 +# slapos.cookbook==0.57 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.23 -zope.interface = 3.8.0 \ No newline at end of file +# slapos.core==0.24 +zope.interface = 3.8.0 + +websockify = 0.1-dev diff --git a/software/memcached/software.cfg b/software/memcached/software.cfg index 894a54c521b183f4ae59202a9eeb6a14b16706bf..c25ca03a3bf052ede227e3b2abb3773a2c5c7f64 100644 --- a/software/memcached/software.cfg +++ b/software/memcached/software.cfg @@ -1,65 +1,28 @@ [buildout] - -extensions = - slapos.zcbworkarounds - slapos.rebootstrap - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - extends = ../../component/memcached/buildout.cfg - ../../component/python-2.7/buildout.cfg ../../component/dcron/buildout.cfg ../../component/stunnel/buildout.cfg ../../component/rdiff-backup/buildout.cfg ../../component/lxml-python/buildout.cfg - ../../stack/shacache-client.cfg - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - -versions = versions + ../../stack/slapos.cfg parts = # Create instance template -#TODO : list here all parts. template - libxslt eggs instance-recipe-egg -# XXX: Workaround of SlapOS limitation -# Unzippig of eggs is required, as SlapOS do not yet provide nicely working -# development / fast switching environment for whole software -unzip = true - -[rebootstrap] -# Default first version of rebootstrapped python -version = 2 -section = python2.7 - [instance-recipe] egg = slapos.cookbook module = memcached [instance-recipe-egg] recipe = zc.recipe.egg -python = python2.7 eggs = ${instance-recipe:egg} [eggs] recipe = zc.recipe.egg -python = python2.7 eggs = ${lxml-python:egg} @@ -85,5 +48,55 @@ hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.download = 1.5.0 plone.recipe.command = 1.1 -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-009 +Jinja2 = 2.6 +Werkzeug = 0.8.3 +buildout-versions = 1.7 +meld3 = 0.6.8 +slapos.recipe.template = 2.3 + +# Required by: +# slapos.core==0.2 +Flask = 0.8 + +# Required by: +# slapos.cookbook==0.7 +PyXML = 0.8.4 + +# Required by: +# slapos.cookbook==0.7 +# slapos.core==0.2 +# xml-marshaller==0.9.7 +lxml = 2.3.4 + +# Required by: +# slapos.core==0.2 +netifaces = 0.8 + +# Required by: +# slapos.core==0.2 +supervisor = 3.0a12 + +# Required by: +# slapos.cookbook==0.7 +zc.recipe.egg = 1.3.2 + +# Required by: +# slapos.core==0.2 +zope.interface = 3.8.0 + +[networkcache] +# Cedric de Saint Martin signature certificate +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----- diff --git a/software/slaprunner/README.txt b/software/slaprunner/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..f4966721911562a9a5cbe4710823c8935870f3a4 --- /dev/null +++ b/software/slaprunner/README.txt @@ -0,0 +1,23 @@ +kvm +=== + +Introduction +------------ + +This software release is used to deploy Slaprunner instances. +Slaprunner is an all-in-one IDE used to develop and test profiles and recipes for SlapOS. + +Parameters +---------- + +authorized-key +~~~~~~~~~~~~~~ + +You need to specify your SSH public key in order to connect to the SSH server of this instance. + +Example of parameter XML:: + + <?xml version="1.0" encoding="utf-8"?> + <instance> + <parameter id="authorized-key">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdNp7qZMVAzNc07opHshiIFDmJpYXQpetfcSgUj39a409d42PpsJElp7WsAE/x0nN6gUIoWIl7UiAlMzf6bKEJGJVSOZEPTmiJVlgK1Gp+kE0x9yNcncYg7p38Jny0daVA/NkkpAFyRsAm5kLGzyLtaCcktSvy0cJuy7WSSHU05pd1f8Y8thofE9g5t+/JA2VZvipxPkRfkFAG3aOAGLULlTImTSDFSDFGSDFG5F6mMnl7yvY2d6vEHVBu+K+aKmAwZVfCUwtSpa/tq3i2Lppjrw3UfrxbQSFHZCkzefr+u+l4YYe+tJrX7rYJYXD7LIfZfdSeFTlHFaN/yI1 user@host.local</parameter> + </instance> diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7fd00b152fe6b094e3b7a09c5c7874dc4f51e5e3 --- /dev/null +++ b/software/slaprunner/instance-runner.cfg @@ -0,0 +1,142 @@ +[buildout] +parts = + cloud9 + slaprunner + sshkeys-dropbear + dropbear-server-add-authorized-key + sshkeys-authority + publish-connection-informations + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + + +# Create all needed directories +[rootdirectory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc/ +var = $${buildout:directory}/var/ +srv = $${buildout:directory}/srv/ +bin = $${buildout:directory}/bin/ + +[directory] +recipe = slapos.cookbook:mkdirectory +sshkeys = $${rootdirectory:srv}/sshkeys +services = $${rootdirectory:etc}/run/ +ssh = $${rootdirectory:etc}/ssh/ + +[basedirectory] +recipe = slapos.cookbook:mkdirectory +log = $${rootdirectory:var}/log/ +services = $${rootdirectory:etc}/run/ +run = $${rootdirectory:var}/run/ +backup = $${rootdirectory:srv}/backup/ +promises = $${rootdirectory:etc}/promise/ + +[runnerdirectory] +recipe = slapos.cookbook:mkdirectory +home = $${rootdirectory:srv}/runner/ +project = $${:home}/project +software-root = $${:home}/software +instance-root = $${:home}/instance + +# Deploy cloud9 and slaprunner +[cloud9] +recipe = slapos.cookbook:cloud9 +ip = $${slap-network-information:global-ipv6} +port = 30000 +wrapper = $${basedirectory:services}/cloud9 +working-directory = $${runnerdirectory:home} +git-binary = ${git:location}/bin/git +node-binary = ${nodejs:location}/bin/node +cloud9 = ${cloud9:location}/server.js + +[slaprunner] +recipe = slapos.cookbook:slaprunner +slaprunner = ${buildout:directory}/bin/slaprunner +slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr +slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp +slapproxy = ${buildout:directory}/bin/slapproxy +supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl +git-binary = ${git:location}/bin/git +slapos.cfg = $${rootdirectory:etc}/slapos.cfg +working-directory = $${runnerdirectory:home} +project-directory = $${runnerdirectory:project} +software-directory = $${runnerdirectory:software-root} +instance-directory = $${runnerdirectory:instance-root} +ssh_client = $${sshkeys-dropbear:wrapper} +public_key = $${sshkeys-dropbear:public-key} +private_key = $${sshkeys-dropbear:private-key} +ipv4 = $${slap-network-information:local-ipv4} +ipv6 = $${slap-network-information:global-ipv6} +proxy_port = 50000 +runner_port = 50000 +partition-amount = 7 +cloud9-url = $${cloud9:access-url} +wrapper = $${basedirectory:services}/slaprunner + +# Deploy dropbear (minimalist ssh server) +[sshkeys-directory] +recipe = slapos.cookbook:mkdirectory +requests = $${directory:sshkeys}/requests/ +keys = $${directory:sshkeys}/keys/ + +[sshkeys-authority] +recipe = slapos.cookbook:sshkeys_authority +request-directory = $${sshkeys-directory:requests} +keys-directory = $${sshkeys-directory:keys} +wrapper = $${basedirectory:services}/sshkeys_authority +keygen-binary = ${dropbear:location}/bin/dropbearkey + +[dropbear-server] +recipe = slapos.cookbook:dropbear +host = $${slap-network-information:global-ipv6} +port = 2222 +home = $${directory:ssh} +wrapper = $${rootdirectory:bin}/raw_sshd +shell = /bin/bash +rsa-keyfile = $${directory:ssh}/server_key.rsa +dropbear-binary = ${dropbear:location}/sbin/dropbear + +[sshkeys-dropbear] +<= sshkeys-authority +recipe = slapos.cookbook:sshkeys_authority.request +name = dropbear +type = rsa +executable = $${dropbear-server:wrapper} +public-key = $${dropbear-server:rsa-keyfile}.pub +private-key = $${dropbear-server:rsa-keyfile} +wrapper = $${basedirectory:services}/sshd + +[dropbear-server-add-authorized-key] +<= dropbear-server +recipe = slapos.cookbook:dropbear.add_authorized_key +key = $${slap-parameter:authorized-key} + + +# Request frontend +[request-frontend] +<= slap-connection +recipe = slapos.cookbook:request +name = Frontend +# XXX We have hardcoded SR URL here. +software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg +slave = true +config = url +config-url = $${slaprunner:access-url} +return = site_url + + +# Send informations to SlapOS Master +[publish-connection-informations] +recipe = slapos.cookbook:publish +backend_url = $${slaprunner:access-url} +url = $${request-frontend:connection-site_url} +cloud9_url = $${cloud9:access-url} +ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port} + + +[slap-parameter] +# Default value if no ssh key is specified +authorized-key = diff --git a/software/slaprunner/instance.cfg b/software/slaprunner/instance.cfg index 182887a686342b03b7a68db2bd14de3dc3cf0242..446a7a1983eb4ac3b50151c538856da807c06b09 100644 --- a/software/slaprunner/instance.cfg +++ b/software/slaprunner/instance.cfg @@ -1,67 +1,11 @@ [buildout] parts = - instance - sshkeys-authority - sshkeys-dropbear - dropbear-client + switch_softwaretype eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -slaprunner = ${buildout:directory}/bin/slaprunner -slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr -slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp -slapproxy = ${buildout:directory}/bin/slapproxy -supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl -git = ${git:location}/bin/git -node-bin = ${nodejs-0.4:location}/bin/node -cloud9 = ${cloud9:location}/bin/cloud9.js -ssh_client = $${sshkeys-dropbear:wrapper} -public_key = $${sshkeys-dropbear:public-key} -private_key = $${sshkeys-dropbear:private-key} - - -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - -[sshkeys-authority] -recipe = slapos.cookbook:sshkeys_authority -request-directory = $${sshkeys-directory:requests} -keys-directory = $${sshkeys-directory:keys} -wrapper = $${directory:services}/sshkeys_authority -keygen-binary = ${dropbear:location}/bin/dropbearkey - -[sshkeys-dropbear] -<= sshkeys-authority -recipe = slapos.cookbook:sshkeys_authority.request -name = dropbear -type = rsa -executable = $${dropbear-client:wrapper} -public-key = $${dropbear-client:identity-file}.pub -private-key = $${dropbear-client:identity-file} -wrapper = $${rootdirectory:bin}/dbclient - -[dropbear-client] -recipe = slapos.cookbook:dropbear.client -dbclient-binary = ${dropbear:location}/bin/dbclient -identity-file = $${directory:ssh}/id_rsa -wrapper = $${rootdirectory:bin}/dbclient_raw -home = $${rootdirectory:etc}/ssh/ -force-host-key = True - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ - -[directory] -recipe = slapos.cookbook:mkdirectory -sshkeys = $${rootdirectory:srv}/sshkeys -services = $${rootdirectory:etc}/run/ -ssh = $${rootdirectory:etc}/ssh/ \ No newline at end of file +[switch_softwaretype] +recipe = slapos.cookbook:softwaretype +default = ${template-runner:output} \ No newline at end of file diff --git a/software/slaprunner/software.cfg b/software/slaprunner/software.cfg index e6ee0edd7a7d68ece8108b9dee768aeca0d2030e..6f8f84f8fde5d476422d1c1fb068f74c519ae65a 100644 --- a/software/slaprunner/software.cfg +++ b/software/slaprunner/software.cfg @@ -1,8 +1,4 @@ [buildout] - -extensions = - buildout-versions - extends = ../../stack/slapos.cfg ../../stack/flask.cfg @@ -14,28 +10,23 @@ extends = parts = template eggs - instance-recipe-egg - dropbear - -versions = versions - -[instance-recipe] -egg = slapos.cookbook -module = slaprunner - -[instance-recipe-egg] -recipe = zc.recipe.egg -python = python2.7 -eggs = ${instance-recipe:egg} + slapos-cookbook [template] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg output = ${buildout:directory}/template.cfg mode = 0644 -md5sum = 7cfd248cdc6fa6cbb4957d25a0aed884 +md5sum = 5307e4200f044ae57b504ad68444491c -[eggs] +[template-runner] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance-runner.cfg +output = ${buildout:directory}/template-runner.cfg +md5sum = 0ddddd0be595df4fb15d55e566cc3bc3 +mode = 0644 + +[slapos-cookbook] eggs += slapos.libnetworkcache slapos.toolbox @@ -60,98 +51,102 @@ signature-certificate-list = -----END CERTIFICATE----- [versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 - Jinja2 = 2.6 +Pygments = 1.5 Werkzeug = 0.8.3 -apache-libcloud = 0.8.0 +apache-libcloud = 0.10.1 async = 0.6.1 buildout-versions = 1.7 +docutils = 0.9 gitdb = 0.5.4 -hexagonit.recipe.cmmi = 1.5.0 +hexagonit.recipe.cmmi = 1.5.1 +ipython = 0.12.1 meld3 = 0.6.8 plone.recipe.command = 1.1 -pycrypto = 2.5 -slapos.cookbook = 0.45 +pycrypto = 2.6 +slapos.cookbook = 0.53 slapos.libnetworkcache = 0.12 -slapos.recipe.template = 2.3 -slapos.toolbox = 0.20 +slapos.recipe.build = 0.9 +slapos.recipe.template = 2.4 +slapos.toolbox = 0.24 smmap = 0.8.2 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 Flask = 0.8 # Required by: -# slapos.toolbox==0.20 +# slapos.toolbox==0.24 GitPython = 0.3.2.RC1 # Required by: -# slapos.cookbook==0.45 +# slapos.cookbook==0.53 PyXML = 0.8.4 # Required by: -# slapos.toolbox==0.20 +# netaddr==0.7.7 +Sphinx = 1.1.3 +# Required by: +# slapos.toolbox==0.24 atomize = 0.1.1 # Required by: -# slapos.toolbox==0.20 -feedparser = 5.1.1 +# slapos.toolbox==0.24 +feedparser = 5.1.2 # Required by: -# slapos.cookbook==0.45 +# slapos.cookbook==0.53 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.45 -# slapos.core==0.24 +# slapos.cookbook==0.53 +# slapos.core==0.25 # xml-marshaller==0.9.7 lxml = 2.3.4 # Required by: -# slapos.cookbook==0.45 -netaddr = 0.7.6 +# slapos.cookbook==0.53 +netaddr = 0.7.7 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 netifaces = 0.8 # Required by: -# slapos.toolbox==0.20 -paramiko = 1.7.7.1 +# slapos.toolbox==0.24 +paramiko = 1.7.7.2 # Required by: -# slapos.toolbox==0.20 +# slapos.toolbox==0.24 psutil = 0.4.1 # Required by: -# slapos.cookbook==0.45 -# slapos.core==0.24 +# slapos.cookbook==0.53 +# slapos.core==0.25 # slapos.libnetworkcache==0.12 -# slapos.toolbox==0.20 +# slapos.toolbox==0.24 # supervisor==3.0a12 -# zc.buildout==1.6.0-dev-SlapOS-003 +# zc.buildout==1.6.0-dev-SlapOS-004 # zc.recipe.egg==1.3.2 -# zope.interface==3.8.0 +# zope.interface==4.0.1 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.45 -slapos.core = 0.24 +# slapos.cookbook==0.53 +slapos.core = 0.25 # Required by: -# slapos.core==0.24 +# slapos.core==0.25 supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.45 +# slapos.cookbook==0.53 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.45 +# slapos.cookbook==0.53 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.24 -zope.interface = 3.8.0 \ No newline at end of file +# slapos.core==0.25 +zope.interface = 4.0.1 diff --git a/software/wordpress/software.cfg b/software/wordpress/software.cfg index 3f96337764d41f3ef95020fb9e8df4e33722c5c8..91cb21d0e15bedca97d236060cf5b049931ce4ca 100644 --- a/software/wordpress/software.cfg +++ b/software/wordpress/software.cfg @@ -13,7 +13,7 @@ url = http://wordpress.org/latest.tar.gz [application-template] recipe = slapos.recipe.download url = ${:_profile_base_location_}/wp-config.php.in -md5sum = ${application-configuration:md5sum} +md5sum = 0d62b28125ca3c780db0b547199953f2 download-only = True filename = template.in mode = 0644 @@ -21,8 +21,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} [application-configuration] location = wp-config.php -md5sum = 3859841a4ad6ed23744d6bc5a01321e0 - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 diff --git a/software/wordpress/wp-config.php.in b/software/wordpress/wp-config.php.in index c96b2d3be1084da78d3ece1c605e11a05c8c09a7..69b10723b3980b86ca5892ca12542e810281efd8 100644 --- a/software/wordpress/wp-config.php.in +++ b/software/wordpress/wp-config.php.in @@ -88,3 +88,5 @@ if ( !defined('ABSPATH') ) /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); + +remove_action( 'template_redirect', 'redirect_canonical' ); \ No newline at end of file diff --git a/stack/cloudooo.cfg b/stack/cloudooo.cfg index fb7e5874ea68c20653ee099efed1fd50b7b66573..9b75a47ef9cbc85acd2acb9408fd7806dd258ca3 100755 --- a/stack/cloudooo.cfg +++ b/stack/cloudooo.cfg @@ -3,13 +3,36 @@ extensions = slapos.rebootstrap slapos.zcbworkarounds buildout-versions + mr.developer -find-links = +find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/ + http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/ http://dist.repoze.org http://www.nexedi.org/static/packages/source/ http://www.owlfish.com/software/wsgiutils/download.html +# Separate from site eggs +allowed-eggs-from-site-packages = +include-site-packages = false +exec-sitecustomize = false + +# Use only quite well working sites. +allow-hosts = + *.nexedi.org + *.python.org + *.sourceforge.net + alastairs-place.net + dist.repoze.org + effbot.org + github.com + peak.telecommunity.com + psutil.googlecode.com + www.dabeaz.com + www.owlfish.com + launchpad.net + bitbucket.org + extends = ../component/libreoffice-bin/buildout.cfg ../component/libpng/buildout.cfg @@ -74,4 +97,4 @@ section = python2.7 [versions] # Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 +zc.buildout = 1.6.0-dev-SlapOS-006 diff --git a/stack/erp5.cfg b/stack/erp5.cfg index 4632d41ea7bbd07fe5da9c8466e2ecbca34da2a3..8a8343be8af2e085a4836258d7375140f0b0ab4c 100644 --- a/stack/erp5.cfg +++ b/stack/erp5.cfg @@ -230,12 +230,13 @@ initialization = [bt5_path, os.path.join(bt5_path, '*')] for bt5_path in (os.path.join(parts_directory, x, 'bt5') for x in repository_id_list)), [])) + extra_path_list = '''${:extra-paths}'''.split() sys.path[:0] = sum(( - glob.glob(os.path.join(parts_directory, x, 'tests')) - for x in repository_id_list), []) + glob.glob(os.path.join(x, 'tests')) + for x in extra_path_list), []) sys.path[:0] = sum(( - glob.glob(os.path.join(parts_directory, x, 'product', '*', 'tests')) - for x in repository_id_list), []) + glob.glob(os.path.join(x, 'Products', '*', 'tests')) + for x in extra_path_list), []) [test_suite_runner] # XXX: Workaround for fact ERP5Type is not an distribution and does not @@ -481,7 +482,7 @@ rtjp-eventlet = 0.3.2 setuptools = 0.6c12dev-r88846 slapos.core = 0.24 slapos.recipe.build = 0.7 -slapos.recipe.template = 2.3 +slapos.recipe.template = 2.4 slapos.toolbox = 0.23 smmap = 0.8.2 socketpool = 0.3.0 diff --git a/stack/lamp.cfg b/stack/lamp.cfg index dca29810762ef61ce623056f9160774144732a97..7da955be2380cb542783b40ade635424a4928c15 100644 --- a/stack/lamp.cfg +++ b/stack/lamp.cfg @@ -1,3 +1,10 @@ +# Warning: this file is deprecated and is here only for compatiblity. +# If you extend this file, you should probably extend stack/lamp/buildout.cfg +# Instead. + +# Only reason to use this file is when your PHP application uses "delete", +# "rename" or any feature of lampconfigure (not yet ported to new stack). + [buildout] parts = template @@ -20,9 +27,6 @@ extends = ../component/pycrypto-python/buildout.cfg ../component/mysql-python/buildout.cfg ../stack/slapos.cfg - ../component/python-2.7/buildout.cfg -# python-2.7 component is here only for compatibility with old software.cfg. -# It is not needed and should not be used in LAMP-based software.cfg [eggs] recipe = zc.recipe.egg diff --git a/stack/lamp/buildout.cfg b/stack/lamp/buildout.cfg index df1736a91fdd51b5d15943a39e0625dbe46c7e50..4fb56ecf62dd4711b138074e601effb0106e6753 100644 --- a/stack/lamp/buildout.cfg +++ b/stack/lamp/buildout.cfg @@ -19,6 +19,7 @@ extends = ../../component/mariadb/buildout.cfg ../../component/apache/buildout.cfg ../../component/apache-php/buildout.cfg + ../../component/dash/buildout.cfg ../../component/dcron/buildout.cfg ../../component/git/buildout.cfg ../../component/glib/buildout.cfg @@ -34,11 +35,8 @@ extends = ../../component/mysql-python/buildout.cfg ../../component/dropbear/buildout.cfg ../slapos.cfg - ../../component/python-2.7/buildout.cfg -# python-2.7 component is here only for compatibility with old software.cfg. -# It is not needed and should not be used in LAMP-based software.cfg - -versions = versions + ../../component/dash/buildout.cfg + ../../component/curl/buildout.cfg [mariadb] # Compile dir is for plugins, there's no plugin in LAMP @@ -68,7 +66,7 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-apache-php.cfg output = ${buildout:directory}/template-apache-php.cfg -md5sum = 8ebed1e26127c066e5b69372e69e6c38 +md5sum = b5fe314c3437151bb048ada9b37f9318 mode = 0644 [template-apache-backup] @@ -89,7 +87,7 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-mariadb.cfg output = ${buildout:directory}/template-mariadb.cfg -md5sum = 87ab5e07743b26fb3c8f18ea0f93ce65 +md5sum = ba5ebecbfe9fbb96d48f2baa43c37065 mode = 0644 [template-mariadb-pbsready] @@ -120,6 +118,14 @@ output = ${buildout:directory}/template-pull-backup.cfg md5sum = 9aab30ba5aa23a37d4b507e7c414be00 mode = 0644 +# Dummy parts in case no application configuration file is needed +[application-template] +filename = +location = + +[application-configuration] +location = + [eggs] recipe = zc.recipe.egg eggs = @@ -182,3 +188,105 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + +[versions] +Jinja2 = 2.6 +Pygments = 1.5 +Werkzeug = 0.8.3 +apache-libcloud = 0.10.1 +async = 0.6.1 +buildout-versions = 1.7 +docutils = 0.9.1 +gitdb = 0.5.4 +hexagonit.recipe.cmmi = 1.5.1 +ipython = 0.12.1 +meld3 = 0.6.8 +pycrypto = 2.6 +rdiff-backup = 1.0.5 +slapos.cookbook = 0.55 +slapos.recipe.build = 0.9 +slapos.recipe.download = 1.0.dev-r4053 +slapos.recipe.template = 2.4 +slapos.toolbox = 0.25 +smmap = 0.8.2 + +# Required by: +# slapos.core==0.25 +# slapos.toolbox==0.25 +Flask = 0.8 + +# Required by: +# slapos.toolbox==0.25 +GitPython = 0.3.2.RC1 + +# Required by: +# slapos.cookbook==0.55 +PyXML = 0.8.4 + +# Required by: +# netaddr==0.7.7 +Sphinx = 1.1.3 + +# Required by: +# slapos.toolbox==0.25 +atomize = 0.1.1 + +# Required by: +# slapos.toolbox==0.25 +feedparser = 5.1.2 + +# Required by: +# slapos.cookbook==0.55 +inotifyx = 0.2.0 + +# Required by: +# slapos.cookbook==0.55 +# slapos.core==0.25 +# xml-marshaller==0.9.7 +lxml = 2.3.4 + +# Required by: +# slapos.cookbook==0.55 +netaddr = 0.7.7 + +# Required by: +# slapos.core==0.25 +netifaces = 0.8 + +# Required by: +# slapos.toolbox==0.25 +paramiko = 1.7.7.2 + +# Required by: +# slapos.toolbox==0.25 +psutil = 0.4.1 + +# Required by: +# slapos.cookbook==0.55 +# slapos.core==0.25 +# slapos.toolbox==0.25 +# zc.buildout==1.6.0-dev-SlapOS-006 +# zc.recipe.egg==1.3.2 +setuptools = 0.6c12dev-r88846 + +# Required by: +# slapos.cookbook==0.55 +# slapos.toolbox==0.25 +slapos.core = 0.25 + +# Required by: +# slapos.core==0.25 +supervisor = 3.0a12 + +# Required by: +# slapos.cookbook==0.55 +# slapos.toolbox==0.25 +xml-marshaller = 0.9.7 + +# Required by: +# slapos.cookbook==0.55 +zc.recipe.egg = 1.3.2 + +# Required by: +# slapos.core==0.25 +zope.interface = 4.0.1 diff --git a/stack/lamp/instance-apache-php.cfg b/stack/lamp/instance-apache-php.cfg index d77125de685bf8ea09133792e50442de11f4489a..670e4c09f57f1decd859fedd94d0644bf06f0f67 100644 --- a/stack/lamp/instance-apache-php.cfg +++ b/stack/lamp/instance-apache-php.cfg @@ -1,10 +1,6 @@ [buildout] parts = - url - request-mariadb - apache-php - stunnel certificate-authority ca-stunnel logrotate @@ -13,61 +9,45 @@ parts = cron cron-entry-logrotate promise + slapmonitor + slapreport + frontend-promise + publish-connection-informations eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} offline = true -[url] -recipe = slapos.cookbook:publishurl -url = http://[$${apache-php:ip}]:$${apache-php:port}/ -[promise] -recipe = slapos.cookbook:check_port_listening -path = $${basedirectory:promises}/apache -hostname = $${apache-php:ip} -port = $${apache-php:port} - -[mariadb-urlparse] -recipe = slapos.cookbook:urlparse -url = $${request-mariadb:connection-url} - -[apache-php] -recipe = slapos.cookbook:apachephp -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -htdocs = $${directory:htdocs} -pid-file = $${basedirectory:run}/apache.pid -lock-file = $${basedirectory:run}/apache.lock -ip = $${slap-network-information:global-ipv6} -port = 8080 -error-log = $${directory:httpd-log}/error.log -access-log = $${directory:httpd-log}/access.log -php-ini-dir = $${directory:php-ini-dir} -tmp-dir = $${directory:tmp-php} -httpd-conf = $${rootdirectory:etc}/apache.conf -wrapper = $${basedirectory:services}/apache - -httpd-binary = ${apache:location}/bin/httpd +# Creation of all needed directories +[rootdirectory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc/ +var = $${buildout:directory}/var/ +srv = $${buildout:directory}/srv/ +bin = $${buildout:directory}/bin/ +tmp = $${buildout:directory}/tmp/ -mysql-username = $${mariadb-urlparse:username} -mysql-password = $${mariadb-urlparse:password} -mysql-database = $${mariadb-urlparse:path} -mysql-host = $${stunnel:local-host} -mysql-port = $${stunnel:local-port} +[basedirectory] +recipe = slapos.cookbook:mkdirectory +log = $${rootdirectory:var}/log/ +services = $${rootdirectory:etc}/run/ +run = $${rootdirectory:var}/run/ +backup = $${rootdirectory:srv}/backup/ +promises = $${rootdirectory:etc}/promise/ -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} +[directory] +recipe = slapos.cookbook:mkdirectory +ca-dir = $${rootdirectory:srv}/ssl/ +httpd-log = $${basedirectory:log}/apache/ +php-ini-dir = $${rootdirectory:etc}/php/ +tmp-php = $${rootdirectory:tmp}/php/ +logrotate-entries = $${rootdirectory:etc}/logrotate.d/ +logrotate-backup = $${basedirectory:backup}/logrotate/ +stunnel-conf = $${rootdirectory:etc}/stunnel/ +cronstamps = $${rootdirectory:etc}/cronstamps/ +cron-entries = $${rootdirectory:etc}/cron.d/ +crontabs = $${rootdirectory:etc}/crontabs/ [cadirectory] recipe = slapos.cookbook:mkdirectory @@ -77,14 +57,8 @@ certs = $${directory:ca-dir}/certs/ newcerts = $${directory:ca-dir}/newcerts/ crl = $${directory:ca-dir}/crl/ -[ca-stunnel] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -executable = $${stunnel:wrapper} -wrapper = $${basedirectory:services}/stunnel -key-file = $${stunnel:key-file} -cert-file = $${stunnel:cert-file} +# Deploy stunnel [stunnel] recipe = slapos.cookbook:stunnel client = true @@ -101,6 +75,29 @@ pid-file = $${basedirectory:run}/stunnel.pid wrapper = $${rootdirectory:bin}/raw_stunnel post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate + +# Certificate stuffs +[certificate-authority] +recipe = slapos.cookbook:certificate_authority +openssl-binary = ${openssl:location}/bin/openssl +ca-dir = $${directory:ca-dir} +requests-directory = $${cadirectory:requests} +wrapper = $${basedirectory:services}/ca +ca-private = $${cadirectory:private} +ca-certs = $${cadirectory:certs} +ca-newcerts = $${cadirectory:newcerts} +ca-crl = $${cadirectory:crl} + +[ca-stunnel] +<= certificate-authority +recipe = slapos.cookbook:certificate_authority.request +executable = $${stunnel:wrapper} +wrapper = $${basedirectory:services}/stunnel +key-file = $${stunnel:key-file} +cert-file = $${stunnel:cert-file} + + +# Request MariaDB instance and parse its URL [request-mariadb] <= slap-connection recipe = slapos.cookbook:request @@ -109,6 +106,41 @@ software-url = $${slap-connection:software-release-url} software-type = mariadb return = url +[mariadb-urlparse] +recipe = slapos.cookbook:urlparse +url = $${request-mariadb:connection-url} + + +# Deploy Apache + PHP application +[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 +lock-file = $${basedirectory:run}/apache.lock +ip = $${slap-network-information:global-ipv6} +port = 8080 +url = http://[$${:ip}]:$${:port}/ +error-log = $${directory:httpd-log}/error.log +access-log = $${directory:httpd-log}/access.log +php-ini-dir = $${directory:php-ini-dir} +tmp-dir = $${directory:tmp-php} +httpd-conf = $${rootdirectory:etc}/apache.conf +wrapper = $${basedirectory:services}/apache + +httpd-binary = ${apache:location}/bin/httpd + +mysql-username = $${mariadb-urlparse:username} +mysql-password = $${mariadb-urlparse:password} +mysql-database = $${mariadb-urlparse:path} +mysql-host = $${stunnel:local-host} +mysql-port = $${stunnel:local-port} + + +# Deploy logrotate, cron, configure it [logrotate] recipe = slapos.cookbook:logrotate # Binaries @@ -144,6 +176,11 @@ notifempty = true create = true post = $${stunnel:post-rotate-script} +[cron-simplelogger] +recipe = slapos.cookbook:simplelogger +wrapper = $${rootdirectory:bin}/cron_simplelogger +log = $${basedirectory:log}/crond.log + [cron] recipe = slapos.cookbook:cron dcrond-binary = ${dcron:location}/sbin/crond @@ -153,11 +190,6 @@ cronstamps = $${directory:cronstamps} catcher = $${cron-simplelogger:wrapper} binary = $${basedirectory:services}/crond -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = $${rootdirectory:bin}/cron_simplelogger -log = $${basedirectory:log}/crond.log - [cron-entry-logrotate] <= cron recipe = slapos.cookbook:cron.d @@ -165,32 +197,71 @@ name = logrotate frequency = 0 0 * * * command = $${logrotate:wrapper} -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ -tmp = $${buildout:directory}/tmp/ -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ +# Request frontend +[request-frontend] +<= slap-connection +recipe = slapos.cookbook:request +name = Frontend +# XXX We have hardcoded SR URL here. +software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg +slave = true +config = url custom_domain +config-url = http://[$${apache-php:ip}]:$${apache-php:port}/ +return = site_url +config-custom_domain = $${slap-parameter:domain} -[directory] -recipe = slapos.cookbook:mkdirectory -ca-dir = $${rootdirectory:srv}/ssl/ -htdocs = $${rootdirectory:srv}/www/ -httpd-log = $${basedirectory:log}/apache/ -php-ini-dir = $${rootdirectory:etc}/php/ -tmp-php = $${rootdirectory:tmp}/php/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -stunnel-conf = $${rootdirectory:etc}/stunnel/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ + +# Deploy slapmonitor +[slapmonitor] +recipe = slapos.cookbook:slapmonitor +pid-file = $${basedirectory:run}/apache.pid +database-path = $${basedirectory:log}/slapmonitor.db +shell-path = ${dash:location}/bin/dash +slapmonitor-path = ${buildout:bin-directory}/slapmonitor +path = $${basedirectory:services}/slapmonitor + +[slapreport] +recipe = slapos.cookbook:slapreport +pid-file = $${basedirectory:run}/apache.pid +database-path = $${basedirectory:log}/slapmonitor.db +consumption-log-path = $${basedirectory:log}/instance_consumption.log +logbox-ip = 87.98.152.12 +logbox-port = 5122 +logbox-user = admin +logbox-passwd = passer +shell-path = ${dash:location}/bin/dash +slapreport-path = ${buildout:bin-directory}/slapreport +path = $${basedirectory:services}/slapreport + + +# Publish all instance parameters (url of instance) +[publish-connection-informations] +recipe = slapos.cookbook:publish +backend_url = $${apache-php:url} +url = $${request-frontend:connection-site_url} + + +# Deploy promises scripts +[promise] +recipe = slapos.cookbook:check_port_listening +path = $${basedirectory:promises}/apache +hostname = $${apache-php:ip} +port = $${apache-php:port} + +[frontend-promise] +recipe = slapos.cookbook:check_url_available +path = $${basedirectory:promises}/frontend +url = $${request-frontend:connection-site_url} +dash_path = ${dash:location}/bin/dash +curl_path = ${curl:location}/bin/curl + + +[slap-parameter] +# Default value if no domain is specified +domain = +# Default value if no ssh parameter is specified +logbox-ip = +logbox-port = +logbox-user = +logbox-passwd = diff --git a/stack/lamp/instance-mariadb.cfg b/stack/lamp/instance-mariadb.cfg index b933660b89389a865fc879acde3c6002b34ede16..34d7720b9cf3f2a8b38271e6c0edeb6bf8d936c4 100644 --- a/stack/lamp/instance-mariadb.cfg +++ b/stack/lamp/instance-mariadb.cfg @@ -11,6 +11,8 @@ parts = logrotate-entry-cron cron cron-entry-logrotate + slapmonitor + slapreport gzip-binary = ${gzip:location}/bin/gzip @@ -50,6 +52,26 @@ mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade mysqld-binary = ${mariadb:location}/bin/mysqld +[slapmonitor] +recipe = slapos.cookbook:slapmonitor +pid-file = $${basedirectory:run}/mariadb.pid +database-path = $${basedirectory:log}/slapmonitor.db +shell-path = ${dash:location}/bin/dash +slapmonitor-path = ${buildout:bin-directory}/slapmonitor +path = $${basedirectory:services}/slapmonitor + +[slapreport] +recipe = slapos.cookbook:slapreport +pid-file = $${basedirectory:run}/mariadb.pid +consumption-log-path = $${basedirectory:log}/instance_consumption.log +database-path = $${basedirectory:log}/slapmonitor.db +logbox-ip = 87.98.152.12 +logbox-port = 5122 +logbox-user = admin +logbox-passwd = passer +shell-path = ${dash:location}/bin/dash +slapreport-path = ${buildout:bin-directory}/slapreport +path = $${basedirectory:services}/slapreport [certificate-authority] recipe = slapos.cookbook:certificate_authority @@ -186,3 +208,10 @@ mariadb-data = $${rootdirectory:srv}/mariadb/ logrotate-backup = $${basedirectory:backup}/logrotate/ stunnel-conf = $${rootdirectory:etc}/stunnel/ logrotate-entries = $${rootdirectory:etc}/logrotate.d/ + +[slap-parameter] +#Default value if no ssh parameters specified +logbox-ip = +logbox-port = +logbox-user = +logbox-passwd = diff --git a/stack/nbd.cfg b/stack/nbd.cfg deleted file mode 100644 index 53ad4232a6f60fd85ac288de3213430e520a963e..0000000000000000000000000000000000000000 --- a/stack/nbd.cfg +++ /dev/null @@ -1,174 +0,0 @@ -[buildout] -extends = - ../component/python-2.6/buildout.cfg - ../component/lxml-python/buildout.cfg - ../component/zlib/buildout.cfg - ../component/git/buildout.cfg - -# Python2.6 needed by Flask and pyopenssl -extensions = - slapos.rebootstrap - -parts += - nbdserver - pyOpenSSL-python - eggs - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - -[rebootstrap] -section = python2.6 -version = 3 -eggs = slapos.libnetworkcache - -[nbdserver] -# XXX-Cedric : use official tarball from kvm website -# (new kvm code does not seem to need special patch) -recipe = hexagonit.recipe.cmmi -path = ${nbdserversource:location}/ -configure-options = - --disable-system - --disable-kvm - --extra-cflags="-I${zlib:location}/include" - --extra-ldflags="-L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib" - --disable-werror - -[nbdserversource] -recipe=plone.recipe.command -location = ${buildout:parts-directory}/${:_buildout_section_name_} -stop-on-error = true -command = - (${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} ) || (rm -fr ${:location} ; exit 1) -update-command = - cd "${:location}" && "${git:location}/bin/git" fetch --quiet && "${git:location}/bin/git" reset --hard --quiet @{upstream} - -[instance-recipe] -egg = slapos.cookbook -module = nbdserver - -[eggs] -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - slapos.toolbox - slapos.cookbook - pyOpenSSL - -[pyOpenSSL-python] -recipe = zc.recipe.egg:custom -egg = pyOpenSSL -include-dirs = - ${openssl:location}/include/ - ${python2.6:location}/include/ -library-dirs = - ${openssl:location}/lib/ - ${python2.6:location}/lib/ -rpath = - ${openssl:location}/lib/ - ${python2.6:location}/lib/ - - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-005 - -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -apache-libcloud = 0.5.2 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -pyOpenSSL = 0.12 -pycrypto = 2.3 -slapos.cookbook = 0.14 -slapos.recipe.template = 1.1 -slapos.toolbox = 0.6 - -# Required by: -# slapos.core==0.9 -# slapos.toolbox==0.6 -Flask = 0.7.2 - -# Required by: -# slapos.cookbook==0.14 -PyXML = 0.8.4 - -# Required by: -# slapos.core==0.9 -argparse = 1.1 - -# Required by: -# slapos.recipe.template==1.1 -collective.recipe.template = 1.8 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.14 -# slapos.core==0.9 -# slapos.toolbox==0.6 -# xml-marshaller==0.9.7 -lxml = 2.3 - -# Required by: -# slapos.cookbook==0.14 -netaddr = 0.7.5 - -# Required by: -# slapos.core==0.9 -netifaces = 0.4 - -# Required by: -# slapos.toolbox==0.6 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.6 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.14 -# slapos.core==0.9 -# slapos.toolbox==0.6 -# zc.buildout==1.5.3-dev-SlapOS-005 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.14 -# slapos.toolbox==0.6 -slapos.core = 0.9 - -# Required by: -# slapos.core==0.9 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.14 -# slapos.toolbox==0.6 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.14 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.9 -zope.interface = 3.6.4 diff --git a/stack/nodejs.cfg b/stack/nodejs.cfg index 04b47bc9b8947ab717c769451a4d73c8178613cd..616b568b72a53828154a5c8a361c0a232118e9d4 100644 --- a/stack/nodejs.cfg +++ b/stack/nodejs.cfg @@ -1,18 +1,7 @@ [buildout] extends = ../component/nodejs/buildout.cfg - ../component/lxml-python/buildout.cfg ../stack/slapos.cfg -versions = versions - parts = - eggs nodejs - npm - -[eggs] -recipe = zc.recipe.egg -eggs = - slapos.cookbook - ${lxml-python:egg} diff --git a/stack/slapos.cfg b/stack/slapos.cfg index 2054ec53eaaea2f8c5b4eb9f70eb57f1bb43fe1f..fe0971a48442f625ad6193cb91953c07faf948cf 100644 --- a/stack/slapos.cfg +++ b/stack/slapos.cfg @@ -2,13 +2,17 @@ # Software Releases or Stacks can safely extend this stack. [buildout] +# It is good idea for developers to add explicitely this part in their profile +parts += slapos-cookbook + # Generate list of automatically chosen eggs version extensions += buildout-versions -# Use shacache +# Use shacache and lxml extends = shacache-client.cfg + ../component/lxml-python/buildout.cfg # Separate from site eggs allowed-eggs-from-site-packages = @@ -29,11 +33,12 @@ allow-hosts += dist.repoze.org effbot.org github.com + launchpad.net peak.telecommunity.com psutil.googlecode.com + sourceforge.net www.dabeaz.com www.owlfish.com - launchpad.net # XXX: Workaround of SlapOS limitation # Unzippig of eggs is required, as SlapOS do not yet provide nicely working @@ -42,9 +47,16 @@ unzip = true versions = versions +# Install slapos.cookbook containing all officials recipes +[slapos-cookbook] +recipe = zc.recipe.egg +eggs = + ${lxml-python:egg} + slapos.cookbook + [versions] # Use patched hexagonit.recipe.download from # https://github.com/SlapOS/hexagonit.recipe.download hexagonit.recipe.download = 1.5.1-dev-slapos-001 # Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-004 +zc.buildout = 1.6.0-dev-SlapOS-006