diff --git a/CHANGES.txt b/CHANGES.txt index 7392bdb68f03e6141577f475e72f943ab0534683..491fc5c583163c2dbff463a746f20b4a3e0b693d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,9 +1,64 @@ Changes ======= -0.59 (Unreleased) +0.65 (Unrelease) +---------------- + + * No change yet. + +0.64.2 (2012-08.28) +------------------- + + * Specify description on gitinit recipe. [Antoine Catton] + +0.64.1 (2012-08-28) +------------------- + + * Fix: minor fix on downloader recipe in order to allow cross-device renaming. + [Antoine Catton] + +0.64 (2012-08-27) +---------------- + + * Fix: remove "template" recipe which was collinding with slapos.recipe.template. + [Antoine Catton] + +0.63 (2012-08-22) +---------------- + + * Add the ability to run command line in shellinabox. [Antoine Catton] + * Add the ability to run shellinabox as root. (for LXC purpose) [Antoine Catton] + * Add "uuid" recipe. [Antoine Catton] + * Add "downloader" recipe. [Antoine Catton] + +0.62 (2012-08-21) ----------------- + * Add "wrapper" recipe. [Antoine Catton] + * Add "gitinit" recipe. [Antoine Catton] + * librecipe.execute code clean up and factorization. [Antoine Catton] + * Add "template" recipe. [Antoine Catton] + +0.61 (2012-08-17) +----------------- + + * Add "debug" option for slaprunner. [Alain Takoudjou] + +0.60 (2012-08-13) +----------------- + + * New recipe: requestoptional, like "request", but won't fail if instance is + not ready. [Cedric de Saint Martin] + * Update zabbix to return strings as parameters. [Cedric de Saint Martin] + * Add check in check_url_promise in case of empty URL. [Cedric de Saint + Martin] + * Upgrade slaprunner recipe to be compatible with newest version. [Alain + Takoudjou] + +0.59 (2012-07-12) +----------------- + + * Zabbix: add temperature monitoring using custom commands. 0.58 (2012-07-06) ----------------- @@ -86,7 +141,7 @@ Changes [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) ----------------- @@ -152,7 +207,7 @@ Changes ----------------- * apache_frontend initial release. [Cedric de Saint Martin] - + 0.39 (2012-02-20) ----------------- @@ -205,7 +260,7 @@ Changes 0.32 (2011-10-28) ----------------- - * LAMP : Recipe can now call lampconfigure from slapos.toolbox which will + * LAMP : Recipe can now call lampconfigure from slapos.toolbox which will configure PHP application instance when needed. [Alain Takoudjou Kamdem] 0.31 (2011-10-16) diff --git a/component/attr/buildout.cfg b/component/attr/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..a279dd8f0f7777fcc0a5c5206b8a26c41da7c169 --- /dev/null +++ b/component/attr/buildout.cfg @@ -0,0 +1,12 @@ +[buildout] + +parts = attr + +[attr] +recipe = hexagonit.recipe.cmmi +url = ftp://ftp.igh.cnrs.fr/pub/nongnu/attr/attr-2.4.46.src.tar.gz +md5sum = db557c17fdfa4f785333ecda08654010 +configure-options = + --enable-shared=yes + --enable-gettext=no +make-targets = install install-lib install-dev diff --git a/component/autoconf/buildout.cfg b/component/autoconf/buildout.cfg index a489549178a6ebf825317f8974d6d3a1a95abb7e..fe65a23785e8c10598a336fc303c9c4827c18927 100644 --- a/component/autoconf/buildout.cfg +++ b/component/autoconf/buildout.cfg @@ -7,8 +7,8 @@ parts = [autoconf] recipe = hexagonit.recipe.cmmi -url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz -md5sum = c3b5247592ce694f7097873aa07d66fe +url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz +md5sum = 82d05e03b93e45f5a39b828dc9c6c29b environment = M4=${m4:location}/bin/m4 PATH=${perl:location}/bin:%(PATH)s diff --git a/component/busybox/buildout.cfg b/component/busybox/buildout.cfg index ed6057fb9074c8b6011d3ea8a1611540061502e7..c80801a29f346e8425c98907a79542e1a55b86a7 100644 --- a/component/busybox/buildout.cfg +++ b/component/busybox/buildout.cfg @@ -1,28 +1,14 @@ [buildout] -extends = - ../patch/buildout.cfg -# https://bugs.busybox.net/show_bug.cgi?id=4838 -[busybox-1.19.3.packed_hack.patch] -recipe = hexagonit.recipe.download -url = ${:_profile_base_location_}/${:filename} -md5sum = faa5ce46be086763202d7ca24601fbde -filename = busybox-1.19.3.packed_hack.patch -download-only = true +parts = busybox [busybox] recipe = slapos.recipe.build -url = http://busybox.net/downloads/busybox-1.19.4.tar.bz2 -md5sum = 9c0cae5a0379228e7b55e5b29528df8e -patch-binary = ${patch:location}/bin/patch -patch-options = -p1 -patches = - ${busybox-1.19.3.packed_hack.patch:location}/${busybox-1.19.3.packed_hack.patch:filename} +url = http://git.busybox.net/busybox/snapshot/busybox-1_20_1.tar.gz +md5sum = 15758fc37ae8051d6def1b8afb691821 script = extract_dir = self.extract(self.download(%(url)r, %(md5sum)r)) workdir = guessworkdir(extract_dir) - self.applyPatchList(self.options.get('patches'), self.options.get('patch-options'), self.options.get('patch-binary'), workdir) - call(['patch', 'defconfig'], cwd=workdir, env=env) self.logger.info("Creating default configuration") call(['make', 'defconfig'], cwd=workdir, env=env) self.logger.info("Building") diff --git a/component/busybox/busybox-1.19.3.packed_hack.patch b/component/busybox/busybox-1.19.3.packed_hack.patch deleted file mode 100644 index d5e9593a311eab322a144c6fc233a9f5b74596c0..0000000000000000000000000000000000000000 --- a/component/busybox/busybox-1.19.3.packed_hack.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c -index 2a426db..35f44ac 100644 ---- a/miscutils/ubi_tools.c -+++ b/miscutils/ubi_tools.c -@@ -60,6 +60,16 @@ - //kbuild:lib-$(CONFIG_UBIUPDATEVOL) += ubi_tools.o - - #include "libbb.h" -+#if 1 -+// __packed hack for broken kernel headers ubi-user.h -+// See: https://lkml.org/lkml/2011/6/22/25 -+// Once ubi-user.h is correctly installed without "__packed", or kernel -+// guys correct this another way (with a compiler header??), this can -+// go away. -+# ifndef __packed -+# define __packed __attribute__((packed)) -+# endif // ndef __packed -+#endif // 1 - #include <mtd/ubi-user.h> - - #define OPTION_M (1 << 0) diff --git a/component/ca-certificates/buildout.cfg b/component/ca-certificates/buildout.cfg index a750514041332a71e53079a6a049c3878e5ee983..14faf53769334b4519ab233f435f232d2e0fcbab 100644 --- a/component/ca-certificates/buildout.cfg +++ b/component/ca-certificates/buildout.cfg @@ -1,6 +1,10 @@ # CA certificates [buildout] + +extends = + ../patch/buildout.cfg + parts = ca-certificates @@ -16,6 +20,7 @@ download-only = true recipe = hexagonit.recipe.cmmi version = 20120623 url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_${:version}.tar.gz +patch-binary = ${patch:location}/bin/patch md5sum = 5105d4cc086f0d4ecf7bf2e4c4667289 patches = ${ca-certificates-sbin-dir.patch:location}/${ca-certificates-sbin-dir.patch:filename} diff --git a/component/cloud9/buildout.cfg b/component/cloud9/buildout.cfg index 746e21bc92cd048fef821d0f0df3daf7a7baae82..dd03c6540dad3877bfa3a2440a0e2e75408da470 100644 --- a/component/cloud9/buildout.cfg +++ b/component/cloud9/buildout.cfg @@ -21,20 +21,33 @@ node = nodejs environment = PATH=${nodejs:location}/bin:%(PATH)s -[cloud9-git] +[cloud9-stable] # Online IDE written in javascript/node.js # URL : c9.io # You can use it using the following command : # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} recipe = plone.recipe.command stop-on-error = true -commit = ab689c5d3cc29d02d788506c0f1b2ab0742a0f05 +commit = 97db1467c517d265438684bd2a70b0b76ee282f6 repository = https://github.com/ajaxorg/cloud9.git location = ${buildout:parts-directory}/${:_buildout_section_name_} git-binary = ${git:location}/bin/git -npm-binary = ${nodejs:location}/bin/node ${nodejs:location}/bin/npm -environment = export GIT_SSL_NO_VERIFY=true; export PATH=${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin/:$PATH; export LDFLAGS=-L${libxml2:location}/lib; export HOME=${:location}; -command = ${:environment} (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${node-sm:location}/node_modules/.bin/sm install) || (rm -fr ${:location}; exit 1) +npm-binary = ${nodejs-0.4:location}/bin/node ${npm:location}/bin/npm +command = export GIT_SSL_NO_VERIFY=true; export HOME=${:location}; (${: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) +update-command = + +[cloud9-git] +# Online IDE written in javascript/node.js +# URL : c9.io +# You can use it using the following command : +# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} +recipe = plone.recipe.command +stop-on-error = true +commit = 1f46081df51e6654cef17c205fbf589b219133a7 +repository = https://github.com/ajaxorg/cloud9.git +location = ${buildout:parts-directory}/${:_buildout_section_name_} +environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location}; +command = ${:environment} (git clone --quiet ${:repository} ${:location} && cd ${:location} && git reset --hard ${:commit} && ${node-sm:location}/node_modules/.bin/sm install) || (rm -fr ${:location}; exit 1) update-command = [cloud9-npm] @@ -50,4 +63,4 @@ packages = cloud9==0.7 # Specify environment jsDAV (dependency of cloud9) needs libxml2 environment = - LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib \ No newline at end of file + LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib diff --git a/component/git/buildout.cfg b/component/git/buildout.cfg index 6673e211fb0948e96117f585167d5d68fb82a2cf..9fe74fe4e611f29a3cad7d8ada66ffdab288b4e6 100644 --- a/component/git/buildout.cfg +++ b/component/git/buildout.cfg @@ -21,9 +21,13 @@ configure-options = --with-expat=${libexpat:location} --without-python --without-tcltk - environment = 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 + +[gitweb] +<= git +make-targets = install-gitweb +make-options = bindir="${git:location}/bin/" diff --git a/component/libcap/buildout.cfg b/component/libcap/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7da54d59fd036528dad0c3eed40ad29c76ca26a6 --- /dev/null +++ b/component/libcap/buildout.cfg @@ -0,0 +1,38 @@ +[buildout] + +extends = + ../attr/buildout.cfg + +parts = libcap + +[libcap2] +recipe = slapos.recipe.build +format = no +url = http://pkgs.fedoraproject.org/lookaside/pkgs/libcap/libcap-2.22.tar.bz2/ce64058bdb3f086ddbfca8ce6c919845/libcap-2.22.tar.bz2 +md5sum = ce64058bdb3f086ddbfca8ce6c919845 +attr-include = ${attr:location}/include/ +attr-lib = ${attr:location}/lib/ +slapos_promise = + directory:sbin + directory:usr/include + statlib:lib/libcap.a + file:lib/libcap.so + file:sbin/getcap + file:sbin/setcap +script = + import os + url = self.download(self.options['url'], self.options['md5sum']) + extract_dir = self.extract(url) + workdir = guessworkdir(extract_dir) + cflags = '-I%(attr)s' % {'attr': self.options['attr-include']} + ldflags = '-L%(attr)s -Wl,-rpath=%(attr)s' % {'attr': self.options['attr-lib']} + call(['make', 'CFLAGS=%s' % cflags, 'LDFLAGS=%s' % ldflags, 'DESTDIR=%s' % self.options['location'], 'RAISE_SETFCAP=no', 'install'], + cwd=workdir, env=env) + lib64 = os.path.join(self.options['location'], 'lib64') + lib = os.path.join(self.options['location'], 'lib') + # XXX: Dirty if case + # if lib64 exists, then create a symlink from lib to lib64 + os.path.exists(lib64) and os.symlink(lib64, lib) + +[libcap] +<= libcap2 diff --git a/component/libyaml/buildout.cfg b/component/libyaml/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2b8e7ce4a09b9dc36dda89e8d0fdc0481b8afa63 --- /dev/null +++ b/component/libyaml/buildout.cfg @@ -0,0 +1,9 @@ +[buildout] + +parts = + libyaml + +[libyaml] +recipe = hexagonit.recipe.cmmi +url = http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz +md5sum = 36c852831d02cf90508c29852361d01b diff --git a/component/lxc/buildout.cfg b/component/lxc/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..00a5388608fa89a31c948621b54a5bb2f86084b7 --- /dev/null +++ b/component/lxc/buildout.cfg @@ -0,0 +1,47 @@ +[buildout] + +extends = + ../patch/buildout.cfg + ../attr/buildout.cfg + ../libcap/buildout.cfg + +parts = lxc + +[lxc] +<= lxc-0.8 + +[lxc-0.8.0-rc2-libexecdir-patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +filename = libexecdir-fix.patch +download-only = true +md5sum = d674463ccb3a7c205c2326fb4ab5436b + +[lxc-0.8.0-rc2-lxc-ls-patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +filename = lxc-ls-fix.patch +download-only = true +md5sum = 28c155a554d4f4856351085494585c73 + +[lxc-0.8.0-rc2-cap_get_flag-patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +filename = cap_get_flag-fix.patch +download-only = true +md5sum = 8d3706a9bd60b6ebfea33998644b1a99 + +[lxc-0.8] +recipe = hexagonit.recipe.cmmi +url = http://lxc.sourceforge.net/download/lxc/lxc-0.8.0-rc2.tar.gz +md5sum = 9bd6988542fd7dd198d056ef3a2db9f6 +patch-binary = ${patch:location}/bin/patch +patch-options = -p1 +patches = + ${lxc-0.8.0-rc2-cap_get_flag-patch:location}/${lxc-0.8.0-rc2-cap_get_flag-patch:filename} + ${lxc-0.8.0-rc2-libexecdir-patch:location}/${lxc-0.8.0-rc2-libexecdir-patch:filename} + ${lxc-0.8.0-rc2-lxc-ls-patch:location}/${lxc-0.8.0-rc2-lxc-ls-patch:filename} +environment = + PATH=%(PATH)s:${attr:location}/bin/:${libcap:location}/sbin/ + CFLAGS=-I${libcap:location}/usr/include + LDFLAGS=-L${libcap:location}/lib/ -Wl,-rpath=${libcap:location}/lib/ diff --git a/component/lxc/cap_get_flag-fix.patch b/component/lxc/cap_get_flag-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..8b01f8a8aa7d944df108182844a1c684032db85f --- /dev/null +++ b/component/lxc/cap_get_flag-fix.patch @@ -0,0 +1,53 @@ +commit 94767c5249b5802a894f6d84f6245ef86f50bff3 +Author: Serge Hallyn <serge.hallyn@ubuntu.com> +Date: Fri Jun 29 10:37:07 2012 -0500 + + Fix lxc's handling of CAP_LAST_CAP + + CAP_LAST_CAP in linux/capability.h doesn't always match what the kernel + actually supports. If the kernel supports fewer capabilities, then a + cap_get_flag for an unsupported capability returns -EINVAL. + + Recognize that, and don't fail when initializing capabilities when this + happens, rather accept that we've reached the last capability. + + Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> + +diff --git a/src/lxc/caps.c b/src/lxc/caps.c +index 10a0b4a..c32e7e4 100644 +--- a/src/lxc/caps.c ++++ b/src/lxc/caps.c +@@ -28,6 +28,7 @@ + #include <limits.h> + #include <sys/prctl.h> + #include <sys/capability.h> ++#include <errno.h> + + #include "log.h" + +@@ -90,6 +91,7 @@ int lxc_caps_up(void) + cap_t caps; + cap_value_t cap; + int ret; ++ int lastcap = 0; + + /* when we are run as root, we don't want to play + * with the capabilities */ +@@ -108,9 +110,15 @@ int lxc_caps_up(void) + + ret = cap_get_flag(caps, cap, CAP_PERMITTED, &flag); + if (ret) { +- ERROR("failed to cap_get_flag: %m"); +- goto out; ++ if (errno == EINVAL) { ++ INFO("Last supported cap was %d\n", cap-1); ++ break; ++ } else { ++ ERROR("failed to cap_get_flag: %m"); ++ goto out; ++ } + } ++ lastcap = cap; + + ret = cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap, flag); + if (ret) { diff --git a/component/lxc/libexecdir-fix.patch b/component/lxc/libexecdir-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..f3517ab86fda48fdd37876529be41b32ae015911 --- /dev/null +++ b/component/lxc/libexecdir-fix.patch @@ -0,0 +1,47 @@ +commit 00ad19d4dba5c05401125d4217dc8f4e7fd9403a +Author: David Ward <david.ward@ll.mit.edu> +Date: Fri May 4 00:50:15 2012 +0200 + + lxc-setcap/lxc-setuid: add autoconf expansion for $libexecdir + + Support new default location for LXCINITDIR. + + Signed-off-by: David Ward <david.ward@ll.mit.edu> + Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> + +diff --git a/configure.ac b/configure.ac +index c2bf4b0..0c8aa69 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,6 +40,7 @@ AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"]) + AS_AC_EXPAND(PREFIX, $prefix) + AS_AC_EXPAND(LIBDIR, $libdir) + AS_AC_EXPAND(BINDIR, $bindir) ++AS_AC_EXPAND(LIBEXECDIR, $libexecdir) + AS_AC_EXPAND(INCLUDEDIR, $includedir) + AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) + AS_AC_EXPAND(DATADIR, $datadir) +diff --git a/src/lxc/lxc-setcap.in b/src/lxc/lxc-setcap.in +index 52d4b48..71e3710 100644 +--- a/src/lxc/lxc-setcap.in ++++ b/src/lxc/lxc-setcap.in +@@ -84,6 +84,7 @@ lxc_dropcaps() + shortoptions='hd' + longoptions='help' + libdir=@LIBDIR@ ++libexecdir=@LIBEXECDIR@ + localstatedir=@LOCALSTATEDIR@ + + getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@") +diff --git a/src/lxc/lxc-setuid.in b/src/lxc/lxc-setuid.in +index 0919eac..020dfae 100644 +--- a/src/lxc/lxc-setuid.in ++++ b/src/lxc/lxc-setuid.in +@@ -81,6 +81,7 @@ lxc_dropuid() + shortoptions='hd' + longoptions='help' + libdir=@LIBDIR@ ++libexecdir=@LIBEXECDIR@ + localstatedir=@LOCALSTATEDIR@ + + getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@") diff --git a/component/lxc/lxc-ls-fix.patch b/component/lxc/lxc-ls-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..a9f0556efb0712378f27e79512aeaff3225e8f84 --- /dev/null +++ b/component/lxc/lxc-ls-fix.patch @@ -0,0 +1,201 @@ +commit 7ef0141356454503ab81460290b5dffa32c1f441 +Author: David Ward <david.ward@ll.mit.edu> +Date: Fri May 4 00:50:15 2012 +0200 + + refresh lxc-ls + + Add an '--active' option that lists active containers by searching + cgroups. (Otherwise, the directories in /var/lib/lxc are listed.) + Modify the cgroup search to only use hierarchies that contain one + or more subsystems. When searching, if a hierarchy contains the + 'ns' subsystem, do not append '/lxc' to the parent cgroup. + + Add a '--help' option that prints the command syntax. + + Print error messages and help information to stderr. + + Update the documentation. + + Signed-off-by: David Ward <david.ward@ll.mit.edu> + Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> + +diff --git a/doc/lxc-ls.sgml.in b/doc/lxc-ls.sgml.in +index 3ffd4f8..d33e9b3 100644 +--- a/doc/lxc-ls.sgml.in ++++ b/doc/lxc-ls.sgml.in +@@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + <refsynopsisdiv> + <cmdsynopsis> +- <command>lxc-ls <optional>ls option</optional> ++ <command>lxc-ls <optional>--active</optional> <optional>ls option</optional> + </command> + </cmdsynopsis> + </refsynopsisdiv> +@@ -67,6 +67,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + <varlistentry> + <term> ++ <option><optional>--active</optional></option> ++ </term> ++ <listitem> ++ <para> ++ List active containers. ++ </para> ++ </listitem> ++ </varlistentry> ++ ++ <varlistentry> ++ <term> + <option><optional>ls options</optional></option> + </term> + <listitem> +@@ -94,10 +105,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + </varlistentry> + + <varlistentry> +- <term>lxc-ls -1</term> ++ <term>lxc-ls --active -1</term> + <listitem> + <para> +- list all the containers and display the list in one column. ++ list active containers and display the list in one column. + </para> + </listitem> + </varlistentry> +diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in +index a1ad642..11a3b45 100644 +--- a/src/lxc/lxc-ls.in ++++ b/src/lxc/lxc-ls.in +@@ -1,43 +1,100 @@ + #!/bin/bash + +-localstatedir=@LOCALSTATEDIR@ +-lxcpath=@LXCPATH@ ++# ++# lxc: linux Container library + +-if [ ! -r $lxcpath ]; then +- exit 0 +-fi ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++ ++# This library 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 ++# Lesser General Public License for more details. ++ ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++localstatedir=@LOCALSTATEDIR@ ++lxc_path=@LXCPATH@ + +-function get_cgroup() ++usage() + { +- local mount_string +- mount_string=$(mount -t cgroup |grep -E -e '^lxc ') +- if test -n "$mount_string"; then +- mount_point=$(echo $mount_string |cut -d' ' -f3) +- return +- fi +- mount_string=`grep -m1 -E '^[^ \t]+[ \t]+[^ \t]+[ \t]+cgroup' /proc/self/mounts`; +- if test -z "$mount_string"; then +- echo "failed to find mounted cgroup" +- exit 1 +- fi +- mount_point=`echo "$mount_string" |cut -d' ' -f2`; ++ echo "usage: $(basename $0) [--active] [--] [LS_OPTIONS...]" >&2 + } + +-ls "$@" $lxcpath ++help() { ++ usage ++ echo >&2 ++ echo "List containers existing on the system." >&2 ++ echo >&2 ++ echo " --active list active containers" >&2 ++ echo " LS_OPTIONS ls command options (see \`ls --help')" >&2 ++} ++ ++get_parent_cgroup() ++{ ++ local hierarchies hierarchy fields subsystems init_cgroup mountpoint ++ ++ parent_cgroup="" ++ ++ # Obtain a list of hierarchies that contain one or more subsystems ++ hierarchies=$(tail -n +2 /proc/cgroups | cut -f 2) + +-active=$(netstat -xl 2>/dev/null | grep $lxcpath | \ +- sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#'); ++ # Iterate through the list until a suitable hierarchy is found ++ for hierarchy in $hierarchies; do ++ # Obtain information about the init process in the hierarchy ++ fields=$(grep -E "^$hierarchy:" /proc/1/cgroup | head -n 1) ++ if [ -z "$fields" ]; then continue; fi ++ fields=${fields#*:} + +-if test -n "$active"; then +- get_cgroup +- if test -n "$mount_point"; then +- # get cgroup for init +- init_cgroup=`cat /proc/1/cgroup | awk -F: '{ print $3 }' | head -1` +- if [ ! -d $mount_point/$init_cgroup/lxc ]; then +- cd $mount_point/$init_cgroup ++ # Get a comma-separated list of the hierarchy's subsystems ++ subsystems=${fields%:*} ++ ++ # Get the cgroup of the init process in the hierarchy ++ init_cgroup=${fields#*:} ++ ++ # Get the filesystem mountpoint of the hierarchy ++ mountpoint=$(grep -E "^cgroup [^ ]+ [^ ]+ ([^ ]+,)?$subsystems(,[^ ]+)? " /proc/self/mounts | cut -d ' ' -f 2) ++ if [ -z "$mountpoint" ]; then continue; fi ++ ++ # Return the absolute path to the containers' parent cgroup ++ # (do not append '/lxc' if the hierarchy contains the 'ns' subsystem) ++ if [[ ",$subsystems," == *,ns,* ]]; then ++ parent_cgroup="${mountpoint}${init_cgroup%/}" + else +- cd $mount_point/$init_cgroup/lxc ++ parent_cgroup="${mountpoint}${init_cgroup%/}/lxc" + fi +- ls "$@" -d $active +- fi ++ break ++ done ++} ++ ++directory="$lxc_path" ++ ++for i in "$@"; do ++ case $i in ++ --help) ++ help; exit 1;; ++ --active) ++ get_parent_cgroup; directory="$parent_cgroup"; shift;; ++ --) ++ shift; break;; ++ *) ++ break;; ++ esac ++done ++ ++containers="" ++if [ ! -z "$directory" ]; then ++ containers=$(find $directory -mindepth 1 -maxdepth 1 -type d -printf "%f\n" 2>/dev/null) + fi ++ ++if [ -z "$containers" ]; then ++ echo "$(basename $0): no containers found" >&2 ++ exit 1 ++fi ++ ++cd "$directory" ++ls -d $@ $containers diff --git a/component/nginx/buildout.cfg b/component/nginx/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..bbbd82852242c9205481991d4f042527b1d2ca43 --- /dev/null +++ b/component/nginx/buildout.cfg @@ -0,0 +1,17 @@ +[buildout] +extends = + ../pcre/buildout.cfg + ../zlib/buildout.cfg + ../openssl/buildout.cfg + +parts = nginx + +[nginx] +recipe = hexagonit.recipe.cmmi +url = http://nginx.org/download/nginx-1.0.14.tar.gz +configure-options= + --with-ipv6 + --with-http_ssl_module + --with-ld-opt="-L ${zlib:location}/lib -L ${openssl:location}/lib -L ${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib" + --with-cc-opt="-I ${pcre:location}/include -I ${openssl:location}/include -I ${zlib:location}/include" + diff --git a/component/noVNC/buildout.cfg b/component/noVNC/buildout.cfg index 41b6f8ae2886031efe5dc3c11497f4420a370ec0..2c4dbf793512f5299f2328dba74aca9f36b29ce5 100644 --- a/component/noVNC/buildout.cfg +++ b/component/noVNC/buildout.cfg @@ -4,5 +4,6 @@ parts = [noVNC] recipe = slapos.recipe.build:download-unpacked -url = https://github.com/kanaka/noVNC/tarball/v0.2 +url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.3.tar.gz +md5sum = 95d3c58921fa188c179491e8ef2acc12 strip-top-level-dir = true diff --git a/component/nodejs/buildout.cfg b/component/nodejs/buildout.cfg index 81dddee7b86b9b760b905c5ff8354b759c7e49b3..56d0201733355629e57644e6bddfc099a1a0b267 100644 --- a/component/nodejs/buildout.cfg +++ b/component/nodejs/buildout.cfg @@ -3,7 +3,6 @@ extends = ../git/buildout.cfg ../pkgconfig/buildout.cfg ../openssl/buildout.cfg - ../python-2.7/buildout.cfg ../zlib/buildout.cfg parts = @@ -12,14 +11,14 @@ parts = [nodejs] # Server-side Javascript. recipe = hexagonit.recipe.cmmi -url = http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz -md5sum = f5669a9717422b811c6bad1cc961b1e5 +url = http://nodejs.org/dist/v0.6.21/node-v0.6.21.tar.gz +md5sum = 0da985a0bf820400af92363b9f453fe4 configure-options = --openssl-includes=${openssl:location}/include --openssl-libpath=${openssl:location}/lib environment = HOME=${buildout:parts-directory}/${:_buildout_section_name_} - PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s + PATH=${pkgconfig:location}/bin:%(PATH)s PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/ CPPFLAGS=-I${zlib:location}/include LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib @@ -32,7 +31,7 @@ configure-options = --openssl-includes=${openssl:location}/include --openssl-libpath=${openssl:location}/lib environment = - PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s + PATH=${pkgconfig:location}/bin:%(PATH)s PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/ CPPFLAGS=-I${zlib:location}/include LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib diff --git a/component/openssl/buildout.cfg b/component/openssl/buildout.cfg index b7b27e6f77ab881203cbe0d03fd13e01b5f71b2b..8b45de11ed17969edc7c70e277d1750c46d8cc59 100644 --- a/component/openssl/buildout.cfg +++ b/component/openssl/buildout.cfg @@ -7,6 +7,7 @@ extends = ../ca-certificates/buildout.cfg ../zlib/buildout.cfg + ../patch/buildout.cfg parts = openssl @@ -30,6 +31,7 @@ download-only = true recipe = hexagonit.recipe.cmmi url = https://www.openssl.org/source/openssl-1.0.1c.tar.gz md5sum = ae412727c8c15b67880aef7bd2999b2e +patch-binary = ${patch:location}/bin/patch patches = ${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename} ${openssl-exlibs.patch:location}/${openssl-exlibs.patch:filename} diff --git a/component/pkgconfig/buildout.cfg b/component/pkgconfig/buildout.cfg index 0166d3938249f61c089c881663e6da74fcf23d63..29cb14233367658ff27fb1b36bd5766fa3be77a5 100644 --- a/component/pkgconfig/buildout.cfg +++ b/component/pkgconfig/buildout.cfg @@ -11,7 +11,7 @@ extends = [pkgconfig] recipe = hexagonit.recipe.cmmi -url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz +url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz md5sum = 47525c26a9ba7ba14bf85e01509a7234 location = ${buildout:parts-directory}/${:_buildout_section_name_} # build pkg-config twice so that second configure can use pkg-config diff --git a/component/ruby/buildout.cfg b/component/ruby/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c326072925d137c55e139ca9c9a69a8548c8c050 --- /dev/null +++ b/component/ruby/buildout.cfg @@ -0,0 +1,22 @@ +[buildout] + +extends = + ../libyaml/buildout.cfg + +parts = ruby + +[ruby-1.9.3] +recipe = hexagonit.recipe.cmmi +url = http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz +md5sum = bc0c715c69da4d1d8bd57069c19f6c0e +configure-options = + --enable-shared --enable-rpath +environment = + CFLAGS=-I${libyaml:location}/include + LDFLAGS=-L${libyaml:location}/lib -Wl,-rpath=${libyaml:location}/lib + +[ruby-1.9] +<= ruby-1.9.3 + +[ruby] +<= ruby-1.9 diff --git a/component/slapos/buildout.cfg b/component/slapos/buildout.cfg index 12c37dbc14de0ca733b83159fb479f9f75fc53a0..032f09b79aa1b755b446120095815d9a2976efc2 100644 --- a/component/slapos/buildout.cfg +++ b/component/slapos/buildout.cfg @@ -19,6 +19,7 @@ extends = ../sqlite3/buildout.cfg ../swig/buildout.cfg ../zlib/buildout.cfg + ../patch/buildout.cfg parts = slapos @@ -47,7 +48,7 @@ allowed-eggs-from-site-packages = [environment] # Note: For now original PATH is appeneded to the end, as not all tools are # provided by SlapOS -PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:$PATH +PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:${patch:location}/bin:$PATH CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include CPPFLAGS=${:CFLAGS} LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib @@ -110,12 +111,11 @@ scripts = slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl slapgrid-supervisord = slapos.grid.svcbackend:supervisord slapproxy = slapos.proxy:main + slapos = slapos.entry:main [versions] zc.buildout = 1.6.0-dev-SlapOS-006 -hexagonit.recipe.download = 1.5.1-dev-slapos-002 -# Generated by buildout-versions Jinja2 = 2.6 Pygments = 1.5 Werkzeug = 0.8.3 @@ -124,17 +124,17 @@ collective.recipe.template = 1.9 docutils = 0.9.1 hexagonit.recipe.cmmi = 1.6 ipython = 0.13 -lxml = 2.3.4 +lxml = 2.3.5 meld3 = 0.6.8 netaddr = 0.7.7 -slapos.core = 0.26.1 +slapos.core = 0.28.5 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.26.1 +# slapos.core==0.28.5 Flask = 0.9 # Required by: @@ -142,11 +142,15 @@ Flask = 0.9 Sphinx = 1.1.3 # Required by: -# slapos.core==0.26.1 +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 + +# Required by: +# slapos.core==0.28.5 netifaces = 0.8 # Required by: -# slapos.core==0.26.1 +# slapos.core==0.28.5 # slapos.libnetworkcache==0.12 # supervisor==3.0a12 # zc.buildout==1.6.0-dev-SlapOS-006 @@ -154,9 +158,9 @@ netifaces = 0.8 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.core==0.26.1 +# slapos.core==0.28.5 supervisor = 3.0a12 # Required by: -# slapos.core==0.26.1 +# slapos.core==0.28.5 zope.interface = 4.0.1 diff --git a/component/tar/buildout.cfg b/component/tar/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..860902e1061b575323950191fba7ad9f420fa587 --- /dev/null +++ b/component/tar/buildout.cfg @@ -0,0 +1,22 @@ +[buildout] + +parts = tar + +[tar-drop.gets.patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +md5sum = 9352820566aa3534a04bd269c9f89f48 +download-only = true +filename = drop.gets.patch + +[tar] +virtual-depends = ${tar-drop.gets.patch:md5sum} +patch-options = -p1 +patches = + ${tar-drop.gets.patch:location}/${tar-drop.gets.patch:filename} + +recipe = hexagonit.recipe.cmmi +url = http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz +md5sum = 00d1e769c6af702c542cca54b728920d +environment = + FORCE_UNSAFE_CONFIGURE=1 diff --git a/component/tar/drop.gets.patch b/component/tar/drop.gets.patch new file mode 100644 index 0000000000000000000000000000000000000000..1a4f4d8863671aaeff9e9496cab19a08f0b4c347 --- /dev/null +++ b/component/tar/drop.gets.patch @@ -0,0 +1,14 @@ +diff -ur tar-1.26.orig/gnu/stdio.in.h tar-1.26/gnu/stdio.in.h +--- tar-1.26.orig/gnu/stdio.in.h 2011-03-12 10:14:33.000000000 +0100 ++++ tar-1.26/gnu/stdio.in.h 2012-08-24 15:35:22.299190847 +0200 +@@ -164,7 +164,10 @@ + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ + #undef gets ++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif ++ + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/component/xz-utils/buildout.cfg b/component/xz-utils/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..a8399ea140cb0d8f3bc6a48a4f2914d912bf7b22 --- /dev/null +++ b/component/xz-utils/buildout.cfg @@ -0,0 +1,8 @@ +[buidout] +parts = + xz-utils + +[xz-utils] +recipe = hexagonit.recipe.cmmi +url = http://tukaani.org/xz/xz-5.0.4.tar.gz +md5sum = df3df690aef18384e1e031be7ec3a964 diff --git a/component/zabbix/buildout.cfg b/component/zabbix/buildout.cfg index 53248664d8a003caa804222a72e86f1a7e7ff023..cb67e7ab65161581787d91ff46783f2cfd45a978 100644 --- a/component/zabbix/buildout.cfg +++ b/component/zabbix/buildout.cfg @@ -4,8 +4,8 @@ parts = [zabbix-agent] recipe = hexagonit.recipe.cmmi -url = http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.10.tar.gz?download -md5sum = 7e89f80c1822787c0831f7c0dbefcd7b +url = http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.1.tar.gz?download +md5sum = 3b301aa4f2b7cb5ede46884b9c7873e1 configure-options = --enable-agent --enable-ipv6 diff --git a/setup.py b/setup.py index e8cbcf89dfa8f90a4c1a3f3354db456ca5c790d5..a415860f60e907e17ffe6f0d240144fc611cdaec 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import glob import os -version = '0.59-dev' +version = '0.65-dev' name = 'slapos.cookbook' long_description = open("README.txt").read() + "\n" + \ open("CHANGES.txt").read() + "\n" @@ -45,98 +45,103 @@ setup(name=name, 'apachephp = slapos.recipe.apachephp:Recipe', 'apacheproxy = slapos.recipe.apacheproxy:Recipe', 'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe', - 'certificate_authority = slapos.recipe.certificate_authority:Recipe', 'certificate_authority.request = slapos.recipe.certificate_authority:Request', + 'certificate_authority = slapos.recipe.certificate_authority:Recipe', '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', + 'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe', 'cron.d = slapos.recipe.dcron:Part', + 'cron = slapos.recipe.dcron:Recipe', 'davstorage = slapos.recipe.davstorage:Recipe', - 'dropbear = slapos.recipe.dropbear:Recipe', + 'downloader = slapos.recipe.downloader:Recipe', 'dropbear.add_authorized_key = slapos.recipe.dropbear:AddAuthorizedKey', 'dropbear.client = slapos.recipe.dropbear:Client', + 'dropbear = slapos.recipe.dropbear:Recipe', 'duplicity = slapos.recipe.duplicity:Recipe', - 'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe', 'equeue = slapos.recipe.equeue:Recipe', + 'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe', + 'erp5.promise = slapos.recipe.erp5_promise:Recipe', + 'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe', + 'erp5.test = slapos.recipe.erp5_test:Recipe', + 'erp5.update = slapos.recipe.erp5_update:Recipe', + 'firefox = slapos.recipe.firefox:Recipe', + 'fontconfig = slapos.recipe.fontconfig:Recipe', 'generate.mac = slapos.recipe.generatemac:Recipe', 'generate.password = slapos.recipe.generatepassword:Recipe', - 'nbdserver = slapos.recipe.nbdserver:Recipe', - 'onetimeupload = slapos.recipe.onetimeupload:Recipe', - 'helloworld = slapos.recipe.helloworld:Recipe', 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', - 'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe', - 'egg_test = slapos.recipe.erp5_test:EggTestRecipe', - 'firefox = slapos.recipe.firefox:Recipe', - 'fontconfig = slapos.recipe.fontconfig:Recipe', + 'generic.kumofs = slapos.recipe.generic_kumofs:Recipe', + 'generic.memcached = slapos.recipe.generic_memcached:Recipe', + 'generic.mysql = slapos.recipe.generic_mysql:Recipe', + 'generic.varnish = slapos.recipe.generic_varnish:Recipe', + 'generic.zope = slapos.recipe.generic_zope:Recipe', + 'generic.zope.zeo.client = slapos.recipe.generic_zope_zeo_client:Recipe', + 'gitinit = slapos.recipe.gitinit:Recipe', + 'haproxy = slapos.recipe.haproxy:Recipe', + 'helloworld = slapos.recipe.helloworld:Recipe', 'java = slapos.recipe.java:Recipe', 'kumofs = slapos.recipe.kumofs:Recipe', - 'kvm = slapos.recipe.kvm:Recipe', 'kvm.frontend = slapos.recipe.kvm_frontend:Recipe', - 'generic.kumofs = slapos.recipe.generic_kumofs:Recipe', - 'haproxy = slapos.recipe.haproxy:Recipe', - 'libcloud = slapos.recipe.libcloud:Recipe', + 'kvm = slapos.recipe.kvm:Recipe', + 'lamp.request = slapos.recipe.lamp:Request', + 'lamp.simple = slapos.recipe.lamp:Simple', + 'lamp = slapos.recipe.lamp:Request', + 'lamp.static = slapos.recipe.lamp:Static', 'libcloudrequest = slapos.recipe.libcloudrequest:Recipe', + 'libcloud = slapos.recipe.libcloud:Recipe', 'lockfile = slapos.recipe.lockfile:Recipe', + 'logrotate.d = slapos.recipe.logrotate:Part', + 'logrotate = slapos.recipe.logrotate:Recipe', 'memcached = slapos.recipe.memcached:Recipe', - 'generic.memcached = slapos.recipe.generic_memcached:Recipe', - 'mysql = slapos.recipe.mysql:Recipe', - 'mydumper = slapos.recipe.mydumper:Recipe', - 'generic.mysql = slapos.recipe.generic_mysql:Recipe', 'mkdirectory = slapos.recipe.mkdirectory:Recipe', + 'mydumper = slapos.recipe.mydumper:Recipe', + 'mysql = slapos.recipe.mysql:Recipe', + 'nbdserver = slapos.recipe.nbdserver:Recipe', 'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed', - 'notifier = slapos.recipe.notifier:Recipe', 'notifier.callback = slapos.recipe.notifier:Callback', 'notifier.notify = slapos.recipe.notifier:Notify', + 'notifier = slapos.recipe.notifier:Recipe', 'novnc = slapos.recipe.novnc:Recipe', - 'lamp = slapos.recipe.lamp:Request', - 'lamp.request = slapos.recipe.lamp:Request', - 'lamp.static = slapos.recipe.lamp:Static', - 'lamp.simple = slapos.recipe.lamp:Simple', - 'logrotate = slapos.recipe.logrotate:Recipe', - 'logrotate.d = slapos.recipe.logrotate:Part', + 'onetimeupload = slapos.recipe.onetimeupload:Recipe', 'pbs = slapos.recipe.pbs:Recipe', + 'proactive = slapos.recipe.proactive:Recipe', 'publish = slapos.recipe.publish:Recipe', 'publishurl = slapos.recipe.publishurl:Recipe', 'pwgen = slapos.recipe.pwgen:Recipe', 'pwgen.stable = slapos.recipe.pwgen:StablePasswordGeneratorRecipe', - 'proactive = slapos.recipe.proactive:Recipe', + 'requestoptional = slapos.recipe.requestoptional:Recipe', 'request = slapos.recipe.request:Recipe', 'seleniumrunner = slapos.recipe.seleniumrunner:Recipe', 'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed', - 'shell = slapos.recipe.shell:Recipe', 'shellinabox = slapos.recipe.shellinabox:Recipe', - 'slapconfiguration = slapos.recipe.slapconfiguration:Recipe', - 'symbolic.link = slapos.recipe.symbolic_link:Recipe', - 'softwaretype = slapos.recipe.softwaretype:Recipe', - 'siptester = slapos.recipe.siptester:SipTesterRecipe', + 'shell = slapos.recipe.shell:Recipe', + 'signalwrapper= slapos.recipe.signal_wrapper:Recipe', 'simplelogger = slapos.recipe.simplelogger:Recipe', - 'slaprunner = slapos.recipe.slaprunner:Recipe', + 'siptester = slapos.recipe.siptester:SipTesterRecipe', + 'slapconfiguration = slapos.recipe.slapconfiguration:Recipe', + 'slapcontainer = slapos.recipe.container: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', + 'slaprunner = slapos.recipe.slaprunner:Recipe', + 'softwaretype = slapos.recipe.softwaretype:Recipe', 'sphinx= slapos.recipe.sphinx:Recipe', + 'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request', + 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'stunnel = slapos.recipe.stunnel:Recipe', + 'symbolic.link = slapos.recipe.symbolic_link:Recipe', 'testnode = slapos.recipe.testnode:Recipe', + 'tidstorage = slapos.recipe.tidstorage:Recipe', 'urlparse = slapos.recipe._urlparse:Recipe', + 'uuid = slapos.recipe._uuid:Recipe', 'vifib = slapos.recipe.vifib:Recipe', 'waitfor = slapos.recipe.waitfor:Recipe', + 'webchecker = slapos.recipe.web_checker:Recipe', + 'wrapper = slapos.recipe.wrapper:Recipe', 'xvfb = slapos.recipe.xvfb:Recipe', 'xwiki = slapos.recipe.xwiki:Recipe', 'zabbixagent = slapos.recipe.zabbixagent:Recipe', - 'generic.zope = slapos.recipe.generic_zope:Recipe', - 'generic.zope.zeo.client = slapos.recipe.generic_zope_zeo_client:Recipe', 'zeo = slapos.recipe.zeo:Recipe', - 'tidstorage = slapos.recipe.tidstorage:Recipe', - 'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe', - 'erp5.promise = slapos.recipe.erp5_promise:Recipe', - 'erp5.update = slapos.recipe.erp5_update:Recipe', - '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/_uuid.py b/slapos/recipe/_uuid.py new file mode 100644 index 0000000000000000000000000000000000000000..bcd12e1e0c0784e1df94ba20cc9ccb64de66ace2 --- /dev/null +++ b/slapos/recipe/_uuid.py @@ -0,0 +1,55 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import uuid + +import os + +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + + def _options(self, options): + write = True + if os.path.exists(options['cache-file']): + with open(options['cache-file'], 'r') as cache_file: + try: + generated_uuid = uuid.UUID(hex=cache_file.read()) + write = False + except ValueError: + generated_uuid = uuid.uuid4() + else: + generated_uuid = uuid.uuid4() + + if write: + with open(options['cache-file'], 'w') as cache_file: + cache_file.write(generated_uuid.hex) + + options['uuid'] = generated_uuid.hex + + def install(self): + return [] diff --git a/slapos/recipe/check_url_available/template/check_url.in b/slapos/recipe/check_url_available/template/check_url.in index 2b61fd088d1e01c08e5f980a25fb220fd1960747..01dc4727e99a2e86e1bf5d5a2d6f61bf7ca478c3 100644 --- a/slapos/recipe/check_url_available/template/check_url.in +++ b/slapos/recipe/check_url_available/template/check_url.in @@ -3,14 +3,20 @@ # BEWARE: It will be overwritten automatically URL="%(url)s" + +if [ -z $URL ]; then + echo "No URL specified." >&2 + exit 3 +fi + 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 + 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 + echo "$URL is not available (returned $CODE)." >&2 exit 2 fi diff --git a/slapos/recipe/container.py b/slapos/recipe/container.py new file mode 100644 index 0000000000000000000000000000000000000000..96dbb2113d646584d018d91cb9bc7202768a2714 --- /dev/null +++ b/slapos/recipe/container.py @@ -0,0 +1,92 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import ConfigParser +import uuid +import os +import subprocess + +# XXX : This is in order to get the computer_partition object +# which exposes the state of the current partition. +# +# XXX : We could have modify slapgrid in order to put the +# state of the current partition offline. But this is +# written to have the most minimal impact. +from slapos.recipe.librecipe import GenericSlapRecipe +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericSlapRecipe): + + def _options(self, options): + config_filename = self.options['config'] + + container_uuid = None + + if os.path.exists(config_filename): + config = ConfigParser.ConfigParser() + config.read(config_filename) + if config.has_option('requested', 'name'): + container_uuid = uuid.UUID(hex=config.get('requested', 'name')) + + if container_uuid is None: + # uuid wasn't generated at first in order to avoid + # wasting entropy + container_uuid = uuid.uuid4() + + options['slapcontainer-name'] = container_uuid.hex + + return options + + + + def _install(self): + path_list = [] + + self.logger.info("Putting slapcontainer configuration file...") + + config = ConfigParser.ConfigParser() + config.add_section('requested') + config.set('requested', 'status', + self.computer_partition.getState()) + config.set('requested', 'name', self.options['slapcontainer-name']) + config.add_section('rootfs') + config.set('rootfs', 'image', self.options['image']) + config.set('rootfs', 'complete', self.options['image-complete']) + config.add_section('network') + config.set('network', 'interface', self.options['interface']) + config.add_section('config') + config.set('config', 'file', self.options['lxc-config']) + + # Just a touch + open(self.options['lxc-config'], 'a').close() + + config_filename = self.options['config'] + with open(config_filename, 'w') as config_file: + config.write(config_file) + path_list.append(config_filename) + + return path_list diff --git a/slapos/recipe/downloader.py b/slapos/recipe/downloader.py new file mode 100644 index 0000000000000000000000000000000000000000..6c18969aaf7f11f4f1cdc267182fab32b4fc05ee --- /dev/null +++ b/slapos/recipe/downloader.py @@ -0,0 +1,119 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import os +import urllib +import hashlib +import tempfile +import shutil +import subprocess + +from slapos.recipe.librecipe import GenericBaseRecipe + +BUFFER_SIZE = 1024 + +def service(args): + environ = os.environ.copy() + environ.update(PATH=args['path']) + if not os.path.exists(args['confirm']): + tmpdir = tempfile.mkdtemp() + try: + # XXX: Hardcoded path + tmpoutput = os.path.join(tmpdir, 'downloaded') + urllib.urlretrieve(args['url'], tmpoutput) + + if args['md5'] is not None: + # XXX: we need to find a better way to do a md5sum + md5sum = hashlib.md5() + with open(args['output'], 'r') as output: + file_buffer = output.read(BUFFER_SIZE) + while len(file_buffer) > 0: + md5sum.update(file_buffer) + file_buffer = output.read(BUFFER_SIZE) + + if args['md5'] != md5sum.hexdigest(): + return 127 # Not-null return code + + if not args['archive']: + shutil.move(tmpoutput, args['output']) + else: + # XXX: hardcoding path + extract_dir = os.path.join(tmpdir, 'extract') + os.mkdir(extract_dir) + subprocess.check_call( + ['tar', '-x', '-f', tmpoutput, + '-C', extract_dir, + ], + env=environ, + ) + archive_content = os.listdir(extract_dir) + if len(archive_content) == 1 and \ + os.path.isfile(os.path.join(extract_dir, + archive_content[0])): + shutil.move(os.path.join(extract_dir, + archive_content[0]), + args['output']) + else: + return 127 # Not-null return code + + finally: + shutil.rmtree(tmpdir) + + # Just a touch on args['confirm'] file + open(args['confirm'], 'w').close() + + return 0 + + + +class Recipe(GenericBaseRecipe): + + def install(self): + path_list = [] + + md5sum = self.options.get('md5sum', '') + if len(md5sum) == 0: + md5sum = None + + keywords = { + 'url': self.options['url'], + 'md5': md5sum, + 'output': self.options['downloaded-file'], + 'confirm': self.options['downloaded-file-complete'], + 'archive': self.optionIsTrue('archive', False), + } + if keywords['archive']: + keywords['path'] = self.options['path'] + path_list.append( + self.createPythonScript( + self.options['binary'], + 'slapos.recipe.downloader.service', + keywords, + ) + ) + + return path_list diff --git a/slapos/recipe/fontconfig/__init__.py b/slapos/recipe/fontconfig/__init__.py index c60e42b5aa6a608ccba654d7d49bbd98f2e4c3ea..d52496aec798ee58ce1c37b625a84e1b1fbcca46 100644 --- a/slapos/recipe/fontconfig/__init__.py +++ b/slapos/recipe/fontconfig/__init__.py @@ -77,7 +77,7 @@ class Recipe(GenericBaseRecipe): onetimedownload_config['url'] = url onetimedownload_config['file_path'] = file_path onetimedownload_runner_path = self.createExecutable(bin_path, - self.substituteTemplate(wrapper_template_location, + self.substituteTemplate(wrapper_template_location, onetimedownload_config)) created_file_list.append(onetimedownload_runner_path) diff --git a/slapos/recipe/gitinit.py b/slapos/recipe/gitinit.py new file mode 100644 index 0000000000000000000000000000000000000000..409113c185081158f3775283f7dfa0a9afbd3ca5 --- /dev/null +++ b/slapos/recipe/gitinit.py @@ -0,0 +1,49 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +import json +import os + +from subprocess import check_call + +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + + def install(self): + + repolist = json.loads(self.options['repos']) + for repo, desc in repolist.iteritems(): + absolute_path = os.path.join(self.options['base-directory'], '%s.git' % repo) + if not os.path.exists(absolute_path): + check_call([self.options['git-binary'], 'init', + '--bare', absolute_path]) + # XXX: Hardcoded path + description_filename = os.path.join(absolute_path, 'description') + with open(description_filename, 'w') as description_file: + description_file.write(desc) + + return [] diff --git a/slapos/recipe/haproxy/__init__.py b/slapos/recipe/haproxy/__init__.py index ac7a0643311b0215069764acbfafbadc98870a74..2fcc5e33652105f286b9752516564fd4f6a12f1f 100644 --- a/slapos/recipe/haproxy/__init__.py +++ b/slapos/recipe/haproxy/__init__.py @@ -77,13 +77,13 @@ class Recipe(GenericBaseRecipe): i += 1 server_snippet += self.substituteTemplate( snippet_filename, dict( - name='%s_%s' % (name, i), + name='%s_%s' % (name, i), address=address, cluster_zope_thread_amount=self.options['maxconn'])) config = dict( - name=name, - ip=self.options['ip'], + name=name, + ip=self.options['ip'], port=self.options['port'], server_text=server_snippet, server_check_path=self.options['server-check-path'],) diff --git a/slapos/recipe/kumofs/__init__.py b/slapos/recipe/kumofs/__init__.py index f2e928970800366d11433dfcf15cf33cf71dc9d2..59de986a009f9ad1db1fd7030e63fd332efb6fa6 100644 --- a/slapos/recipe/kumofs/__init__.py +++ b/slapos/recipe/kumofs/__init__.py @@ -43,15 +43,15 @@ class Recipe(BaseSlapRecipe): # XXX-Cedric : add logrotate? self.cron_d = self.installCrond() kumo_conf = self.installKumo(self.getLocalIPv4Address()) - + ca_conf = self.installCertificateAuthority() key, certificate = self.requestCertificate('Login Based Access') - + stunnel_conf = self.installStunnel(self.getGlobalIPv6Address(), self.getLocalIPv4Address(), 12345, kumo_conf['kumo_gateway_port'], certificate, key, ca_conf['ca_crl'], ca_conf['certificate_authority_path']) - + self.linkBinary() self.setConnectionDict(dict( stunnel_ip = stunnel_conf['public_ip'], @@ -80,7 +80,7 @@ class Recipe(BaseSlapRecipe): os.symlink(target, link) self.logger.debug('Created link %r -> %r' % (link, target)) self.path_list.append(link) - + def installCrond(self): timestamps = self.createDataDirectory('cronstamps') @@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe): )[0] self.path_list.append(wrapper) return cron_d - + def installLogrotate(self): """Installs logortate main configuration file and registers its to cron""" logrotate_d = os.path.abspath(os.path.join(self.etc_directory, diff --git a/slapos/recipe/kvm_frontend/__init__.py b/slapos/recipe/kvm_frontend/__init__.py index 0da2573480b73e3aa0d0c62c739991a0ebc5cd87..8d03b32e45a75e63b48b097673bea66fdb2c75c8 100644 --- a/slapos/recipe/kvm_frontend/__init__.py +++ b/slapos/recipe/kvm_frontend/__init__.py @@ -26,6 +26,7 @@ ############################################################################## from slapos.recipe.librecipe import GenericBaseRecipe, GenericSlapRecipe import json +import traceback import zc.buildout class Recipe(GenericSlapRecipe): @@ -127,11 +128,15 @@ class Recipe(GenericSlapRecipe): # Send connection parameters of slave instances site_url = "https://%s:%s/" % (self.options['domain'], self.options['port']) for slave in rewrite_rule_list: - self.setConnectionDict( - dict(url="%s%s" % (site_url, slave['resource']), - domainname=self.options['domain'], - port=self.options['port'], - resource=slave['resource']), - slave['reference']) + try: + self.setConnectionDict( + dict(url="%s%s" % (site_url, slave['resource']), + domainname=self.options['domain'], + port=str(self.options['port']), + resource=slave['resource']), + slave['reference']) + except: + self.logger.fatal("Error while sending slave %s informations: %s", + slave['reference'], traceback.format_exc()) return [map_file, conf_file, runner_path] diff --git a/slapos/recipe/lamp/__init__.py b/slapos/recipe/lamp/__init__.py index 710cc076032c2692df652dd9e354ef53695572b0..0dee5db1ba6962bb7b720eb8744388ab89434987 100644 --- a/slapos/recipe/lamp/__init__.py +++ b/slapos/recipe/lamp/__init__.py @@ -158,7 +158,7 @@ class BaseRecipe(BaseSlapRecipe): open(destination, 'w').write(open(template, 'r').read() % d) def configureInstallation(self, document_root, url, mysql_conf): - """Start process which can launch python scripts, move or remove files or + """Start process which can launch python scripts, move or remove files or directories when installing software. """ if not self.options.has_key('delete') and not self.options.has_key('rename') and not\ @@ -179,7 +179,7 @@ class BaseRecipe(BaseSlapRecipe): else: argument = argument + ["-f", self.options['file_token'].strip()] argument += ["-t", document_root] - + if self.options.has_key('delete'): delete = ["delete"] for fname in self.options['delete'].split(','): @@ -231,7 +231,7 @@ class Simple(BaseRecipe): url = self.installApache(document_root) renamed = self.configureInstallation(document_root, url, mysql_conf) connectionDict = dict( - url=url, + url=url, **mysql_conf ) if not renamed == "": diff --git a/slapos/recipe/lamp/runner.py b/slapos/recipe/lamp/runner.py index 8ec60ce88a9ec26dda687520d288b148509019c3..b4ef29890ffa5ee3934f446a3689368d15e94012 100644 --- a/slapos/recipe/lamp/runner.py +++ b/slapos/recipe/lamp/runner.py @@ -1,8 +1,8 @@ import sys import subprocess - + def executeRunner(args): - """Start the instance configure. this may run a python script, move or/and rename + """Start the instance configure. this may run a python script, move or/and rename file or directory when dondition is filled. the condition may be when file exist or when an entry exist into database. """ diff --git a/slapos/recipe/librecipe/execute.py b/slapos/recipe/librecipe/execute.py index c28648afad7b997068084c4eea11a3757a361aef..1b229bb9285f3de095662e4f47bc41fd10efc56a 100644 --- a/slapos/recipe/librecipe/execute.py +++ b/slapos/recipe/librecipe/execute.py @@ -47,15 +47,13 @@ def _wait_files_creation(file_list): def execute(args): """Portable execution with process replacement""" - # Note: Candidate for slapos.lib.recipe - os.execv(args[0], args + sys.argv[1:]) + # XXX: Kept for backward compatibility + generic_exec([args, None, None]) def execute_wait(args): """Execution but after all files in args[1] exists""" - exec_list = list(args[0]) - file_list = list(args[1]) - _wait_files_creation(file_list) - os.execv(exec_list[0], exec_list + sys.argv[1:]) + # XXX: Kept for backward compatibility + generic_exec([args[0], args[1], None]) child_pg = None @@ -63,23 +61,27 @@ child_pg = None def executee(args): """Portable execution with process replacement and environment manipulation""" - exec_list = list(args[0]) - environment = args[1] - env = os.environ.copy() - for k,v in environment.iteritems(): - env[k] = v - os.execve(exec_list[0], exec_list + sys.argv[1:], env) + # XXX: Kept for backward compatibility + generic_exec([args[0], None, args[1]]) def executee_wait(args): """Portable execution with process replacement and environment manipulation""" + # XXX: Kept for backward compatibility + generic_exec(args) + +def generic_exec(args): exec_list = list(args[0]) - file_list = list(args[1]) - environment = args[2] - env = os.environ.copy() - for k,v in environment.iteritems(): - env[k] = v - _wait_files_creation(file_list) - os.execve(exec_list[0], exec_list + sys.argv[1:], env) + file_list = args[1] + environment_overriding = args[2] + + exec_env = os.environ.copy() + if environment_overriding is not None: + exec_env.update(environment_overriding) + + if file_list is not None: + _wait_files_creation(file_list) + + os.execve(exec_list[0], exec_list + sys.argv[1:], exec_env) def sig_handler(signal, frame): print 'Received signal %r, killing children and exiting' % signal diff --git a/slapos/recipe/logrotate.py b/slapos/recipe/logrotate.py index 06a455379e5b539600a3ea52f4c51f6bbca83e3c..1c8b7856a3d02789768ebe02b617198a9d9873e6 100644 --- a/slapos/recipe/logrotate.py +++ b/slapos/recipe/logrotate.py @@ -41,7 +41,7 @@ class Recipe(GenericBaseRecipe): 'include %s' % logrotate_d, ] - logrotate_conf_file = self.createFile(logrotate_conf_file, + logrotate_conf_file = self.createFile(logrotate_conf_file, '\n'.join(logrotate_conf)) state_file = self.options['state-file'] diff --git a/slapos/recipe/memcached/__init__.py b/slapos/recipe/memcached/__init__.py index 431ebe156592a42cc666263a2ff2a135f79cc787..a8f75ab48c07d2cd95857c780f3050a15fc3979b 100644 --- a/slapos/recipe/memcached/__init__.py +++ b/slapos/recipe/memcached/__init__.py @@ -44,7 +44,7 @@ class Recipe(BaseSlapRecipe): self.cron_d = self.installCrond() memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(), port=11000) - + ca_conf = self.installCertificateAuthority() key, certificate = self.requestCertificate('Memcached') @@ -52,7 +52,7 @@ class Recipe(BaseSlapRecipe): self.getLocalIPv4Address(), 12345, memcached_conf['memcached_port'], certificate, key, ca_conf['ca_crl'], ca_conf['certificate_authority_path']) - + self.linkBinary() self.setConnectionDict(dict( stunnel_ip = stunnel_conf['public_ip'], @@ -81,7 +81,7 @@ class Recipe(BaseSlapRecipe): os.symlink(target, link) self.logger.debug('Created link %r -> %r' % (link, target)) self.path_list.append(link) - + def installCrond(self): timestamps = self.createDataDirectory('cronstamps') cron_output = os.path.join(self.log_directory, 'cron-output') @@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe): )[0] self.path_list.append(wrapper) return cron_d - + def installLogrotate(self): """Installs logortate main configuration file and registers its to cron""" logrotate_d = os.path.abspath(os.path.join(self.etc_directory, diff --git a/slapos/recipe/mysql/__init__.py b/slapos/recipe/mysql/__init__.py index e8c8d8201aa42a1906769eb72a7dfc9ce431d079..d3b4a6d441bd889a4dd0e8444d1aee2ccf1bbd89 100644 --- a/slapos/recipe/mysql/__init__.py +++ b/slapos/recipe/mysql/__init__.py @@ -107,6 +107,7 @@ class Recipe(GenericBaseRecipe): mysql_binary=mysql_binary, socket=socket, configuration_file=mysql_conf_file, + cwd=self.options['mysql-base-directory'], ) ) path_list.append(mysqld) diff --git a/slapos/recipe/mysql/mysql.py b/slapos/recipe/mysql/mysql.py index 24812bc8503756845f016acd07089819bfdf66d9..6b0074b361bfe40202b6f8dcb62e40995ae9ee72 100644 --- a/slapos/recipe/mysql/mysql.py +++ b/slapos/recipe/mysql/mysql.py @@ -17,7 +17,7 @@ def runMysql(conf): popen = subprocess.Popen([conf['mysql_install_binary'], '--skip-name-resolve', '--skip-host-cache', '--no-defaults', '--datadir=%s' % conf['data_directory']], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=conf['cwd']) result = popen.communicate()[0] if popen.returncode is None or popen.returncode != 0: print "Failed to initialise server.\nThe error was: %s" % result diff --git a/slapos/recipe/nosqltestbed/kumo/__init__.py b/slapos/recipe/nosqltestbed/kumo/__init__.py index 1d3f2cc4ad6bd1ed9f324f3209d9acec7d286a79..cbc11bf18b1b2632d491927e4d000a2fd9abd265 100644 --- a/slapos/recipe/nosqltestbed/kumo/__init__.py +++ b/slapos/recipe/nosqltestbed/kumo/__init__.py @@ -43,14 +43,14 @@ class KumoTestBed(object): kumo_cloud_config['address'] = recipe.getGlobalIPv6Address() kumo_cloud_config['report_path'] = recipe.log_directory - + kumo_cloud_config.setdefault('max_server', 4) kumo_cloud_config.setdefault('max_tester', 5) kumo_cloud_config.setdefault('nb_thread', 32) kumo_cloud_config.setdefault('nb_request', 1024000) kumo_cloud_config.setdefault('erp5_publish_url', '') kumo_cloud_config.setdefault('erp5_publish_project', '') - + computer_guid_list = [] computer_guid_list.append("COMP-23") # manager computer_guid_list.append("COMP-13") # server 1 @@ -62,9 +62,9 @@ class KumoTestBed(object): computer_guid_list.append("COMP-14") # tester 3 computer_guid_list.append("COMP-20") # tester 4 computer_guid_list.append("COMP-19") # tester 5 - + kumo_cloud_config.setdefault('computer_guid_list', ":".join(computer_guid_list)) - + kumo_cloud_config['software_release_url'] = recipe.software_release_url kumo_cloud_config['server_url'] = recipe.server_url kumo_cloud_config['key_file'] = recipe.key_file diff --git a/slapos/recipe/proactive/__init__.py b/slapos/recipe/proactive/__init__.py index 7b5f35557a84cd5e49eaf1f543452286edda23df..e3fe2c47ffdb8b30193bda6c77314a1749c89c43 100644 --- a/slapos/recipe/proactive/__init__.py +++ b/slapos/recipe/proactive/__init__.py @@ -36,7 +36,7 @@ class Recipe(BaseSlapRecipe): #ipv6 = self.getGlobalIPv6Address(parameter_dict) proactive_home = self.options['proactive_location'] - + # ProActive parameters proactive_rmUrl = parameter_dict.get('rmURL') proactive_credential = parameter_dict.get('credentials') @@ -55,7 +55,7 @@ class Recipe(BaseSlapRecipe): ) self._writeFile(proactive_configuration_file, pkg_resources.resource_string( __name__, 'template/ProActiveConfiguration.xml.in') % proactive_dict) - + # ProActive wrapper #proactive = os.path.join(proactive_home, 'bin', 'unix', 'rm-start-node') proactive_pa_bundle = os.path.join(proactive_home, 'PABundle') @@ -74,4 +74,4 @@ sh %(proactive)s %(rmUrl)s %(nsname)s %(credential)s self.computer_partition.setConnectionDict(dict( #proactive_ip="[%s]" % (ipv6), )) - return [proactive_configuration_file, proactive_wrapper] \ No newline at end of file + return [proactive_configuration_file, proactive_wrapper] diff --git a/slapos/recipe/pulse2/__init__.py b/slapos/recipe/pulse2/__init__.py index a1deec9cefeba853d29e95ee571ce0220c9053a5..498bb671e2568c2a536a35baa8044a10aa9bb865 100644 --- a/slapos/recipe/pulse2/__init__.py +++ b/slapos/recipe/pulse2/__init__.py @@ -43,17 +43,17 @@ class Recipe(BaseSlapRecipe): document_root = self.createDataDirectory('htdocs') self.createHtdocs(self.options['source'].strip(), document_root) url = self.installApache(document_root) - + # MySQL mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678) - + # LDAP ldap_port = dict() - + # Pulse mmc_core_conf = self.installPulse2(ip=self.getLocalIPv4Address(), port=11000, ldap_host=ldap_conf['host'], ldap_port=ldap_conf['port']) - + ca_conf = self.installCertificateAuthority() key, certificate = self.requestCertificate('Pulse') @@ -61,7 +61,7 @@ class Recipe(BaseSlapRecipe): self.getLocalIPv4Address(), 12345, pulse_conf['inventory_port'], certificate, key, ca_conf['ca_crl'], ca_conf['certificate_authority_path']) - + self.linkBinary() self.setConnectionDict(dict( stunnel_inventory_ip = stunnel_conf['public_ip'], @@ -92,7 +92,7 @@ class Recipe(BaseSlapRecipe): os.symlink(target, link) self.logger.debug('Created link %r -> %r' % (link, target)) self.path_list.append(link) - + def installCrond(self): timestamps = self.createDataDirectory('cronstamps') cron_output = os.path.join(self.log_directory, 'cron-output') @@ -114,7 +114,7 @@ class Recipe(BaseSlapRecipe): )[0] self.path_list.append(wrapper) return cron_d - + def installLogrotate(self): """Installs logortate main configuration file and registers its to cron""" logrotate_d = os.path.abspath(os.path.join(self.etc_directory, @@ -247,26 +247,26 @@ class Recipe(BaseSlapRecipe): ldap_logfile_path= os.path.join(self.log_directory, 'ldap.log'), mmc_core_binary=self.options['mmc_core_binary'] ) - - #TODO write function that takes all templates in subdir and creates conf + + #TODO write function that takes all templates in subdir and creates conf # files, keeping same dir structure. mmc_conf_path = self.createConfigurationFile(os.path.join("mmc", "agent", "config.ini"), self.substituteTemplate( self.getTemplateFilename(os.path.join("mmc_conf", "agent", "config.ini.in")), config)) config['mmc_core_config_file'] = mysql_conf_path - + self.path_list.append(self.createRunningWrapper('mmc-core', self.substituteTemplate(self.getTemplateFilename('mmc-core.in'), config))) - + return dict(memcached_url='%s:%s' % (config['memcached_ip'], config['memcached_port']), memcached_ip=config['memcached_ip'], memcached_port=config['memcached_port']) - + def createHtdocs(self, source, document_root): source = self.options['source'].strip() document_root = self.createDataDirectory('htdocs') @@ -282,7 +282,7 @@ class Recipe(BaseSlapRecipe): shutil.copytree(path, os.path.join(document_root, p)) else: shutil.copy2(path, os.path.join(document_root, p)) - + def installApache(self, document_root, ip=None, port=None): if ip is None: ip=self.getGlobalIPv6Address() diff --git a/slapos/recipe/pwgen.py b/slapos/recipe/pwgen.py index 63452cd795cb73665d1ad500eea38329d63babe2..23061d56b068a4ae1c99b78c68786f2ea76d942c 100644 --- a/slapos/recipe/pwgen.py +++ b/slapos/recipe/pwgen.py @@ -41,7 +41,9 @@ class Recipe(GenericBaseRecipe): password = password_file.read() options['password'] = password - update = install = lambda self: [] + def install(self): + os.chmod(self.options['file'], 0600) + return [] class StablePasswordGeneratorRecipe(GenericBaseRecipe): """ diff --git a/slapos/recipe/requestoptional.py b/slapos/recipe/requestoptional.py new file mode 100644 index 0000000000000000000000000000000000000000..56f9bf8cd9b02ed4865c619c297b89be08bc1551 --- /dev/null +++ b/slapos/recipe/requestoptional.py @@ -0,0 +1,107 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +import logging + +from slapos import slap as slapmodule + +class Recipe(object): + """ Request a SlapOS instance. Won't fail if instance is not ready. + """ + + def __init__(self, buildout, name, options): + self.logger = logging.getLogger(name) + + slap = slapmodule.slap() + + self.software_release_url = options['software-url'] + self.name = options['name'] + + slap.initializeConnection(options['server-url'], + options.get('key-file'), + options.get('cert-file'), + ) + computer_partition = slap.registerComputerPartition( + options['computer-id'], options['partition-id']) + self.request = computer_partition.request + + self.isSlave = False + if 'slave' in options: + self.isSlave = options['slave'].lower() in ['y', 'yes', 'true', '1'] + + self.return_parameters = [] + if 'return' in options: + self.return_parameters = [str(parameter).strip() + for parameter in options['return'].split()] + else: + self.logger.debug("No parameter to return to main instance." + "Be careful about that...") + + software_type = 'RootSoftwareInstance' + if 'software-type' in options: + software_type = options['software-type'] + + filter_kw = {} + if 'sla' in options: + for sla_parameter in options['sla'].split(): + filter_kw[sla_parameter] = options['sla-%s' % sla_parameter] + + partition_parameter_kw = {} + if 'config' in options: + for config_parameter in options['config'].split(): + partition_parameter_kw[config_parameter] = \ + options['config-%s' % config_parameter] + + self.instance = self.request(options['software-url'], software_type, + self.name, partition_parameter_kw=partition_parameter_kw, + filter_kw=filter_kw, shared=self.isSlave) + + self.failed = None + for param in self.return_parameters: + try: + options['connection-%s' % param] = str( + self.instance.getConnectionParameter(param)) + except slapmodule.NotFoundError: + options['connection-%s' % param] = '' + if self.failed is None: + self.failed = param + + def install(self): + if self.failed is not None: + # Check instance status to know if instance has been deployed + try: + status = self.instance.getState() + except slapmodule.NotFoundError: + status = 'not ready yet' + except AttributeError: + 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) + return [] + + update = install diff --git a/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py b/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py index c4e57b9bee259b67bda17d358e3eaf347c229d3f..45ff71b2cbd845f869ab3c52f5668f6e75d223d6 100644 --- a/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py +++ b/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py @@ -27,7 +27,7 @@ # ############################################################################## -# XXX-Cedric : This is an import of +# XXX-Cedric : This is an import of # http://git.erp5.org/gitweb/erp5.git/blob/HEAD:/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py # Modification of the present file should be ported back to this original file. import os diff --git a/slapos/recipe/seleniumrunner/__init__.py b/slapos/recipe/seleniumrunner/__init__.py index b6207750290a4716662bbaee787014e1bd0a87bb..b7d5c09416f6a7e506309fc228c273ed8ef47646 100644 --- a/slapos/recipe/seleniumrunner/__init__.py +++ b/slapos/recipe/seleniumrunner/__init__.py @@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe): runner = self.createPythonScript( self.options['runner-path'], __name__+'.testrunner.run', - arguments=[self.options['suite-url'], + arguments=[self.options['suite-url'], self.options['report-url'], self.options['report-project'], self.options['browser'], diff --git a/slapos/recipe/seleniumrunner/testrunner.py b/slapos/recipe/seleniumrunner/testrunner.py index 91d0bc28cc70e569c3e40e58ffd8225b10d8f192..d3a3aae58ad293f457f87bf00bc90cecb044aab9 100644 --- a/slapos/recipe/seleniumrunner/testrunner.py +++ b/slapos/recipe/seleniumrunner/testrunner.py @@ -57,7 +57,7 @@ def run(args): # There is no test that can take more them 24 hours timeout = 2.0 * 60 * 60 - + while True: erp5_report = ERP5TestReportHandler(report_url, project + '@' + config['suite_name']) @@ -82,11 +82,11 @@ def run(args): if process.pid: os.kill(process.pid, signal.SIGTERM) print("Test has finished and Firefox has been killed.") - + erp5_report.reportFinished(getStatus(config['base_url']).encode("utf-8", "replace")) - - + + print("Test finished and report sent, sleeping.") except urllib2.URLError, urlError: print "Error: %s" % urlError.msg diff --git a/slapos/recipe/sheepdogtestbed/__init__.py b/slapos/recipe/sheepdogtestbed/__init__.py index c15e1bcea2d358013ac23b6e681fa41ff3b6772e..ef0b7da163834c2717ab01bacd4e00bff5146025 100644 --- a/slapos/recipe/sheepdogtestbed/__init__.py +++ b/slapos/recipe/sheepdogtestbed/__init__.py @@ -49,23 +49,23 @@ class SheepDogTestBed(BaseSlapRecipe): def run_sheepdog_test(self): """ Launch sheepdog test process. """ - + sheepdog_test_config = {} sheepdog_test_config.update(self.options) sheepdog_test_config.update(self.parameter_dict) sheepdog_test_config['address'] = self.getGlobalIPv6Address() sheepdog_test_config['report_path'] = self.log_directory - + if 'nb_server_max' not in sheepdog_test_config: sheepdog_test_config['nb_server_max'] = 0 - + if 'nb_tester_max' not in sheepdog_test_config: sheepdog_test_config['nb_tester_max'] = 3 - + if 'nb_thread' not in sheepdog_test_config: sheepdog_test_config['nb_thread'] = 1 - + if 'nb_request' not in sheepdog_test_config: sheepdog_test_config['nb_request'] = 1000 @@ -81,7 +81,7 @@ class SheepDogTestBed(BaseSlapRecipe): sheepdog_test_connection = {} sheepdog_test_connection['url'] = "http://["+sheepdog_test_config['address']+"]:5000/" self.computer_partition.setConnectionDict(sheepdog_test_connection) - + nosqltester_manager_wrapper_template_location = pkg_resources.resource_filename( __name__, os.path.join( 'template', 'nosqltester_manager_run.in')) diff --git a/slapos/recipe/shellinabox.py b/slapos/recipe/shellinabox.py index 6279cebd30cd49322d11b4bbd61794a20ef7ce55..4b1e499a02c27e565d8332f9e50c60245a8ac97d 100644 --- a/slapos/recipe/shellinabox.py +++ b/slapos/recipe/shellinabox.py @@ -28,6 +28,7 @@ from getpass import getpass import pwd import grp import os +import shlex from slapos.recipe.librecipe import GenericBaseRecipe @@ -38,7 +39,9 @@ def login_shell(args): if entered_password != password: return 1 else: - os.execl(args['shell'], args['shell']) + commandline = shlex.split(args['shell']) + path = commandline[0] + os.execv(path, commandline) def shellinabox(args): certificate_dir = args['certificate_dir'] @@ -69,6 +72,14 @@ def shellinabox(args): '-p', args['port'], ] + # XXX: By default shellinbox drop privileges + # switching to nobody:nogroup user. + # This force root. + if group == 'root': + command_line.extend(['-g', group]) + if user == 'root': + command_line.extend(['-u', group]) + os.execv(command_line[0], command_line) diff --git a/slapos/recipe/siptester/__init__.py b/slapos/recipe/siptester/__init__.py index 7cbde1fbbf67f1a352ca201850deea92f14c457f..17aaa0df30faf19914b8a838fa105f3ffe9a71ba 100644 --- a/slapos/recipe/siptester/__init__.py +++ b/slapos/recipe/siptester/__init__.py @@ -11,7 +11,7 @@ class SipTesterRecipe(BaseSlapRecipe): def _createPJSUAConfiguration(self, template_name): pjsua_input = pkg_resources.resource_string(__name__, os.path.join( 'template', template_name)) - if self._writeFile(self.pjsua_configuration_file, + if self._writeFile(self.pjsua_configuration_file, pjsua_input % self.options): # XXX: How to inform slap/slapgrid that something changed and it might # be not bad idea to restart CP? @@ -30,7 +30,7 @@ class SipTesterRecipe(BaseSlapRecipe): d['siptester_binary'] = os.path.join(self.buildout['software_definition' ]['software_home'].strip(), 'bin', 'siptester') self.running_wrapper_location = pkg_resources.resource_filename(__name__, os.path.join( - 'template', + 'template', self.wrapper_template)) self._createRunningWrapper(d) return [path, wrapper_path] diff --git a/slapos/recipe/slaprunner/__init__.py b/slapos/recipe/slaprunner/__init__.py index 4cdb935c8a43d9c30cede89fa81528733b2ee4f6..1ca9357d8e9a65e6e9f1a27f85c6e7042b7c078d 100644 --- a/slapos/recipe/slaprunner/__init__.py +++ b/slapos/recipe/slaprunner/__init__.py @@ -58,6 +58,7 @@ class Recipe(GenericBaseRecipe): supervisord_config=os.path.join(self.instance_directory, 'etc', 'supervisord.conf'), runner_workdir=self.workdir, + etc_dir=self.options['etc_dir'], runner_host=self.ipv6, runner_port=self.runner_port, ipv4_address=self.ipv4, @@ -71,7 +72,7 @@ class Recipe(GenericBaseRecipe): private_key=self.options['private_key'], cloud9_url=self.cloud9_url ) - + config_file = self.createFile(self.options['slapos.cfg'], self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'), configuration)) @@ -81,8 +82,9 @@ class Recipe(GenericBaseRecipe): PATH=os.path.dirname(self.options['git-binary']) + ':' + os.environ['PATH'], GIT_SSH=self.options['ssh_client'] ) - - launch_args = [self.options['slaprunner'].strip(), config_file, '--debug'] + launch_args = [self.options['slaprunner'].strip(), config_file] + if self.optionIsTrue('debug', default=False): + launch_args.append('--debug') wrapper = self.createPythonScript(self.options['wrapper'], 'slapos.recipe.librecipe.execute.executee', diff --git a/slapos/recipe/slaprunner/template/slapos.cfg.in b/slapos/recipe/slaprunner/template/slapos.cfg.in index c8ee60bfeec5bbb9955374f41a548b13bd184f79..09be2e0a2a446a20bfabd4ccdec8db182f9e260d 100644 --- a/slapos/recipe/slaprunner/template/slapos.cfg.in +++ b/slapos/recipe/slaprunner/template/slapos.cfg.in @@ -19,6 +19,7 @@ runner_host = %(runner_host)s runner_port = %(runner_port)s ipv4_address = %(ipv4_address)s ipv6_address = %(ipv6_address)s +etc_dir = %(etc_dir)s [slapproxy] host = %(proxy_host)s diff --git a/slapos/recipe/softwaretype.py b/slapos/recipe/softwaretype.py index 825a153f1a91a5a48729b6f76232e83a15a53ad0..6cef1bb83698b1e3f725ffbc6905f1d399304ed1 100644 --- a/slapos/recipe/softwaretype.py +++ b/slapos/recipe/softwaretype.py @@ -120,7 +120,7 @@ class Recipe: self.getLocalIPv4Address()) buildout.set('slap-network-information', 'global-ipv6', self.getGlobalIPv6Address()) - buildout.set('slap-network-information', 'network-interface', + buildout.set('slap-network-information', 'network-interface', self.getNetworkInterface()) # Copy/paste slap_connection @@ -128,6 +128,8 @@ class Recipe: for key, value in self.buildout['slap_connection'].iteritems(): # XXX: Waiting for SlapBaseRecipe to use dash instead of underscores buildout.set('slap-connection', key.replace('_', '-'), value) + # XXX: Needed for lxc. Use non standard API + buildout.set('slap-connection', 'requested', self.computer_partition._requested_state) work_directory = os.path.abspath(self.buildout['buildout'][ 'directory']) diff --git a/slapos/recipe/sphinx/__init__.py b/slapos/recipe/sphinx/__init__.py index 2dd2eee1ff8a41f62c8c266e52c55f3c1b47af89..a22e07b4527ec8dc8b1aebebbb6ea345ea31427c 100644 --- a/slapos/recipe/sphinx/__init__.py +++ b/slapos/recipe/sphinx/__init__.py @@ -42,15 +42,15 @@ class Recipe(GenericBaseRecipe): pid=self.options['pid'], ) sphinx_conf_path = self.createFile( - self.options['configuration-file'], + self.options['configuration-file'], self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'), config) ) # Create init script wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', + self.options['wrapper'], + 'slapos.recipe.librecipe.execute.execute', [self.options['sphinx-searchd-binary'].strip(), '-c', sphinx_conf_path, '--nodetach'], ) diff --git a/slapos/recipe/template.py b/slapos/recipe/template.py new file mode 100644 index 0000000000000000000000000000000000000000..603e0fda41f716d625829db5664f3d725aa5ab10 --- /dev/null +++ b/slapos/recipe/template.py @@ -0,0 +1,46 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +import os + +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + + def install(self): + mapping = self.options.copy() + for key in ('output', 'template', 'recipe', 'mode'): + if key in mapping: + del mapping[key] + + with open(self.options['output'], 'w') as output, \ + open(self.options['template'], 'r') as template: + output.write(template.read() % mapping) + + if 'mode' in self.options: + os.chmod(self.options['output'], int(self.options['mode'], 8)) + + return [self.options['output'], ] diff --git a/slapos/recipe/wrapper.py b/slapos/recipe/wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..52ca3fedf5e0c75866335193f1aa1d685f6a6d46 --- /dev/null +++ b/slapos/recipe/wrapper.py @@ -0,0 +1,54 @@ +############################################################################## +# +# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 3 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import shlex + +from slapos.recipe.librecipe import GenericBaseRecipe + +class Recipe(GenericBaseRecipe): + + def install(self): + + command_line = shlex.split(self.options['command-line']) + + wait_files = self.options.get('wait-for-files') + if wait_files is not None: + wait_files = [filename.strip() for filename in wait_files.split() + if filename.strip()] + + environment = self.options.get('environment') + if environment is not None: + environment = {k.strip(): v.strip() for k, v in [ + line.split('=') + for line in environment.split('\n') + ]} + + return [self.createPythonScript( + self.options['output'], + 'slapos.recipe.librecipe.execute.generic_exec', + (command_line, wait_files, environment,), + )] diff --git a/slapos/recipe/zabbixagent/__init__.py b/slapos/recipe/zabbixagent/__init__.py index 41d9a469b6f38417bf5ba754ea51d8d354846e7a..38b0c763400af72d9973621003966f88997665bc 100644 --- a/slapos/recipe/zabbixagent/__init__.py +++ b/slapos/recipe/zabbixagent/__init__.py @@ -124,5 +124,6 @@ class Recipe(BaseSlapRecipe): self.parameter_dict['hostname'], self.parameter_dict['server']) self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'], - name=zabbix_agentd_conf['hostname'], port=zabbix_agentd_conf['port'])) + name=zabbix_agentd_conf['hostname'], + port=str(zabbix_agentd_conf['port']))) return self.path_list diff --git a/slapos/recipe/zabbixagent/template/zabbix_agentd.conf.in b/slapos/recipe/zabbixagent/template/zabbix_agentd.conf.in index d5ba48be5664ebecc7c7d980d583e74086cbb9fd..77ff0928a4c0215d759e116991d9615b77a28838 100644 --- a/slapos/recipe/zabbixagent/template/zabbix_agentd.conf.in +++ b/slapos/recipe/zabbixagent/template/zabbix_agentd.conf.in @@ -229,5 +229,13 @@ ListenIP=%(ip)s # Mandatory: no # Default: # UserParameter= +UserParameter=custom_sensor.temp1,sensors | grep "temp1" | sed -e "s/.* +//" | sed -e "s/.C.*//" +UserParameter=custom_sensor.temp2,sensors | grep "temp2" | sed -e "s/.* +//" | sed -e "s/.C.*//" +UserParameter=custom_sensor.core0,sensors | grep "Core 0" | sed -e "s/.* +//" | sed -e "s/.C.*//" +UserParameter=custom_sensor.core1,sensors | grep "Core 1" | sed -e "s/.* +//" | sed -e "s/.C.*//" +UserParameter=custom_sensor.core2,sensors | grep "Core 2" | sed -e "s/.* +//" | sed -e "s/.C.*//" +UserParameter=custom_sensor.core3,sensors | grep "Core 3" | sed -e "s/.* +//" | sed -e "s/.C.*//" +UserParameter=custom_sensor.fan1,sensors | grep "fan1" | sed -e "s/.* //" | sed -e "s/ .*//" +UserParameter=custom_sensor.fan2,sensors | grep "fan2" | sed -e "s/.* //" | sed -e "s/ .*//" %(user_parameter_string)s diff --git a/software/MediaWiki/software.cfg b/software/MediaWiki/software.cfg index 59d4dc147e0c4462c5c083ec1a95fef7a9051b8d..839fe2eabae7010c37be366ffdacb65b2491c07e 100644 --- a/software/MediaWiki/software.cfg +++ b/software/MediaWiki/software.cfg @@ -79,7 +79,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/SilverStripe/software.cfg b/software/SilverStripe/software.cfg index 5d6ce23cc1cfd4a0b4ca453a7ae00064c1a19362..fb608cf1404188bffb4acea9a03e2db31b1fc05d 100644 --- a/software/SilverStripe/software.cfg +++ b/software/SilverStripe/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/agent/README.testing_agent.txt b/software/agent/README.testing_agent.txt new file mode 100644 index 0000000000000000000000000000000000000000..2fe4c4ac3860e575cfff667221bc7212469a54c3 --- /dev/null +++ b/software/agent/README.testing_agent.txt @@ -0,0 +1,67 @@ +testing agent +============= + +Testing agent simulates a normal user interacting with vifib master. It requests software release installation or software instance instiaction randomly from time to time. SlapOS clients then run these commands remotely. It is the testing agent determining whether an error occurs. + +Usage +===== +Request a testing agent instance from vifib with following parameters: +<?xml version='1.0' encoding='utf-8'?> +<instance> +<parameter id="configuration">[DEFAULT] +# ConfigParser's magic section. +computer_list = ["COMP-607"] +master_url = https://slap.vifib.com/ +# Note that certificates are now literally in the configuration, meaning +# you may decide to specify different ones for each test. Likewise for +# master_url. +key = -----BEGIN PRIVATE KEY----- + MII[...] + [...] + -----END PRIVATE KEY----- +cert = -----BEGIN CERTIFICATE----- + MII[...] + [...] + -----END CERTIFICATE----- + +[agent] +# This section is special: it contains configuration. +# Does not make use of values coming from [DEFAULT] (well, it +# necessarily contains them, but they are not used). +node_title = ... +test_title = ... +project_title = ... +task_count = 2 # Number of tests to run concurrently +report_url = # report_url, find details in erp5 for details + +# All other sections are individual tests, whatever they are named. +[test-apache] +# Software release URL +url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg +# Optional request_kw parameters: if not provided, will only test SR +# build. Depending on your slap version, it may be required to provide +# a "software_type" parameter, even if you want the default type. +request_kw = { + "filter_kw": {"computer_guid": "..."}, + "partition_parameter_kw": { + "domain": "example.com" + } + } +# All are in seconds. +max_install_duration = 3000 +max_uninstall_duration = 360 +max_request_duration = 700 +max_destroy_duration = 360 + +[impossible-apache] +url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg +max_install_duration = 1 +max_uninstall_duration = 1 + +[impossible-apache-2] +url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg +max_install_duration = 660 +max_uninstall_duration = 1 +</parameter> +</instance> + diff --git a/software/b2evolution/software.cfg b/software/b2evolution/software.cfg index eba431358deb71af66dff60f88db8cb3b8c65446..e4b51551a5500c69d11e2591ad2fa962c5667e49 100644 --- a/software/b2evolution/software.cfg +++ b/software/b2evolution/software.cfg @@ -64,7 +64,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/cloudooo/software.cfg b/software/cloudooo/software.cfg index fc79cc7dcb36b52a01a2ccb6cedbe0012875b03d..1cd51b33dff4c4837e84e66b8ef4316297bc5143 100755 --- a/software/cloudooo/software.cfg +++ b/software/cloudooo/software.cfg @@ -6,9 +6,10 @@ extends = versions = versions # Local development -develop += +develop = ${:parts-directory}/slapos.cookbook-repository ${:parts-directory}/cloudooo-repository + parts += # Local development slapos.cookbook-repository diff --git a/software/cmsmadesimple/software.cfg b/software/cmsmadesimple/software.cfg index 58fa98a12fd50f7f90f4bb52e5d243a58ee2e0d8..3bf0c84443a2a67320e28b97134264c937fa12ae 100644 --- a/software/cmsmadesimple/software.cfg +++ b/software/cmsmadesimple/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/coppermine/software.cfg b/software/coppermine/software.cfg index 7a1293bba7be4c3796032d1ef7308dda075f4135..c90c54baa1d7ec1ca772b342d99b66f6504c1183 100644 --- a/software/coppermine/software.cfg +++ b/software/coppermine/software.cfg @@ -74,7 +74,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/davstorage/software.cfg b/software/davstorage/software.cfg index 93a3ef8a3a9742628387d7f87b8347e5f6aeac25..23ce2fc241e4077011c8e218e6cda390715ff7c9 100644 --- a/software/davstorage/software.cfg +++ b/software/davstorage/software.cfg @@ -77,7 +77,7 @@ Jinja2 = 2.6 Werkzeug = 0.7.1 buildout-versions = 1.6 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 meld3 = 0.6.7 slapos.cookbook = 0.26 diff --git a/software/dotclear/software.cfg b/software/dotclear/software.cfg index d8cfcc20fed0e9cb2d396f15197df42459553b89..0d1c87a407573f0f031020c3593bacfb3ab7eac7 100644 --- a/software/dotclear/software.cfg +++ b/software/dotclear/software.cfg @@ -74,7 +74,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/dotproject/software.cfg b/software/dotproject/software.cfg index ea6a5aa31fad4c3c6cf16f70e24dab20750d6adf..a2a430ca2ea6e65830fb5837b08a78f527845988 100644 --- a/software/dotproject/software.cfg +++ b/software/dotproject/software.cfg @@ -74,7 +74,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/drupal/software.cfg b/software/drupal/software.cfg index ed9c81d0e8da00ae0049ec667ebdd3a8da00dafd..ec66694c0b4cce47a42af7450c1d99efe12c3cf7 100644 --- a/software/drupal/software.cfg +++ b/software/drupal/software.cfg @@ -5,8 +5,8 @@ extends = [application] recipe = slapos.recipe.build:download-unpacked -url = http://ftp.drupal.org/files/projects/drupal-7.14.tar.gz -md5sum = af7abd95c03ecad4e1567ed94a438334 +url = http://ftp.drupal.org/files/projects/drupal-7.15.tar.gz +md5sum = f42c9baccd74e1d035d61ff537ae21b4 [application-template] recipe = slapos.recipe.download diff --git a/software/eSKUeL/software.cfg b/software/eSKUeL/software.cfg index 5d34b4c56f1ed636f8d9658d5a994b75b0521bf8..22691c5d66142628e1051db2817232d630f351d1 100644 --- a/software/eSKUeL/software.cfg +++ b/software/eSKUeL/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/erp5testnode/software.cfg b/software/erp5testnode/software.cfg index 92b1a959485aeaa21057b6c2a316af0ac2df0fba..44ffa05ad5760e0090b4848ae3260b1799ed771a 100644 --- a/software/erp5testnode/software.cfg +++ b/software/erp5testnode/software.cfg @@ -232,7 +232,7 @@ PyXML = 0.8.5 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.38 diff --git a/software/ezpublish/software.cfg b/software/ezpublish/software.cfg index ab338b0949e9ad7fe79530d17b031ce289ba8ce4..f3fc78a855d1d4e675136f78f545e3716c58c74f 100644 --- a/software/ezpublish/software.cfg +++ b/software/ezpublish/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/gitrepo/README.txt b/software/gitrepo/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..e83d1bdbb8d837d11952746445411e35290ec7b4 --- /dev/null +++ b/software/gitrepo/README.txt @@ -0,0 +1,30 @@ +gitrepo +======= + +This software release allow you to get a private mono-user git +repository with web interface. + +This software release only need one parameter “repos”, which is +a json object of the repos and their description. + +It can receive a “title” parameter as well in order to specify +a title for gitweb interface interface. + +Example +-------- + +:: + repo = request( + software_release=gitrepo, + partiion_reference="My SlapGit", + partition_parameter_kw={ + 'repos': """ + { + "repo": "description", + "foo": "bar" + } + """, + 'title': 'optional title', + } + ) + diff --git a/software/gitrepo/git-http-backend.cgi.in b/software/gitrepo/git-http-backend.cgi.in new file mode 100644 index 0000000000000000000000000000000000000000..bc717297836a27b5495a1d4590b7272eb23febba --- /dev/null +++ b/software/gitrepo/git-http-backend.cgi.in @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +## This is a very dirty hack +export PATH_INFO="$${REDIRECT_URL:-$PATH_INFO}" + +GIT_PROJECT_ROOT='${git-repos:base-directory}' GIT_HTTP_EXPORT_ALL= exec '${:githttpbackend}' $@ diff --git a/software/gitrepo/gitweb.cgi.in b/software/gitrepo/gitweb.cgi.in new file mode 100644 index 0000000000000000000000000000000000000000..444915ed446ad5b38c1961bf09cde5ae7cd20f56 --- /dev/null +++ b/software/gitrepo/gitweb.cgi.in @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +GITWEB_CONFIG='${gitweb-conf:output}' exec '${:perl}' '${:gitweb}' $@ diff --git a/software/gitrepo/gitweb.conf.in b/software/gitrepo/gitweb.conf.in new file mode 100644 index 0000000000000000000000000000000000000000..b8f6d37c949624bd330444fe4d6ae1837e4469c3 --- /dev/null +++ b/software/gitrepo/gitweb.conf.in @@ -0,0 +1,9 @@ +$projectroot = '${git-repos:base-directory}'; + +$site_name = '${slap-parameter:title}'; + +our @git_base_url_list = qw(${:url-list}); + +# Beautiful URLs +$feature{'pathinfo'}{'default'} = [1]; +$feature{'blame'}{'default'} = [1]; diff --git a/software/gitrepo/httpd.conf.in b/software/gitrepo/httpd.conf.in new file mode 100644 index 0000000000000000000000000000000000000000..fb80f11fc9cb04aa0c98e77bff08510144d96805 --- /dev/null +++ b/software/gitrepo/httpd.conf.in @@ -0,0 +1,67 @@ +PidFile "${:pid-file}" +Listen ${slap-network-information:global-ipv6}:${:port} +ServerAdmin someone@email + +ErrorLog "${:error-log}" +LogLevel warn + +ScriptSock "${:cgid-sock}" + +<Directory /> + AllowOverride None + Order deny,allow + Deny from all +</Directory> + +Alias "/static/" "${:gitweb-static-dir}" +<Directory "${:gitweb-static-dir}"> + Options FollowSymLinks + Order deny,allow + Allow from all +</Directory> + +# This is Static Accelerated git pull +AliasMatch "^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$" "${:project-dir}/$1" +AliasMatch "^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$" "${:project-dir}/$1" + +# When it can't be statically delivered, we rely on git-http-backend +ScriptAliasMatch \ + "(?x)^/(.*/(HEAD | \ + info/refs | \ + objects/info/[^/]+ | \ + git-(upload|receive)-pack))(/push)?$" \ + "${:git-http-backend}/$1" + +# Everything else is gitweb interface +ScriptAlias "/" "${:gitweb-script}/" + +<Location /> + Order deny,allow + Allow from all + RewriteEngine On + RewriteCond %{QUERY_STRING} service=git-receive-pack + RewriteRule ^(.*)$ $1/push [END] +</Location> + +<LocationMatch "(^/.*/git-receive-pack|/push)$"> + AuthType Basic + AuthName "Git Push Access" + AuthBasicProvider file + AuthUserFile "${:passwd-file}" + Require valid-user + SetEnv REMOTE_USER $REDIRECT_REMOTE_USER +</LocationMatch> + + +LoadModule access_compat_module modules/mod_access_compat.so +LoadModule alias_module modules/mod_alias.so +LoadModule auth_basic_module modules/mod_auth_basic.so +LoadModule authn_core_module modules/mod_authn_core.so +LoadModule authn_file_module modules/mod_authn_file.so +LoadModule authz_core_module modules/mod_authz_core.so +LoadModule authz_user_module modules/mod_authz_user.so +LoadModule autoindex_module modules/mod_autoindex.so +LoadModule cgid_module modules/mod_cgid.so +LoadModule env_module modules/mod_env.so +LoadModule rewrite_module modules/mod_rewrite.so +LoadModule unixd_module modules/mod_unixd.so diff --git a/software/gitrepo/instance-gitrepo.cfg b/software/gitrepo/instance-gitrepo.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f3e5eafc45c1a87d59548bc435398b15c050c835 --- /dev/null +++ b/software/gitrepo/instance-gitrepo.cfg @@ -0,0 +1,115 @@ +[buildout] + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +parts = + publish + httpd + httpd-conf + gitweb-conf + gitweb-cgi + gitdaemon + git-http-backend-cgi + htpasswd + pwgen + git-repos + +[publish] +recipe = slapos.cookbook:publish +url = http://[$${slap-network-information:global-ipv6}]:$${httpd-conf:port}/ +user = $${pwgen:user} +password = $${pwgen:password} + +[httpd] +recipe = slapos.cookbook:wrapper +command-line = ${apache:location}/bin/httpd -DFOREGROUND -f "$${httpd-conf:output}" +output = $${basedirectory:services}/httpd + + +[httpd-conf] +recipe = slapos.recipe.template +url = ${template-httpd-conf:location}/${template-httpd-conf:filename} +output = $${rootdirectory:etc}/httpd.conf + +pid-file = $${basedirectory:run}/httpd.pid +error-log = $${basedirectory:log}/httpd-errorlog.log +gitweb-static-dir = ${gitweb:location}/share/gitweb/static/ +gitweb-script = $${gitweb-cgi:output} +git-http-backend = $${git-http-backend-cgi:output} +cgid-sock = $${basedirectory:run}/cgid.sock +project-dir = $${git-repos:base-directory} +passwd-file = $${htpasswd:output} +port = 8080 + + +[gitweb-conf] +recipe = slapos.recipe.template +url = ${template-gitweb-conf:location}/${template-gitweb-conf:filename} +output = $${rootdirectory:etc}/gitweb.conf +url-list = http://[$${slap-network-information:global-ipv6}]:$${httpd-conf:port} git://[$${slap-network-information:global-ipv6}] + +[gitweb-cgi] +recipe = slapos.recipe.template +url = ${template-gitweb-cgi:location}/${template-gitweb-cgi:filename} +output = $${rootdirectory:bin}/gitweb.cgi +mode = 700 + +perl = ${perl:location}/bin/perl +gitweb = ${gitweb:location}/share/gitweb/gitweb.cgi + + +[git-http-backend-cgi] +recipe = slapos.recipe.template +url = ${template-git-http-backend-cgi:location}/${template-git-http-backend-cgi:filename} +output = $${rootdirectory:bin}/git-http-backend.cgi +mode = 700 + +githttpbackend = ${git:location}/libexec/git-core/git-http-backend + +[gitdaemon] +recipe = slapos.cookbook:wrapper +ip = $${slap-network-information:global-ipv6} +port = 9418 +command-line = ${git:location}/bin/git daemon --export-all --listen=$${:ip} --port=$${:port} --interpolated-path=$${git-repos:base-directory}/%D +output = $${basedirectory:services}/git-daemon + +[htpasswd] +recipe = collective.recipe.cmd +output = $${rootdirectory:etc}/httpd.htpasswd +on_install = true +on_udptae = true +cmds = + ${apache:location}/bin/htpasswd -cb $${:output} $${pwgen:user} $${pwgen:password} + +[pwgen] +recipe = slapos.cookbook:pwgen +file = $${buildout:directory}/.password +pwgen-binary = ${pwgen:location}/bin/pwgen +user = slapos + +[rootdirectory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc/ +srv = $${buildout:directory}/srv/ +var = $${buildout:directory}/var/ +bin = $${buildout:directory}/bin/ + + +[basedirectory] +recipe = slapos.cookbook:mkdirectory +services = $${rootdirectory:etc}/run/ +run = $${rootdirectory:var}/run/ +git-repos = $${rootdirectory:srv}/git/ +log = $${rootdirectory:var}/log/ + + +[git-repos] +recipe = slapos.cookbook:gitinit +base-directory = $${basedirectory:git-repos} +repos = $${slap-parameter:repos} +git-binary = ${git:location}/bin/git + +[slap-parameter] +title = GitSlap diff --git a/software/gitrepo/instance.cfg b/software/gitrepo/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7e2a9be040773620e9764b9b190a220c269c38a9 --- /dev/null +++ b/software/gitrepo/instance.cfg @@ -0,0 +1,13 @@ +[buildout] + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +parts = + switch-softwaretype + + +[switch-softwaretype] +recipe = slapos.cookbook:softwaretype +default = ${template-gitrepo:output} diff --git a/software/gitrepo/software.cfg b/software/gitrepo/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..10c474711af1a28e8cb8596fa054d96ed5fdf8e5 --- /dev/null +++ b/software/gitrepo/software.cfg @@ -0,0 +1,66 @@ +[buildout] + +extends = + ../../component/apache/buildout.cfg + ../../component/perl/buildout.cfg + ../../component/git/buildout.cfg + ../../component/pwgen/buildout.cfg + ../../stack/slapos.cfg + +parts = + apache + perl + git + gitweb + slapos-cookbook + template + template-gitrepo + collective-recipe-cmd + +[template] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance.cfg +md5sum = 5917cf0a9d6cc5d6d184e89ca2d72a91 +output = ${buildout:directory}/template.cfg +mode = 0644 + +[template-gitrepo] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance-gitrepo.cfg +md5sum = 15dd1b7ea3259197b847e94342adf872 +output = ${buildout:directory}/template-gitrepo.cfg +mode = 0644 + +[template-download] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +download-only = true + +[template-gitweb-cgi]] +<= template-download +filename = gitweb.cgi.in +md5sum = 5c720202053bfba06eec6e97d8d47cd0 + +[template-gitweb-conf] +<= template-download +filename = gitweb.conf.in +md5sum = 580d4bd2723f7e0a44ec8fc5b360b429 + +[template-git-http-backend-cgi] +<= template-download +filename = git-http-backend.cgi.in +md5sum = 7e0562b0ce8d48bc8f6b422850dc53af + +[template-httpd-conf] +<= template-download +filename = httpd.conf.in +md5sum = e5e6a6de32323248d11918934f6aad99 + +[collective-recipe-cmd] +recipe = zc.recipe.egg +eggs = + collective.recipe.cmd + + +[version] +slapos.cookbook = 0.64.2 diff --git a/software/html5as/README.md b/software/html5as/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb1891bd34737f01e6ff2836c964e8e2c8e52e7c --- /dev/null +++ b/software/html5as/README.md @@ -0,0 +1,23 @@ +# Html5 Application Server # + +## Presentation ## + +* Fast hosting software for static website (html5) + +* Use Nginx server + +## Parameter ## + +download_url (string) :required + +Details : + +* Only tarball (tar) is supported + +* Compressed format is gunzip (optional) + +* Tarball must contain an index.html at its root + +## How it works ## + +Each time you (re)start your instance or update parameters, html5as will remove previous website then download tarball and extract it in docroot directory. diff --git a/software/html5as/instance.cfg b/software/html5as/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..bb699c2d4a05ee381ede8a4ca009dd0c35d491fb --- /dev/null +++ b/software/html5as/instance.cfg @@ -0,0 +1,11 @@ +[buildout] +parts = + switch-softwaretype + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +[switch-softwaretype] +recipe = slapos.cookbook:softwaretype +default = ${instance_html5as:output} diff --git a/software/html5as/instance_html5as.cfg b/software/html5as/instance_html5as.cfg new file mode 100644 index 0000000000000000000000000000000000000000..52138adf1bf5166336081020797e8eab61613ab1 --- /dev/null +++ b/software/html5as/instance_html5as.cfg @@ -0,0 +1,116 @@ +[buildout] +parts = + nginx_conf + downloader + launcher + mime_types + publish-connection-information + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +# partition tree +# / +# |- etc/ +# | |- nginx.conf +# | |- run/ +# | |- html5as (binary) +# |- var/ +# | |- run/ +# | | |- nginx.pid +# | |- log/ +# | | |- nginx.log +# | | |- nginx.access.log +# |- srv/ +# | |- html5as/ (doc root) +# | | |- index.html +# | |- backup/ + +[rootdirectory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc +var = $${buildout:directory}/var +srv = $${buildout:directory}/srv +tmp = $${buildout:directory}/tmp + +[basedirectory] +recipe = slapos.cookbook:mkdirectory +services = $${rootdirectory:etc}/run +log = $${rootdirectory:var}/log +run = $${rootdirectory:var}/run +backup = $${rootdirectory:srv}/backup +data = $${rootdirectory:srv}/html5as + +[tempdirectory] +recipe = slapos.cookbook:mkdirectory +client_body_temp_path = $${rootdirectory:tmp}/client_body_temp_path +proxy_temp_path = $${rootdirectory:tmp}/proxy_temp_path +fastcgi_temp_path = $${rootdirectory:tmp}/fastcgi_temp_path +uwsgi_temp_path = $${rootdirectory:tmp}/uwsgi_temp_path +scgi_temp_path = $${rootdirectory:tmp}/scgi_temp_path + +[html5as] +# Options +nb_workers = 2 + +# Network +ip = $${slap-network-information:global-ipv6} +port = 8080 + +# Paths +# Log +path_pid = $${basedirectory:run}/nginx.pid +path_log = $${basedirectory:log}/nginx.log +path_access_log = $${basedirectory:log}/nginx.access.log +path_error_log = $${basedirectory:log}/nginx.error.log +path_tmp = $${buildout:directory}/tmp +# Docroot +docroot = $${basedirectory:data} +default_index = $${basedirectory:data}/index.html +# Config files +path_nginx_conf = $${rootdirectory:etc}/nginx.conf +path_mime_types = $${rootdirectory:etc}/mime_types +# Executables +bin_nginx = ${nginx:location}/sbin/nginx +bin_launcher = $${basedirectory:services}/launcher +bin_downloader = $${basedirectory:services}/downloader + +# Utils +path_shell = ${dash:location}/bin/dash +path_curl = ${curl:location}/bin/curl +path_tar = ${tar:location}/bin/tar + +[nginx_conf] +recipe = slapos.recipe.template:jinja2 +template = ${template_nginx_conf:location}/${template_nginx_conf:filename} +rendered = $${html5as:path_nginx_conf} +context = + section param_html5as html5as + section param_tempdir tempdirectory + +[mime_types] +recipe = slapos.recipe.template:jinja2 +template = ${template_mime_types:location}/${template_mime_types:filename} +rendered = $${html5as:path_mime_types} + +[downloader] +recipe = slapos.recipe.template:jinja2 +template = ${template_downloader:location}/${template_downloader:filename} +rendered = $${html5as:bin_downloader} +mode = 700 +context = + section param_html5as html5as + key download_url slap-parameter:download_url + +[launcher] +recipe = slapos.recipe.template:jinja2 +template = ${template_launcher:location}/${template_launcher:filename} +rendered = $${html5as:bin_launcher} +mode = 700 +context = + section param_html5as html5as + +[publish-connection-information] +recipe = slapos.cookbook:publish +server_url = http://[$${html5as:ip}]:$${html5as:port} diff --git a/software/html5as/software.cfg b/software/html5as/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..304097f0efa943ffc2526d65a032dbaffcbc5fe0 --- /dev/null +++ b/software/html5as/software.cfg @@ -0,0 +1,179 @@ +[buildout] +versions = versions +extensions = buildout-versions + + + +extends = + ../../stack/slapos.cfg + ../../component/nginx/buildout.cfg + ../../component/curl/buildout.cfg + ../../component/dash/buildout.cfg + ../../component/tar/buildout.cfg + +allow-hosts = + *.nexedi.org + *.python.org + *.sourceforge.net + www.slapos.org + launchpad.net + github.com + alastairs-place.net + www.alittletooquiet.net + +parts = + dash + tar + curl + nginx + eggs + template + template_nginx_conf + template_downloader + template_launcher + template_mime_types + instance_html5as + +[eggs] +recipe = z3c.recipe.scripts +eggs = slapos.cookbook + +[template] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance.cfg +output = ${buildout:directory}/template.cfg +md5sum = 918e0d6513e4d1c92051431d83261dab +mode = 0644 + +[instance_html5as] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance_html5as.cfg +output = ${buildout:directory}/template_html5as.cfg +md5sum = 579eceb768e8d25fb53338fc4fac6944 +mode = 0644 + +[template_nginx_conf] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/templates/nginx_conf.in +md5sum = 0ae1fb1c777c332d76f680c681a4f48a +filename = nginx_conf.in +mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} + +[template_launcher] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/templates/launcher.in +md5sum = acf5bb55ceac2e826259d28ed5c1de3a +filename = launcher.in +mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} + +[template_downloader] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/templates/downloader.in +md5sum = 7b374a03f4086fcae47491d449da1f09 +filename = downloader.in +mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} + +[template_mime_types] +recipe = slapos.recipe.download +url = ${:_profile_base_location_}/templates/mime_types.in +md5sum = 4ef94a7b458d885cd79ba0b930a5727e +filename = mime_types.in +mode = 0644 +location = ${buildout:parts-directory}/${:_buildout_section_name_} + +[versions] +zc.buildout = 1.6.0-dev-SlapOS-006 +Jinja2 = 2.6 +Pygments = 1.5 +Werkzeug = 0.8.3 +buildout-versions = 1.7 +docutils = 0.9.1 +hexagonit.recipe.cmmi = 1.6 +ipython = 0.13 +meld3 = 0.6.8 +slapos.cookbook = 0.61 +slapos.recipe.template = 2.4.2 +slapos.recipe.download = 1.0.dev-r4053 +z3c.recipe.scripts = 1.0.1 + +# Required by: +# slapos.core==0.28.2 +Flask = 0.9 + +# Required by: +# slapos.cookbook==0.61 +PyXML = 0.8.4 + +# Required by: +# netaddr==0.7.7 +Sphinx = 1.1.3 + +# Required by: +# slapos.cookbook==0.61 +inotifyx = 0.2.0 + +# Required by: +# slapos.cookbook==0.61 +# slapos.core==0.28.2 +# xml-marshaller==0.9.7 +lxml = 2.3.5 + +# Required by: +# slapos.cookbook==0.61 +netaddr = 0.7.7 + +# Required by: +# slapos.core==0.28.2 +netifaces = 0.8 + +# Required by: +# slapos.cookbook==0.61 +# slapos.core==0.28.2 +# zc.buildout==1.6.0-dev-SlapOS-006 +# zc.recipe.egg==1.3.2 +setuptools = 0.6c12dev-r88846 + +# Required by: +# slapos.cookbook==0.61 +slapos.core = 0.28.2 + +# Required by: +# slapos.core==0.28.2 +supervisor = 3.0a12 + +# Required by: +# slapos.cookbook==0.61 +xml-marshaller = 0.9.7 + +# Required by: +# slapos.cookbook==0.61 +zc.recipe.egg = 1.3.2 + +# Required by: +# slapos.core==0.28.2 +zope.interface = 4.0.1 + +# Required by: +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 + +[networkcache] +# signature certificates of the following uploaders. +# Łukasz Nowak +signature-certificate-list = + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJANLesB1hoQIEMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMTMyMCAXDTEyMDgyODE0MjEyOFoYDzIxMTIwODA0MTQyMTI4WjAT + MREwDwYDVQQDDAhDT01QLTEzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + 9ED8i6211znu1Z0milwuNZCLlmQlFP590neGjvSRla7wzIBwWreNAX2Hl05sd1og + PFZBSeWsStFHQRqjNYOx1WoS4olRGIAwiwLh3Hgmkc8oOe7/q3W22xOZTUXOIiq1 + FV96jUHe9RmZ910VqLPCMK44aCTmabSCWwk4OfRzI3kCAwEAAaNQME4wHQYDVR0O + BBYEFBgvpmTAS/O9vfvSLnwKy/eJC/NAMB8GA1UdIwQYMBaAFBgvpmTAS/O9vfvS + LnwKy/eJC/NAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAM3qIP3sY + DtqzUJJ7WEbD0dcniHGEycOk/3EKB663jULar+KOuTIFmMGOy5MVWcDsCqjODWXK + 9LnVeCSkC4Ct8kvkT/WdRFF/nqprbZ6bUrhx2yAKTH6CMhIjDJ8F7fAkH48fLD7M + HPuwnRO7OewFpzT/gfQgFKpmVBNUYq7YddE= + -----END CERTIFICATE----- diff --git a/software/html5as/templates/downloader.in b/software/html5as/templates/downloader.in new file mode 100644 index 0000000000000000000000000000000000000000..c2bbcc95800027f73cd22acd8a08d7614a005c20 --- /dev/null +++ b/software/html5as/templates/downloader.in @@ -0,0 +1,9 @@ +#! {{ param_html5as['path_shell'] }} +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically + +# Remove exsistant website +rm -r {{ param_html5as['docroot'] }}/* + +# Download and extract website tarball into docroot directory +exec {{ param_html5as['path_curl'] }} -s {{ download_url }} | {{ param_html5as['path_tar'] }} -z -x -C {{ param_html5as['docroot'] }} diff --git a/software/html5as/templates/launcher.in b/software/html5as/templates/launcher.in new file mode 100644 index 0000000000000000000000000000000000000000..8e2eff4b812b1ae50f78c6d843d46b98ea24d062 --- /dev/null +++ b/software/html5as/templates/launcher.in @@ -0,0 +1,6 @@ +#! {{ param_html5as['path_shell'] }} +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically + +# Run nginx +exec {{ param_html5as['bin_nginx'] }} -c {{ param_html5as['path_nginx_conf'] }} diff --git a/software/html5as/templates/mime_types.in b/software/html5as/templates/mime_types.in new file mode 100644 index 0000000000000000000000000000000000000000..f07db332b6dce975e457a8f9ba3bbd8ec1c39b49 --- /dev/null +++ b/software/html5as/templates/mime_types.in @@ -0,0 +1,78 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml rss; + image/gif gif; + image/jpeg jpeg jpg; + application/x-javascript js; + application/atom+xml atom; + + text/mathml mml; + text/plain txt; + text/vnd.sun.j2me.app-descriptor jad; + text/vnd.wap.wml wml; + text/x-component htc; + + image/png png; + image/tiff tif tiff; + image/vnd.wap.wbmp wbmp; + image/x-icon ico; + image/x-jng jng; + image/x-ms-bmp bmp; + image/svg+xml svg svgz; + + application/java-archive jar war ear; + application/mac-binhex40 hqx; + application/msword doc; + application/pdf pdf; + application/postscript ps eps ai; + application/rtf rtf; + application/vnd.ms-excel xls; + application/vnd.ms-powerpoint ppt; + application/vnd.wap.wmlc wmlc; + application/vnd.google-earth.kml+xml kml; + application/vnd.google-earth.kmz kmz; + application/x-7z-compressed 7z; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/xhtml+xml xhtml; + application/zip zip; + + application/octet-stream bin exe dll; + application/octet-stream deb; + application/octet-stream dmg; + application/octet-stream eot; + application/octet-stream iso img; + application/octet-stream msi msp msm; + application/ogg ogx; + + audio/midi mid midi kar; + audio/mpeg mpga mpega mp2 mp3 m4a; + audio/ogg oga ogg spx; + audio/x-realaudio ra; + audio/webm weba; + + video/3gpp 3gpp 3gp; + video/mp4 mp4; + video/mpeg mpeg mpg mpe; + video/ogg ogv; + video/quicktime mov; + video/webm webm; + video/x-flv flv; + video/x-mng mng; + video/x-ms-asf asx asf; + video/x-ms-wmv wmv; + video/x-msvideo avi; +} diff --git a/software/html5as/templates/nginx_conf.in b/software/html5as/templates/nginx_conf.in new file mode 100644 index 0000000000000000000000000000000000000000..c7cd9dbcf4d85e98491eef05eee5076c9e879a5b --- /dev/null +++ b/software/html5as/templates/nginx_conf.in @@ -0,0 +1,33 @@ +worker_processes {{ param_html5as['nb_workers'] }}; + +pid {{ param_html5as['path_pid'] }}; +error_log {{ param_html5as['path_error_log'] }}; + +daemon off; + +events { + worker_connections 1024; + accept_mutex off; +} + +http { + include {{ param_html5as['path_mime_types'] }}; + default_type application/octet-stream; + access_log {{ param_html5as['path_access_log'] }} combined; + index index.html; + + server { + listen [{{ param_html5as['ip'] }}]:{{ param_html5as['port'] }}; + server_name _; + + keepalive_timeout 5; + client_body_temp_path {{ param_tempdir['client_body_temp_path'] }}; + proxy_temp_path {{ param_tempdir['proxy_temp_path'] }}; + fastcgi_temp_path {{ param_tempdir['fastcgi_temp_path'] }}; + uwsgi_temp_path {{ param_tempdir['uwsgi_temp_path'] }}; + scgi_temp_path {{ param_tempdir['scgi_temp_path'] }}; + + # path for static files + root {{ param_html5as['docroot'] }}; + } +} diff --git a/software/joomla/software.cfg b/software/joomla/software.cfg index b75357bda053718a1c6785553fde3848dc30b3e7..e64217991915105a7f3192612c41965bd3dee658 100644 --- a/software/joomla/software.cfg +++ b/software/joomla/software.cfg @@ -64,7 +64,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/kumofs/software.cfg b/software/kumofs/software.cfg index e4bdecad98dc52082ed72e24cae186ace56c43af..4d7499cda98b25bc66baa0077326ef7830385be6 100644 --- a/software/kumofs/software.cfg +++ b/software/kumofs/software.cfg @@ -89,7 +89,7 @@ PyXML = 0.8.5 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.38 diff --git a/software/kvm/instance-kvm.cfg b/software/kvm/instance-kvm.cfg index d9f9bc0896473c0a01df4fd168abb816cadb5e65..0d069a98a000724b33c5152f89b81a60d1057dd9 100644 --- a/software/kvm/instance-kvm.cfg +++ b/software/kvm/instance-kvm.cfg @@ -126,7 +126,7 @@ db-path = $${rootdirectory:srv}/slapmonitor_database [request-slave-frontend] -recipe = slapos.cookbook:request +recipe = slapos.cookbook:requestoptional software-url = $${slap-parameter:frontend-software-url} server-url = $${slap-connection:server-url} key-file = $${slap-connection:key-file} @@ -158,3 +158,11 @@ path = $${basedirectory:promises}/frontend_promise url = $${publish-kvm-frontend-connection-information:url} dash_path = ${dash:location}/bin/dash curl_path = ${curl:location}/bin/curl + +[slap-parameter] +# Default values if not specified +frontend-instance-guid = SOFTINST-11031 +frontend-software-type = frontend +frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg +nbd_port = 1024 +nbd_ip = debian.nbd.vifib.net diff --git a/software/kvm/instance-kvmplus.cfg b/software/kvm/instance-kvmplus.cfg index 1babe8bf0c4de089a06c9505d9148b0bf03b4a87..30d6953303b265bc227ae390543e12d5e30879e3 100644 --- a/software/kvm/instance-kvmplus.cfg +++ b/software/kvm/instance-kvmplus.cfg @@ -4,24 +4,9 @@ # ############################# [buildout] -extends = instance-kvm.cfg +extends = ${template-kvm:output} [kvm-instance] -recipe = slapos.cookbook:kvm -vnc-ip = $${slap-network-information:local-ipv4} -vnc-port = 5901 -nbd-ip = $${slap-parameter:nbd_ip} -nbd-port = $${slap-parameter:nbd_port} -tap = $${slap-network-information:network-interface} -disk-path = $${rootdirectory:srv}/virtual.qcow2 disk-size = 20 -socket-path = $${rootdirectory:var}/qmp_socket -pid-path = $${basedirectory:run}/pid_file smp-count = 2 ram-size = 2048 -mac-address = $${create-mac:mac-address} -runner-path = $${basedirectory:services}/kvm -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 diff --git a/software/kvm/instance-nbd.cfg b/software/kvm/instance-nbd.cfg index af8a61aadee240a98edff83b6d8e5a780e34a992..ae57cfe16b640a2fcd273fa4a9dcbcaa5aee04c5 100644 --- a/software/kvm/instance-nbd.cfg +++ b/software/kvm/instance-nbd.cfg @@ -48,7 +48,7 @@ bytes = 24 [onetimeupload-instance] recipe = slapos.cookbook:onetimeupload ip = $${slap-network-information:global-ipv6} -port = 9999 +port = 8080 image-path = $${rootdirectory:srv}/cdrom.iso log-path = $${rootdirectory:log}/onetimeupload.log shell-path = ${dash:location}/bin/dash diff --git a/software/kvm/software.cfg b/software/kvm/software.cfg index d1abf701f489d26283a934d8d7b6a92a6fa84712..5269d08ae42432b558bd83d9832dc96c4a361d06 100644 --- a/software/kvm/software.cfg +++ b/software/kvm/software.cfg @@ -50,11 +50,8 @@ versions = versions [kvm] recipe = hexagonit.recipe.cmmi -url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.15.1/qemu-kvm-0.15.1.tar.gz -# XXX-Cedric : Upgrade to 1.0 -# url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/1.0/qemu-kvm-1.0.tar.gz -# md5sum = 00a825db46a70ba8ef9fc95da9cc7c1e -md5sum = 8800a7d6b3aa4a168ea7f78dc66c0320 +url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/1.1.1/qemu-kvm-1.1.1.tar.gz +md5sum = f8f5629b00f48192cc0467e1d31c4dd2 configure-options = --disable-sdl --disable-xen @@ -133,21 +130,21 @@ command = [template-kvm] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-kvm.cfg -md5sum = c0f24f40e3c55a30fb584c40e81956da +md5sum = 6aaa9b6ef059a2ed2f022834151086ab output = ${buildout:directory}/template-kvm.cfg mode = 0644 [template-kvmplus] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-kvmplus.cfg -md5sum = 2e35c5b2ac9ee51d8f98fb1199f011c4 +md5sum = 301fbe4eaaab5648e1a933a4c853f5b9 output = ${buildout:directory}/template-kvmplus.cfg mode = 0644 [template-nbd] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-nbd.cfg -md5sum = 692b3da84473fbc962bea9b371b5355b +md5sum = c030e7be231aba25ee0f51703e60ce67 output = ${buildout:directory}/template-nbd.cfg mode = 0644 @@ -169,6 +166,7 @@ mode = 0644 # signature certificates of the following uploaders. # Romain Courteaud # Cedric de Saint Martin +# Test Agent signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE @@ -196,97 +194,120 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- + [versions] Jinja2 = 2.6 +Pygments = 1.5 Werkzeug = 0.8.3 -apache-libcloud = 0.9.1 +apache-libcloud = 0.11.1 async = 0.6.1 buildout-versions = 1.7 +docutils = 0.9.1 gitdb = 0.5.4 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3.4 +hexagonit.recipe.cmmi = 1.6 +ipython = 0.13 +lxml = 2.3.5 meld3 = 0.6.8 plone.recipe.command = 1.1 -pycrypto = 2.5 -slapos.cookbook = 0.57 -slapos.recipe.build = 0.7 -slapos.recipe.template = 2.3 -slapos.toolbox = 0.24 +pycrypto = 2.6 +slapos.cookbook = 0.60 +slapos.recipe.build = 0.10.2 +slapos.recipe.template = 2.4.1 +slapos.toolbox = 0.28 smmap = 0.8.2 z3c.recipe.scripts = 1.0.1 # Required by: -# slapos.core==0.24 -# slapos.toolbox==0.24 -Flask = 0.8 +# slapos.core==0.27 +# slapos.toolbox==0.28 +Flask = 0.9 # Required by: -# slapos.toolbox==0.24 +# slapos.toolbox==0.28 GitPython = 0.3.2.RC1 # Required by: -# slapos.cookbook==0.57 +# slapos.cookbook==0.60 PyXML = 0.8.4 # Required by: -# slapos.toolbox==0.24 +# netaddr==0.7.7 +Sphinx = 1.1.3 + +# Required by: +# slapos.toolbox==0.28 atomize = 0.1.1 # Required by: -# slapos.toolbox==0.24 -feedparser = 5.1.1 +# slapos.toolbox==0.28 +feedparser = 5.1.2 + +# Required by: +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 # Required by: -# slapos.cookbook==0.57 +# slapos.cookbook==0.60 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.57 -netaddr = 0.7.6 +# slapos.cookbook==0.60 +netaddr = 0.7.7 # Required by: -# slapos.core==0.24 +# slapos.core==0.27 netifaces = 0.8 # Required by: # websockify==0.1-dev -numpy = 1.6.1 +numpy = 1.6.2 # Required by: -# slapos.toolbox==0.24 -paramiko = 1.7.7.1 +# slapos.toolbox==0.28 +paramiko = 1.7.7.2 # Required by: -# slapos.toolbox==0.24 -psutil = 0.4.1 +# slapos.toolbox==0.28 +psutil = 0.6.0 # Required by: -# slapos.cookbook==0.57 -# slapos.core==0.24 -# slapos.toolbox==0.24 +# slapos.cookbook==0.60 +# slapos.core==0.27 +# slapos.toolbox==0.28 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.57 -# slapos.toolbox==0.24 -slapos.core = 0.24 +# slapos.cookbook==0.60 +# slapos.toolbox==0.28 +slapos.core = 0.27 # Required by: -# slapos.core==0.24 +# slapos.core==0.27 supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.57 -# slapos.toolbox==0.24 +# slapos.cookbook==0.60 +# slapos.toolbox==0.28 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.57 +# slapos.cookbook==0.60 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.24 -zope.interface = 3.8.0 - -websockify = 0.1-dev +# slapos.core==0.27 +zope.interface = 4.0.1 diff --git a/software/lamp-template-static/software.cfg b/software/lamp-template-static/software.cfg index 52954352e28e40364733939b109038e9e6f35344..773410700c6127aa9f48cf95ea3b5eb5445af547 100644 --- a/software/lamp-template-static/software.cfg +++ b/software/lamp-template-static/software.cfg @@ -46,7 +46,7 @@ Jinja2 = 2.6 Werkzeug = 0.8.2 buildout-versions = 1.7 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 meld3 = 0.6.8 plone.recipe.command = 1.1 slapos.recipe.template = 2.2 diff --git a/software/lamp-template/instance.cfg b/software/lamp-template/instance.cfg deleted file mode 100644 index 902eca283d69f60df885fccc23be3d91e3601207..0000000000000000000000000000000000000000 --- a/software/lamp-template/instance.cfg +++ /dev/null @@ -1,18 +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} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration: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/lamp-template/software.cfg b/software/lamp-template/software.cfg index de0023c8ea855d2f7483b42d78bf67290025020d..19e0c304829e2ede44bb4d01fbffcbf023e97588 100644 --- a/software/lamp-template/software.cfg +++ b/software/lamp-template/software.cfg @@ -1,15 +1,7 @@ [buildout] -versions = versions -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - extends = - ../../stack/lamp.cfg + ../../stack/lamp/buildout.cfg [application] recipe = slapos.recipe.build:download-unpacked @@ -28,20 +20,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} [application-configuration] location = Student shall put here relative path to application top level directory where configuration shall be created - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = - ${instance-recipe:egg} diff --git a/software/lxc/check_exists.sh.in b/software/lxc/check_exists.sh.in new file mode 100644 index 0000000000000000000000000000000000000000..bbda187fb215a76537615e5084f3dff784896995 --- /dev/null +++ b/software/lxc/check_exists.sh.in @@ -0,0 +1,3 @@ +#!${:bash} -e + +${:test-binary} -f ${:file} diff --git a/software/lxc/check_state.sh.in b/software/lxc/check_state.sh.in new file mode 100644 index 0000000000000000000000000000000000000000..ae88e624f00ab623f5a7373bf034dd73b4f4ff6f --- /dev/null +++ b/software/lxc/check_state.sh.in @@ -0,0 +1,8 @@ +#!${:bash} -e + +if [ -f ${:file} ] +then + ${:test-binary} $(${:cat} ${:file}) = ${:value} +else + exit 1 +fi diff --git a/software/lxc/instance-lxc.cfg b/software/lxc/instance-lxc.cfg new file mode 100644 index 0000000000000000000000000000000000000000..37d44361dec0be56556251cd2623867fc18c2395 --- /dev/null +++ b/software/lxc/instance-lxc.cfg @@ -0,0 +1,154 @@ +[buildout] + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +parts = + publish + rootfs + uuid + lxc-conf + shellinabox + certificate-authority + ca-shellinabox + container-promise + shellinabox-promise + rootfs-promise + + +[rootdirectory] +recipe = slapos.cookbook:mkdirectory +etc = $${buildout:directory}/etc +tmp = $${buildout:directory}/tmp +srv = $${buildout:directory}/srv +bin = $${buildout:directory}/bin + +[basedirectory] +recipe = slapos.cookbook:mkdirectory +services = $${rootdirectory:etc}/run +promises = $${rootdirectory:etc}/promise + +[directory] +recipe = slapos.cookbook:mkdirectory +shellinabox = $${rootdirectory:srv}/shellinabox/ +ca-dir = $${rootdirectory:srv}/ca/ + +[cadirectory] +recipe = slapos.cookbook:mkdirectory +requests = $${directory:ca-dir}/requests/ +private = $${directory:ca-dir}/private/ +certs = $${directory:ca-dir}/certs/ +newcerts = $${directory:ca-dir}/newcerts/ +crl = $${directory:ca-dir}/crl/ + +[cadirectory] +recipe = slapos.cookbook:mkdirectory +requests = $${directory:ca-dir}/requests/ +private = $${directory:ca-dir}/private/ +certs = $${directory:ca-dir}/certs/ +newcerts = $${directory:ca-dir}/newcerts/ +crl = $${directory:ca-dir}/crl/ + +[rootfs] +recipe = slapos.cookbook:downloader +url = $${slap-parameter:rootfs} +md5sum = $${slap-parameter:rootfs-md5sum} +downloaded-file = $${rootdirectory:srv}/rootfs.img +downloaded-file-complete = $${:downloaded-file}.complete +binary = $${basedirectory:services}/rootfsdownload +path = ${tar:location}/bin/:${gzip:location}/bin/:${bzip2:location}/bin/:${xz-utils:location}/bin/ +archive = true + +[lxc-conf] +recipe = slapos.recipe.template +url = ${lxc-conf-in:location}/${lxc-conf-in:filename} +output = $${rootdirectory:etc}/lxc.conf +bridge = !!BRIDGE_NAME!! +interface = lxc$${slap-network-information:network-interface} + +[passwd] +recipe = slapos.cookbook:pwgen +file = $${buildout:directory}/.password +pwgen-binary = ${pwgen:location}/bin/pwgen + +[shellinabox] +recipe = slapos.cookbook:shellinabox +ipv6 = $${slap-network-information:global-ipv6} +port = 8080 +shell = ${lxc:location}/bin/lxc-console -n $${uuid:uuid} +wrapper = $${rootdirectory:bin}/shellinaboxd_raw +shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd +password = $${passwd:password} +directory = $${buildout:directory}/ +login-shell = $${rootdirectory:bin}/login +certificate-directory = $${directory:shellinabox} +cert-file = $${directory:shellinabox}/public.crt +key-file = $${directory:shellinabox}/private.key + +[ca-shellinabox] +<= certificate-authority +recipe = slapos.cookbook:certificate_authority.request +executable = $${shellinabox:wrapper} +wrapper = $${rootdirectory:bin}/shellinaboxd +key-file = $${shellinabox:key-file} +cert-file = $${shellinabox:cert-file} + +[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-shellinabox] +<= certificate-authority +recipe = slapos.cookbook:certificate_authority.request +executable = $${shellinabox:wrapper} +wrapper = $${rootdirectory:bin}/shellinaboxd +key-file = $${shellinabox:key-file} +cert-file = $${shellinabox:cert-file} + +[uuid] +recipe = slapos.cookbook:uuid +cache-file = $${buildout:directory}/.slapcontainername + +[publish] +recipe = slapos.cookbook:publish +url = https://[$${shellinabox:ipv6}]:$${shellinabox:port}/ +password = $${shellinabox:password} + +[template-promise-state] +recipe = slapos.recipe.template +url = ${promise-state:location}/${promise-state:filename} +bash = ${bash:location}/bin/bash +test-binary = ${coreutils:location}/bin/test +cat = ${coreutils:location}/bin/cat +value = started +mode = 700 + +[container-promise] +<= template-promise-state +output = $${basedirectory:promises}/slapcontainer +file = $${buildout:directory}/.slapcontainer.state + +[shellinabox-promise] +<= template-promise-state +output = $${basedirectory:promises}/shellinabox +file = $${buildout:directory}/.shellinabox.state + +[rootfs-promise] +recipe = slapos.recipe.template +url = ${promise-exists:location}/${promise-exists:filename} +output = $${basedirectory:promises}/rootfs +bash = ${bash:location}/bin/bash +test-binary = ${coreutils:location}/bin/test +file = $${rootfs:downloaded-file-complete} +mode = 700 + +[slap-parameter] +rootfs-md5sum = diff --git a/software/lxc/instance.cfg b/software/lxc/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f177104b055c8205e085447181e77f3f34987f7d --- /dev/null +++ b/software/lxc/instance.cfg @@ -0,0 +1,20 @@ +[buildout] +parts = + switch-softwaretype + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} +offline = true + +[switch-softwaretype] +recipe = slapos.cookbook:softwaretype +default = ${template-lxc:output} + +[slap-connection] +# part to migrate to new - separated words +computer-id = $${slap_connection:computer_id} +partition-id = $${slap_connection:partition_id} +server-url = $${slap_connection:server_url} +software-release-url = $${slap_connection:software_release_url} +key-file = $${slap_connection:key_file} +cert-file = $${slap_connection:cert_file} diff --git a/software/lxc/lxc.conf.in b/software/lxc/lxc.conf.in new file mode 100644 index 0000000000000000000000000000000000000000..af35493d35314633965b15a9fc475012d8971695 --- /dev/null +++ b/software/lxc/lxc.conf.in @@ -0,0 +1,29 @@ +# ${slap-connection:requested} + +lxc.utsname = ${uuid:uuid} + +lxc.network.type = veth +lxc.network.link = ${:bridge} +lxc.network.veth.pair = ${:interface} +lxc.network.name = eth0 +lxc.network.flags = up + +lxc.tty = 4 +lxc.pts = 1024 + +lxc.cgroup.devices.deny = a +lxc.cgroup.devices.allow = c 1:3 rwm +lxc.cgroup.devices.allow = c 1:5 rwm +lxc.cgroup.devices.allow = c 5:1 rwm +lxc.cgroup.devices.allow = c 5:0 rwm +lxc.cgroup.devices.allow = c 4:0 rwm +lxc.cgroup.devices.allow = c 4:1 rwm +lxc.cgroup.devices.allow = c 1:9 rwm +lxc.cgroup.devices.allow = c 1:8 rwm +lxc.cgroup.devices.allow = c 136:* rwm +lxc.cgroup.devices.allow = c 5:2 rwm +lxc.cgroup.devices.allow = c 254:0 rwm + +lxc.rootfs = ${rootfs:downloaded-file} + +lxc.cap.drop = sys_module sys_time sys_chroot mknod diff --git a/software/lxc/rootfs.README b/software/lxc/rootfs.README new file mode 100644 index 0000000000000000000000000000000000000000..cabf181b73b1d2f6f41c0647cb89384496af1741 --- /dev/null +++ b/software/lxc/rootfs.README @@ -0,0 +1,59 @@ +This file explain how to easily generate a rootfs for slapcontainer, +explaining how to generate a debian rootfs. + +This can be used in order to generate any rootfs. + +NB: A ready to use rootfs is available at : + http://[2001:380:e0c:155:5054:ff:fe5d:a604]/debian-wheezy.tar.xz + +Requirements: +============= + + Any Linux distro with the following programs installed : + + * LXC userland tools (for generating the rootfs) + * debootstrap (in order to use lxc-debian script) + * dpkg (a dependency of debootstrap) + * Qemu tools (providing qemu-img) + +Step by step instructions explained: +==================================== + + First we need to generate a raw image. + + 1. Run :: + $ qemu-img create -f raw image-name.raw SIZE + + 2. Now format it (in this example we will format in in ext4) :: + $ mkfs.ext4 image-name.raw + + We will used lxc-debian script provided in lxc tools in order to + generate the rootfs. + + lxc-debian is run this way :: + lxc-debian -p /path/ + + lxc-debian will create a subdirectory in /path/ named “rootfs”, + and a configuration file in /path/. + + So in order to generate the rootfs on the raw image, create rootfs + directory and mount the raw img in it. + + 3. :: + $ mkdir -p /path/rootfs/ + $ mount image-name.raw /path/rootfs + + 4. Next, run the lxc-debian script :: + $ lxc-debian -p /path/ + + Dont forget to change the default password, before unmount it. + + 5. :: + $ sudo chroot /path/rootfs/ /bin/passwd + + 6. :: + $ umount /path/rootfs + + Next, you can archive it using sparse tar, and compress it. + 7. :: + $ tar -Sc image-name.raw | pxz -T8 > image-name.tar.gz diff --git a/software/lxc/software.cfg b/software/lxc/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c96e03ffb8a539c77b2558cac77dbfe590c4b9a6 --- /dev/null +++ b/software/lxc/software.cfg @@ -0,0 +1,71 @@ +[buildout] + +extends = + ../../stack/slapos.cfg + ../../component/lxc/buildout.cfg + ../../component/lxml-python/buildout.cfg + ../../component/curl/buildout.cfg + ../../component/gzip/buildout.cfg + ../../component/bzip2/buildout.cfg + ../../component/xz-utils/buildout.cfg + ../../component/tar/buildout.cfg + ../../component/shellinabox/buildout.cfg + ../../component/pwgen/buildout.cfg + ../../component/bash/buildout.cfg + ../../component/coreutils/buildout.cfg + +parts = + lxml-python + template + template-lxc + lxc-conf-in + slapos-cookbook + slapos-toolbox + lxc + shellinabox + pwgen + +[template] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance.cfg +md5sum = c722ba58b06d3105f64fdeccbbd689bb +output = ${buildout:directory}/template.cfg +mode = 0644 + +[template-lxc] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance-lxc.cfg +md5sum = af5e31fb41e2d31b25f172df45f29fc6 +output = ${buildout:directory}/template-lxc.cfg +mode = 0644 + +[download] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/${:filename} +download-only = true +mode = 0644 + +[lxc-conf-in] +<= download +filename = lxc.conf.in +md5sum = b25334fc369e4e0f608bc64f14b0315d + +[promise-state] +<= download +filename = check_state.sh.in +md5sum = 725fb0477f8b8778566ed4b22b25bf27 + +[promise-exists] +<= download +filename = check_exists.sh.in +md5sum = 60d4f5f73a3d10a3d7d7201aab977d19 + +[slapos-toolbox] +recipe = zc.recipe.egg +scripts = slapcontainer +eggs = + slapos.toolbox + +[versions] +slapos.cookbook = 0.64.1 +slapos.toolbox = 0.30 diff --git a/software/magento/software.cfg b/software/magento/software.cfg index c7f459c1f9baf6f5bb64c9b4f8a2363ff0fe5867..81087bdc3615beea8657582caf001b2270d48eec 100644 --- a/software/magento/software.cfg +++ b/software/magento/software.cfg @@ -62,7 +62,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/mariadb/software.cfg b/software/mariadb/software.cfg index 55b87b248940c82ba0b28c656c00bcda38731e21..8fa84885b1a35f0c55a35156b469d619d2920dfb 100644 --- a/software/mariadb/software.cfg +++ b/software/mariadb/software.cfg @@ -115,7 +115,7 @@ xml-marshaller = 0.9.7 setuptools = 0.6c12dev-r88795 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 plone.recipe.command = 1.1 # Use SlapOS patched zc.buildout diff --git a/software/memcached/software.cfg b/software/memcached/software.cfg index c25ca03a3bf052ede227e3b2abb3773a2c5c7f64..0ad482438686db1e226faa26c6d7ba16d34138d6 100644 --- a/software/memcached/software.cfg +++ b/software/memcached/software.cfg @@ -45,7 +45,7 @@ xml-marshaller = 0.9.7 setuptools = 0.6c12dev-r88795 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 plone.recipe.command = 1.1 Jinja2 = 2.6 diff --git a/software/mysql-5.1/software.cfg b/software/mysql-5.1/software.cfg index 30a7b97a4864290cc2fd3a4b2dddab24a4c5f9d8..1c58d3c3e3a456b2227f03143e3e94ab5b4bb3fa 100644 --- a/software/mysql-5.1/software.cfg +++ b/software/mysql-5.1/software.cfg @@ -77,7 +77,7 @@ Jinja2 = 2.6 Werkzeug = 0.8.2 buildout-versions = 1.7 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 meld3 = 0.6.8 rdiff-backup = 1.0.5 slapos.recipe.template = 2.2 diff --git a/software/net2ftp/configure.py b/software/net2ftp/configure.py index 2c16f4e3c75dde1365314ab6b9f05c7006d7de29..30ae4e1998e81b948f16f08d202aeed515f2202a 100644 --- a/software/net2ftp/configure.py +++ b/software/net2ftp/configure.py @@ -4,7 +4,7 @@ import MySQLdb def setup(args): mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args - + sql_file = os.path.join(htdocs, "create_tables.sql") try: conn = MySQLdb.connect (host = mysql_host, @@ -19,7 +19,7 @@ def setup(args): sql_script = f.readline() conn.close() except: - return + return if __name__ == '__main__': - setup(sys.argv[1:]) \ No newline at end of file + setup(sys.argv[1:]) diff --git a/software/net2ftp/software.cfg b/software/net2ftp/software.cfg index 9d2dc3520286e5769b06c55086448b270443dbac..139f8611af2b5f2ca4b29b26411621834dc834ab 100644 --- a/software/net2ftp/software.cfg +++ b/software/net2ftp/software.cfg @@ -87,7 +87,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/openX/software.cfg b/software/openX/software.cfg index 00a0befaa27cd0687ca04c457a6062b0418cef9f..cb9f031c2aab8a7c206939d734959c65950a6254 100644 --- a/software/openX/software.cfg +++ b/software/openX/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/os-commerce/software.cfg b/software/os-commerce/software.cfg index db98c08f127e22d8f1a33cf9ad315621af4f7af3..b19fc63846054de7aa1ee3278511003fc8482903 100644 --- a/software/os-commerce/software.cfg +++ b/software/os-commerce/software.cfg @@ -64,7 +64,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/phpbb/software.cfg b/software/phpbb/software.cfg index 9c0b861a8f6d9ca74bd5aee8a7a0a69dabfb4439..3986d11e967322a0ad1d11b242d10a13edec72dd 100644 --- a/software/phpbb/software.cfg +++ b/software/phpbb/software.cfg @@ -66,7 +66,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/phpmyadmin/software.cfg b/software/phpmyadmin/software.cfg index 10298aa1b764c0c779b6c40efdf72166036c17ea..39d105f2fd4f096ea1a2b319ddde6399f1e6cc60 100644 --- a/software/phpmyadmin/software.cfg +++ b/software/phpmyadmin/software.cfg @@ -74,7 +74,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/phpnuke/software.cfg b/software/phpnuke/software.cfg index 646ffd506facff66bb369943f1eeb86a702914a6..61c2131a032842ce09e151b8cface8edc947807a 100644 --- a/software/phpnuke/software.cfg +++ b/software/phpnuke/software.cfg @@ -75,7 +75,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/pimcore/software.cfg b/software/pimcore/software.cfg index 0d4945b0cf736fd31c757262cd8dda643201d44e..7046ba39762eaaf39eb687037d81e38f4171aa66 100644 --- a/software/pimcore/software.cfg +++ b/software/pimcore/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/piwigo/software.cfg b/software/piwigo/software.cfg index 73a4040bd4154178a4d7b6439f5895229befe055..bed8b88e90c09f8ba5b1b0ea0fbf5085305fc36f 100644 --- a/software/piwigo/software.cfg +++ b/software/piwigo/software.cfg @@ -75,7 +75,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/piwik/software.cfg b/software/piwik/software.cfg index e8376b1448309e3e4d0455c4e598434e8f9925d0..d26a9aa40b83f1201c85713987458873c6f3fc9e 100644 --- a/software/piwik/software.cfg +++ b/software/piwik/software.cfg @@ -65,7 +65,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/prestashop/software.cfg b/software/prestashop/software.cfg index 72ddd787ca7d2d9a4eab0ced3fade1725914ea12..2525eb81cfaee0cfb990847e05a4a66dfc73bc39 100644 --- a/software/prestashop/software.cfg +++ b/software/prestashop/software.cfg @@ -66,7 +66,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/pulse/software.cfg b/software/pulse/software.cfg index 714b4748f8026d0f1144c5a7619d619dd419d9f6..0a6e94597c1465e86a82a597d07747ac8bb61574 100644 --- a/software/pulse/software.cfg +++ b/software/pulse/software.cfg @@ -138,7 +138,7 @@ xml-marshaller = 0.9.7 setuptools = 0.6c12dev-r88795 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 plone.recipe.command = 1.1 # Use SlapOS patched zc.buildout diff --git a/software/punbb/software.cfg b/software/punbb/software.cfg index e3e413afbe15136773e8ab1ab070590aaf44c1ec..f22451e5638aaf8f55c92b65dd5b376c59673c84 100644 --- a/software/punbb/software.cfg +++ b/software/punbb/software.cfg @@ -74,7 +74,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/seleniumrunner/software.cfg b/software/seleniumrunner/software.cfg index cf6baf97f67293b36daed0a664f3a0b9314f3af7..1d5cf11c3d8eb7ce4c9e8e4f123031967675b2b1 100644 --- a/software/seleniumrunner/software.cfg +++ b/software/seleniumrunner/software.cfg @@ -81,7 +81,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.42 diff --git a/software/simpleMachineForum/software.cfg b/software/simpleMachineForum/software.cfg index 8fc541683a269ee18fbb1408650b870fc6bacc71..1d51de1d504b2184dba182c666649e2d11ad94d3 100644 --- a/software/simpleMachineForum/software.cfg +++ b/software/simpleMachineForum/software.cfg @@ -64,7 +64,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg index 7fd00b152fe6b094e3b7a09c5c7874dc4f51e5e3..9b90c5215c5c99b4222e13ad5fe2b3ea2494b143 100644 --- a/software/slaprunner/instance-runner.cfg +++ b/software/slaprunner/instance-runner.cfg @@ -6,7 +6,9 @@ parts = dropbear-server-add-authorized-key sshkeys-authority publish-connection-informations + frontend-promise + eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} offline = true @@ -41,6 +43,12 @@ project = $${:home}/project software-root = $${:home}/software instance-root = $${:home}/instance +#Create password recovery code for slaprunner +[recovery-code] +recipe = slapos.cookbook:generate.password +storage-path = $${rootdirectory:etc}/.rcode +bytes = 4 + # Deploy cloud9 and slaprunner [cloud9] recipe = slapos.cookbook:cloud9 @@ -49,8 +57,8 @@ 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 +node-binary = ${nodejs-0.4:location}/bin/node +cloud9 = ${cloud9-stable:location}/bin/cloud9.js [slaprunner] recipe = slapos.cookbook:slaprunner @@ -65,6 +73,8 @@ working-directory = $${runnerdirectory:home} project-directory = $${runnerdirectory:project} software-directory = $${runnerdirectory:software-root} instance-directory = $${runnerdirectory:instance-root} +etc_dir = $${rootdirectory:etc} +log_dir = $${basedirectory:log} ssh_client = $${sshkeys-dropbear:wrapper} public_key = $${sshkeys-dropbear:public-key} private_key = $${sshkeys-dropbear:private-key} @@ -118,7 +128,7 @@ key = $${slap-parameter:authorized-key} # Request frontend [request-frontend] <= slap-connection -recipe = slapos.cookbook:request +recipe = slapos.cookbook:requestoptional 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 @@ -135,8 +145,25 @@ 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} - +password_recovery_code = $${recovery-code:passwd} [slap-parameter] # Default value if no ssh key is specified authorized-key = + + + +# 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 + diff --git a/software/slaprunner/software.cfg b/software/slaprunner/software.cfg index 0a187978c95c6fe896fc45de01499ce908125cf8..88c04d405415121ad8bc7ccd57a1a5ec4d88eeb9 100644 --- a/software/slaprunner/software.cfg +++ b/software/slaprunner/software.cfg @@ -1,4 +1,5 @@ [buildout] + extends = ../../stack/slapos.cfg ../../stack/flask.cfg @@ -6,11 +7,12 @@ extends = ../../component/dropbear/buildout.cfg ../../component/git/buildout.cfg ../../component/cloud9/buildout.cfg + ../../component/dash/buildout.cfg parts = template - eggs slapos-cookbook + eggs [template] recipe = slapos.recipe.template @@ -23,13 +25,14 @@ md5sum = 5307e4200f044ae57b504ad68444491c recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-runner.cfg output = ${buildout:directory}/template-runner.cfg -md5sum = 0ddddd0be595df4fb15d55e566cc3bc3 +md5sum = 82bf13fafa017245e853afad20ea3704 mode = 0644 -[slapos-cookbook] -eggs += +[eggs] +recipe = z3c.recipe.scripts +eggs = slapos.libnetworkcache - slapos.toolbox + slapos.toolbox[flask_auth] slapos.core [networkcache] @@ -51,102 +54,109 @@ signature-certificate-list = -----END CERTIFICATE----- [versions] +Flask-Auth = 0.8 Jinja2 = 2.6 Pygments = 1.5 Werkzeug = 0.8.3 -apache-libcloud = 0.10.1 +apache-libcloud = 0.11.1 async = 0.6.1 buildout-versions = 1.7 -docutils = 0.9 +docutils = 0.9.1 gitdb = 0.5.4 -hexagonit.recipe.cmmi = 1.5.1 -ipython = 0.12.1 +hexagonit.recipe.cmmi = 1.6 +ipython = 0.13 meld3 = 0.6.8 plone.recipe.command = 1.1 pycrypto = 2.6 -slapos.cookbook = 0.53 +slapos.cookbook = 0.61 slapos.libnetworkcache = 0.12 -slapos.recipe.build = 0.9 -slapos.recipe.template = 2.4 -slapos.toolbox = 0.26 +slapos.recipe.template = 2.4.1 +slapos.toolbox = 0.28.2 smmap = 0.8.2 +z3c.recipe.scripts = 1.0.1 # Required by: -# slapos.core==0.26.1 -Flask = 0.8 +# slapos.core==0.28.2 +# slapos.toolbox==0.28.2 +Flask = 0.9 # Required by: -# slapos.toolbox==0.24 +# slapos.toolbox==0.28.2 GitPython = 0.3.2.RC1 # Required by: -# slapos.cookbook==0.53 +# slapos.cookbook==0.61 PyXML = 0.8.4 # Required by: # netaddr==0.7.7 Sphinx = 1.1.3 + # Required by: -# slapos.toolbox==0.24 +# slapos.toolbox==0.28.2 atomize = 0.1.1 # Required by: -# slapos.toolbox==0.24 +# slapos.toolbox==0.28.2 feedparser = 5.1.2 # Required by: -# slapos.cookbook==0.53 +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 + +# Required by: +# slapos.cookbook==0.61 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.53 -# slapos.core==0.26.1 +# slapos.core==0.28.2 +# slapos.toolbox==0.28.2 # xml-marshaller==0.9.7 -lxml = 2.3.4 +lxml = 2.3.5 # Required by: -# slapos.cookbook==0.53 +# slapos.cookbook==0.61 netaddr = 0.7.7 # Required by: -# slapos.core==0.26.1 +# slapos.core==0.28.2 netifaces = 0.8 # Required by: -# slapos.toolbox==0.24 +# slapos.toolbox==0.28.2 paramiko = 1.7.7.2 # Required by: -# slapos.toolbox==0.24 -psutil = 0.4.1 +# slapos.toolbox==0.28.2 +psutil = 0.6.1 # Required by: -# slapos.cookbook==0.53 -# slapos.core==0.26.1 +# slapos.cookbook==0.61 +# slapos.core==0.28.2 # slapos.libnetworkcache==0.12 -# slapos.toolbox==0.24 +# slapos.toolbox==0.28.2 # supervisor==3.0a12 -# zc.buildout==1.6.0-dev-SlapOS-004 +# zc.buildout==1.6.0-dev-SlapOS-006 # zc.recipe.egg==1.3.2 # zope.interface==4.0.1 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.53 -slapos.core = 0.26.1 +# slapos.cookbook==0.61 +slapos.core = 0.28.2 # Required by: -# slapos.core==0.26.1 +# slapos.core==0.28.2 supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.53 +# slapos.cookbook==0.61 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.53 +# slapos.cookbook==0.61 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.26.1 +# slapos.core==0.28.2 zope.interface = 4.0.1 diff --git a/software/spip/software.cfg b/software/spip/software.cfg index c701c38c66891c4da31ce0bc93ca07be282205ed..6b34274190b5299e328c1e839db605a083567f89 100644 --- a/software/spip/software.cfg +++ b/software/spip/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/statusnet/software.cfg b/software/statusnet/software.cfg index 6b31dbc6c7b6a2f186aee82d91550fafa0055ed3..e0a50638dc010d6a81f5f1b51e155cbcbab73b53 100644 --- a/software/statusnet/software.cfg +++ b/software/statusnet/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/sugar-crm/software.cfg b/software/sugar-crm/software.cfg index 0b39343325e51cf27a49d1203f0dbe06ceeec3a7..a3a7540b9ad79594bf7dd9d6bd8826d266510d59 100644 --- a/software/sugar-crm/software.cfg +++ b/software/sugar-crm/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/tiki/software.cfg b/software/tiki/software.cfg index 75976a6c0a59a5a9340599000d16d91f2a22eddc..34da4942519bdb2edf16febb6db9a67547955237 100644 --- a/software/tiki/software.cfg +++ b/software/tiki/software.cfg @@ -63,7 +63,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/xoops/software.cfg b/software/xoops/software.cfg index fd9e7c8f789ed90031aa5fd452bdfe4cd901b204..7eef10efc16330b01bd37162742f1d7c477fe40c 100644 --- a/software/xoops/software.cfg +++ b/software/xoops/software.cfg @@ -64,7 +64,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/software/xwiki/software.cfg b/software/xwiki/software.cfg index 35ddf268b2e0b03cf57bf9d41026b533385c84e4..4ce0de8daddaca48c6ec01948357f8262b4e9f4a 100644 --- a/software/xwiki/software.cfg +++ b/software/xwiki/software.cfg @@ -40,7 +40,7 @@ xml-marshaller = 0.9.7 setuptools = 0.6c12dev-r88846 hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 plone.recipe.command = 1.1 # Use SlapOS patched zc.buildout diff --git a/software/zabbix-agent/software.cfg b/software/zabbix-agent/software.cfg index 4df644300e348073d47d7bf12e9567c416c96de5..c8ae747fcee6a528ff783f3677e72db91f63fe3a 100644 --- a/software/zabbix-agent/software.cfg +++ b/software/zabbix-agent/software.cfg @@ -1,30 +1,15 @@ [buildout] + extends = ../../component/dcron/buildout.cfg ../../component/logrotate/buildout.cfg ../../component/zabbix/buildout.cfg - ../../component/lxml-python/buildout.cfg - -find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions + ../../stack/slapos.cfg parts = - eggs + slapos-cookbook template -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - -[eggs] -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - slapos.cookbook - [template] # Default template for the instance. recipe = slapos.recipe.template @@ -33,493 +18,93 @@ md5sum = 98a680fe8fddce5dcee455e65c228fde output = ${buildout:directory}/template.cfg mode = 0644 -[versions] -zc.buildout = 1.5.3-dev-SlapOS-001 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 - -# Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.4 -PyXML = 0.8.4 - -# 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.4 -# slapos.core==0.2 -netaddr = 0.7.5 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:01:36.219846 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 - -# Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.4 -PyXML = 0.8.4 - -# 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.4 -# slapos.core==0.2 -netaddr = 0.7.5 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 +[networkcache] +# signature certificates of the following uploaders. +# Cedric de Saint Martin +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----- -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:15:31.979623 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 - -# Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.4 -PyXML = 0.8.4 - -# 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.4 -# slapos.core==0.2 -netaddr = 0.7.3 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c11 - -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:16:55.921352 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 - -# Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.4 -PyXML = 0.8.4 - -# 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.4 -# slapos.core==0.2 -netaddr = 0.7.3 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c11 - -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:17:42.100375 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 - -# Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.4 -PyXML = 0.8.4 - -# 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.4 -# slapos.core==0.2 -netaddr = 0.7.3 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c11 - -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:19:50.709164 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 - -# Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.4 -PyXML = 0.8.4 - -# 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.4 -# slapos.core==0.2 -netaddr = 0.7.3 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c11 - -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 +[versions] +Jinja2 = 2.6 +Pygments = 1.5 +Werkzeug = 0.8.3 +buildout-versions = 1.7 +docutils = 0.9.1 +hexagonit.recipe.cmmi = 1.6 +ipython = 0.13 +meld3 = 0.6.8 +slapos.cookbook = 0.59 +slapos.recipe.template = 2.4 # Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:39:36.870559 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.recipe.template = 1.1 +# slapos.core==0.26.2 +Flask = 0.9 # Required by: -# slapos.core==0.2 -Flask = 0.6.1 +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 # Required by: -# slapos.cookbook==0.4 +# slapos.cookbook==0.59 PyXML = 0.8.4 # 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.4 -# slapos.core==0.2 -netaddr = 0.7.3 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.4 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c11 - -# Required by: -# slapos.cookbook==0.4 -slapos.core = 0.2 - -# Required by: -# slapos.core==0.2 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.4 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.4 -zc.recipe.egg = 1.3.2 +# netaddr==0.7.7 +Sphinx = 1.1.3 # Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - -# Added by Buildout Versions at 2011-06-13 10:41:41.115948 -Jinja2 = 2.5.5 -Werkzeug = 0.6.2 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3 -meld3 = 0.6.7 -slapos.cookbook = 0.5 -slapos.recipe.template = 1.1 +# slapos.cookbook==0.59 +inotifyx = 0.2.0 # Required by: -# slapos.core==0.2 -Flask = 0.6.1 - -# Required by: -# slapos.cookbook==0.5 -PyXML = 0.8.4 +# slapos.cookbook==0.59 +# slapos.core==0.26.2 +# xml-marshaller==0.9.7 +lxml = 2.3.4 # Required by: -# slapos.recipe.template==1.1 -collective.recipe.template = 1.8 +# slapos.cookbook==0.59 +netaddr = 0.7.7 # Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +# slapos.core==0.26.2 +netifaces = 0.8 # Required by: -# slapos.cookbook==0.5 -# slapos.core==0.2 -netaddr = 0.7.3 - -# Required by: -# slapos.core==0.2 -netifaces = 0.5 - -# Required by: -# slapos.cookbook==0.5 -# slapos.core==0.2 -# zc.buildout==1.5.3-dev-SlapOS-001 +# slapos.cookbook==0.59 +# slapos.core==0.26.2 +# zc.buildout==1.6.0-dev-SlapOS-006 # zc.recipe.egg==1.3.2 -setuptools = 0.6c11 +setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.5 -slapos.core = 0.2 +# slapos.cookbook==0.59 +slapos.core = 0.26.2 # Required by: -# slapos.core==0.2 -supervisor = 3.0a10 +# slapos.core==0.26.2 +supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.5 +# slapos.cookbook==0.59 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.5 +# slapos.cookbook==0.59 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.2 -zope.interface = 3.6.3 - +# slapos.core==0.26.2 +zope.interface = 4.0.1 diff --git a/software/zencart/configure.py b/software/zencart/configure.py index 1f6eb6a92deb40f3b4633353e9f1361d322d6df4..a8c9e6fad5a55f95a0c21f7c34c6e8bb83c4d30e 100644 --- a/software/zencart/configure.py +++ b/software/zencart/configure.py @@ -4,7 +4,7 @@ import fileinput def setup(args): mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args - + admin_dir = "admin-" + mysql_user admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php") searchPattern = "/admin" @@ -17,4 +17,4 @@ def setup(args): os.chmod(admin_include_file, 0444) if __name__ == '__main__': - setup(sys.argv[1:]) \ No newline at end of file + setup(sys.argv[1:]) diff --git a/software/zencart/software.cfg b/software/zencart/software.cfg index ce7f05a0499273654185c655ca704862958bae31..874500776934789efee02fe0a41314e00bd9bf9c 100644 --- a/software/zencart/software.cfg +++ b/software/zencart/software.cfg @@ -76,7 +76,7 @@ PyXML = 0.8.4 # Required by: # hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +hexagonit.recipe.download = 1.5.1 # Required by: # slapos.cookbook==0.34 diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg index 623890e07a600aa54df5b921d1049a453cbbd081..8d433951fb0d034e90689926c12bf41db6fb8682 100644 --- a/stack/erp5/buildout.cfg +++ b/stack/erp5/buildout.cfg @@ -145,7 +145,7 @@ parts = [slapos.cookbook-repository] recipe = plone.recipe.command stop-on-error = true -branch = erp5-component +branch = erp5 revision = location = ${buildout:parts-directory}/${:_buildout_section_name_} command = "${git:location}/bin/git" clone --branch "${:branch}" --quiet http://git.erp5.org/repos/slapos.git "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi diff --git a/stack/flask.cfg b/stack/flask.cfg index 7f39a386f8d3559e5c2a3c462ddaad2899909dc3..88394682f53bbc05513ef8279a62a4c19b38042f 100644 --- a/stack/flask.cfg +++ b/stack/flask.cfg @@ -1,34 +1,13 @@ # Stack for Flask microframework: http://flask.pocoo.org/ [buildout] extends = - ../component/python-2.7/buildout.cfg - ../component/lxml-python/buildout.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 + slapos.cfg parts = - eggs - -# Unzip, as Flask can have a lot of troubles with zipped eggs -unzip = true + slapos-cookbook + flask-egg -[eggs] -python = python2.7 +[flask-egg] recipe = zc.recipe.egg eggs = - ${lxml-python:egg} Flask - slapos.cookbook - -[lxml-python] -python = python2.7 diff --git a/stack/lamp/buildout.cfg b/stack/lamp/buildout.cfg index 39df34e28f624b2f95ece9fdf8534993dc63b124..383ed73ee6dca891a31cda909fd6506df6193f26 100644 --- a/stack/lamp/buildout.cfg +++ b/stack/lamp/buildout.cfg @@ -66,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 = ae9c0f8c70a62f13eb948424c99d71e2 +md5sum = 8bb0b03689d2be9566ed1ef3e96b4403 mode = 0644 [template-apache-backup] @@ -135,6 +135,16 @@ eggs = [networkcache] # Romain Courteaud + Sebastien Robin + Alain Takoudjou # + Cedric de Saint Martin signature certificate +# List of signatures of uploaders we trust: +# Romain Courteaud +# Sebastien Robin +# Kazuhiko Shiozaki +# Cedric de Saint Martin +# Yingjie Xu +# Gabriel Monnerat +# Łukasz Nowak +# Test Agent Signature +# Alain Takoudjou signature-certificate-list = -----BEGIN CERTIFICATE----- MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE @@ -163,17 +173,17 @@ signature-certificate-list = hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg== -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- - MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV - BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER - MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR - T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5 - psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN - NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW - BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk - C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke - LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss - dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2 - n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR + MIIB7jCCAVegAwIBAgIJAJWA0jQ4o9DGMA0GCSqGSIb3DQEBBQUAMA8xDTALBgNV + BAMMBHg2MXMwIBcNMTExMTI0MTAyNDQzWhgPMjExMTEwMzExMDI0NDNaMA8xDTAL + BgNVBAMMBHg2MXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANdJNiFsRlkH + vq2kHP2zdxEyzPAWZH3CQ3Myb3F8hERXTIFSUqntPXDKXDb7Y/laqjMXdj+vptKk + 3Q36J+8VnJbSwjGwmEG6tym9qMSGIPPNw1JXY1R29eF3o4aj21o7DHAkhuNc5Tso + 67fUSKgvyVnyH4G6ShQUAtghPaAwS0KvAgMBAAGjUDBOMB0GA1UdDgQWBBSjxFUE + RfnTvABRLAa34Ytkhz5vPzAfBgNVHSMEGDAWgBSjxFUERfnTvABRLAa34Ytkhz5v + PzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAFLDS7zNhlrQYSQO5KIj + z2RJe3fj4rLPklo3TmP5KLvendG+LErE2cbKPqnhQ2oVoj6u9tWVwo/g03PMrrnL + KrDm39slYD/1KoE5kB4l/p6KVOdeJ4I6xcgu9rnkqqHzDwI4v7e8/D3WZbpiFUsY + vaZhjNYKWQf79l6zXfOvphzJ -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV @@ -188,39 +198,104 @@ signature-certificate-list = Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAIlBksrZVkK8MA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMzU3MCAXDTEyMDEyNjEwNTUyOFoYDzIxMTIwMTAyMTA1NTI4WjAT + MREwDwYDVQQDDAhDT01QLTM1NzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + ts+iGUwi44vtIfwXR8DCnLtHV4ydl0YTK2joJflj0/Ws7mz5BYkxIU4fea/6+VF3 + i11nwBgYgxQyjNztgc9u9O71k1W5tU95yO7U7bFdYd5uxYA9/22fjObaTQoC4Nc9 + mTu6r/VHyJ1yRsunBZXvnk/XaKp7gGE9vNEyJvPn2bkCAwEAAaNQME4wHQYDVR0O + BBYEFKuGIYu8+6aEkTVg62BRYaD11PILMB8GA1UdIwQYMBaAFKuGIYu8+6aEkTVg + 62BRYaD11PILMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAMoTRpBxK + YLEZJbofF7gSrRIcrlUJYXfTfw1QUBOKkGFFDsiJpEg4y5pUk1s5Jq9K3SDzNq/W + it1oYjOhuGg3al8OOeKFrU6nvNTF1BAvJCl0tr3POai5yXyN5jlK/zPfypmQYxE+ + TaqQSGBJPVXYt6lrq/PRD9ciZgKLOwEqK8w= + -----END CERTIFICATE----- + -----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 CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAMNZBmoIOXPBMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMTMyMCAXDTEyMDUwMjEyMDQyNloYDzIxMTIwNDA4MTIwNDI2WjAT + MREwDwYDVQQDDAhDT01QLTEzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + 6peZQt1sAmMAmSG9BVxxcXm8x15kE9iAplmANYNQ7z2YO57c10jDtlYlwVfi/rct + xNUOKQtc8UQtV/fJWP0QT0GITdRz5X/TkWiojiFgkopza9/b1hXs5rltYByUGLhg + 7JZ9dZGBihzPfn6U8ESAKiJzQP8Hyz/o81FPfuHCftsCAwEAAaNQME4wHQYDVR0O + BBYEFNuxsc77Z6/JSKPoyloHNm9zF9yqMB8GA1UdIwQYMBaAFNuxsc77Z6/JSKPo + yloHNm9zF9yqMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAl4hBaJy1 + cgiNV2+Z5oNTrHgmzWvSY4duECOTBxeuIOnhql3vLlaQmo0p8Z4c13kTZq2s3nhd + Loe5mIHsjRVKvzB6SvIaFUYq/EzmHnqNdpIGkT/Mj7r/iUs61btTcGUCLsUiUeci + Vd0Ozh79JSRpkrdI8R/NRQ2XPHAo+29TT70= + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT + MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA + o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A + sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1 + mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O + BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK + mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2 + M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs + 5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e + x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI= + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV + BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER + MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR + T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5 + psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN + NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW + BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk + C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke + LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss + dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2 + n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR + -----END CERTIFICATE----- [versions] Jinja2 = 2.6 Pygments = 1.5 Werkzeug = 0.8.3 -apache-libcloud = 0.10.1 +apache-libcloud = 0.11.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 +hexagonit.recipe.cmmi = 1.6 +ipython = 0.13 meld3 = 0.6.8 pycrypto = 2.6 rdiff-backup = 1.0.5 -slapos.cookbook = 0.55 -slapos.recipe.build = 0.9 +slapos.cookbook = 0.60 +slapos.recipe.build = 0.10.2 slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.4 -slapos.toolbox = 0.25 +slapos.recipe.template = 2.4.1 +slapos.toolbox = 0.28 smmap = 0.8.2 # Required by: -# slapos.core==0.25 -# slapos.toolbox==0.25 -Flask = 0.8 +# slapos.core==0.27 +# slapos.toolbox==0.28 +Flask = 0.9 # Required by: -# slapos.toolbox==0.25 +# slapos.toolbox==0.28 GitPython = 0.3.2.RC1 # Required by: -# slapos.cookbook==0.55 +# slapos.cookbook==0.60 PyXML = 0.8.4 # Required by: @@ -228,65 +303,69 @@ PyXML = 0.8.4 Sphinx = 1.1.3 # Required by: -# slapos.toolbox==0.25 +# slapos.toolbox==0.28 atomize = 0.1.1 # Required by: -# slapos.toolbox==0.25 +# slapos.toolbox==0.28 feedparser = 5.1.2 # Required by: -# slapos.cookbook==0.55 +# hexagonit.recipe.cmmi==1.6 +hexagonit.recipe.download = 1.5.1 + +# Required by: +# slapos.cookbook==0.60 inotifyx = 0.2.0 # Required by: -# slapos.cookbook==0.55 -# slapos.core==0.25 +# slapos.cookbook==0.60 +# slapos.core==0.27 # xml-marshaller==0.9.7 -lxml = 2.3.4 +lxml = 2.3.5 # Required by: -# slapos.cookbook==0.55 +# slapos.cookbook==0.60 netaddr = 0.7.7 # Required by: -# slapos.core==0.25 +# slapos.core==0.27 netifaces = 0.8 # Required by: -# slapos.toolbox==0.25 +# slapos.toolbox==0.28 paramiko = 1.7.7.2 # Required by: -# slapos.toolbox==0.25 -psutil = 0.4.1 +# slapos.toolbox==0.28 +psutil = 0.6.0 # Required by: -# slapos.cookbook==0.55 -# slapos.core==0.25 -# slapos.toolbox==0.25 +# slapos.cookbook==0.60 +# slapos.core==0.27 +# slapos.toolbox==0.28 # 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 +# slapos.cookbook==0.60 +# slapos.toolbox==0.28 +slapos.core = 0.27 # Required by: -# slapos.core==0.25 +# slapos.core==0.27 supervisor = 3.0a12 # Required by: -# slapos.cookbook==0.55 -# slapos.toolbox==0.25 +# slapos.cookbook==0.60 +# slapos.toolbox==0.28 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.55 +# slapos.cookbook==0.60 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.25 +# slapos.core==0.27 zope.interface = 4.0.1 diff --git a/stack/lamp/instance-apache-php.cfg b/stack/lamp/instance-apache-php.cfg index 670e4c09f57f1decd859fedd94d0644bf06f0f67..504abd422e1f40489c8cfaf055a11cb4c523252a 100644 --- a/stack/lamp/instance-apache-php.cfg +++ b/stack/lamp/instance-apache-php.cfg @@ -66,7 +66,7 @@ stunnel-binary = ${stunnel:location}/bin/stunnel remote-host = $${mariadb-urlparse:host} remote-port = $${mariadb-urlparse:port} local-host = $${slap-network-information:local-ipv4} -local-port = 3306 +local-port = 33060 log-file = $${basedirectory:log}/stunnel.log config-file = $${directory:stunnel-conf}/stunnel.conf key-file = $${directory:stunnel-conf}/stunnel.key @@ -201,7 +201,7 @@ command = $${logrotate:wrapper} # Request frontend [request-frontend] <= slap-connection -recipe = slapos.cookbook:request +recipe = slapos.cookbook:requestoptional 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 diff --git a/stack/slapos.cfg b/stack/slapos.cfg index 16d2f36c9d6c1344c8d40481ade3f314c4c97ea9..54c707eac5e7007b9fee26bb80cc5863af67d78a 100644 --- a/stack/slapos.cfg +++ b/stack/slapos.cfg @@ -9,6 +9,10 @@ parts = slapos-cookbook extensions += buildout-versions +# Use shacache and lxml +extends = + ../component/lxml-python/buildout.cfg + # Separate from site eggs allowed-eggs-from-site-packages = include-site-packages = false @@ -17,7 +21,6 @@ exec-sitecustomize = false # Add location for modified non-official slapos.buildout find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ - http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/ # Use only quite well working sites. allow-hosts += @@ -51,12 +54,10 @@ networkcache-section = networkcache [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-002 # Use SlapOS patched zc.buildout zc.buildout = 1.6.0-dev-SlapOS-006