Commit a8c6cb9c authored by Alain Takoudjou's avatar Alain Takoudjou

Merge master into grid-computing

parents 3d4fc8ec 0fe04dda
Changes
=======
0.78.0 (2013-04-28)
-------------------
* LAMP stack: Allow to give application-dependent parameters to application configuration file. [Cedric de Saint Martin]
* zabbix-agent: Allow user to pass zabbix parameter. [Cedric de Saint Martin]
* kvm frontend: listen to ipv6 and ipv4. [Jean-Baptiste Petre]
0.77.1 (2013-04-18)
-------------------
* Re-release of 0.77.0.
0.77.0 (2013-04-18)
-------------------
* Allow to pass extra parameters when creating simple wrapper. [Sebastien Robin]
* Apache frontend: Append all rewrite module options to http as well. [Cedric de Saint Martin]
* Apache frontend: Add https-only support. [Cedric de Saint Martin]
* Apache frontend: make logrotate work by using "generic" component. [Cedric de Saint Martin]
0.76.0 (2013-04-03)
-------------------
* Add 'generic' phpconfigure recipe, allowing to configure any PHP-based app. [Cedric de Saint Martin]
* apache_frontend: Have more useful access_log in apache frontend. [Cedric de Saint Martin]
* apache_frontend: Add "SSLProxyEngine On" to http apache frontend vhost to be able to proxy https -> http. [Cedric de Saint Martin]
* Add first preliminary version of nginx-based reverse proxy. [Cedric de Saint Martin]
* Request-optional is not verbose anymore (again) if it failed. [Cedric de Saint Martin]
* Add possibility to fetch web ip and port from apache recipe. [Cedric de Saint Martin]
0.75.0 (2013-03-26)
-------------------
* Add backward compatibility about Partition.getInstanceGuid() in request.py. [Cedric de Saint Martin]
* request.py: Don't crash if resource is not ready. [Cedric de Saint Martin]
* Use memory-based kumofs instead of memcached to have no limitation for key length and data size. [Kazuhiko Shiozaki]
* Postgres: allow slapuser# to connect as postgres user. [Marco Mariani]
* apache_frontend: Sanitize inputs, disable Varnish cache, don't touch to custom file if already present. [Cedric de Saint Martin]
* Resiliency: simpler, more robust PBS recipe and promise. [Marco Mariani]
* Add helper method to set "location" parameter in librecipe. [Cedric de Saint Martin]
* Add download helper function in librecipe. [Cedric de Saint Martin]
* Update wrapper recipe to make it simpler and more dev-friendly. [Cedric de Saint Martin]
* Add configurationfile recipe. [Cedric de Saint Martin]
* Add request-edge recipe. [Cedric de Saint Martin]
* Add publishsection recipe. [Cedric de Saint Martin]
* Add match support for promise check_page_content. [Cedric de Saint Martin]
0.74.0 (2013-03-05)
-------------------
* Generate mysql password randomly in LAMP stack. [Alain Takoudjou]
* Add support for apache and haproxy to have more than one listening port. [Vincent Pelletier]
* Use a more consistent parameter naming in 6tunnel recipe. [Vincent Pelletier]
* Provide an SR-transparent way to (de)serialise master data. [Vincent Pelletier]
* Initial version of neoppod recipe. [Vincent Pelletier]
* Initial version of clusterized erp5 recipes. [Vincent Pelletier]
* General cleanup of the request recipe (simpler parsing, less calls to master). [Vincent Pelletier, Cedric de Saint Martin]
0.73.1 (2013-02-19)
-------------------
* softwaretype recipe: all falsy parameter values are now ignored. [Cedric de Saint Martin]
0.73.0 (2013-02-18)
-------------------
* Add mioga and apacheperl recipes. [Viktor Horvath]
* request.py: Properly fetch instance_guid of instance. [Cedric de Saint Martin]
* request.py: Only append SLA parameter to the list if the key actually exists and is not empty string. [Cedric de Saint Martin]
0.72.0 (2013-02-11)
-------------------
......@@ -109,13 +179,13 @@ Changes
[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]
......@@ -173,7 +243,7 @@ Changes
* Add slapmonitor and slapreport recipes. [Mohamadou Mbengue]
0.54.1 (2012-06-18)
-----------------
-------------------
* Fix 0.54 release containing wrong code in request.py.
......@@ -290,7 +360,7 @@ Changes
[Cedric de Saint Martin]
0.40.1 (2012-03-01)
-----------------
-------------------
* Fix manifest to include files needed for apache. [Cedric de Saint Martin]
......@@ -352,7 +422,7 @@ Changes
-----------------
* LAMP : Recipe can now call lampconfigure from slapos.toolbox which will
configure PHP application instance when needed. [Alain Takoudjou Kamdem]
configure PHP application instance when needed. [Alain Takoudjou Kamdem]
0.31 (2011-10-16)
-----------------
......@@ -488,7 +558,7 @@ Changes
-----------------
* Add PHPMyAdmin software release used in SlapOS tutorials
[Cedric de Saint Martin]
[Cedric de Saint Martin]
* Add slaprunner software release [Cedric de Saint Martin]
......
# 6tunnel - Tunnelling for application that don't speak IPv6
# http://toxygen.net/6tunnel/
[buildout]
parts = 6tunnel
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
[6tunnel]
recipe = slapos.recipe.cmmi
url = http://toxygen.net/6tunnel/6tunnel-0.11rc2.tar.gz
md5sum = 74e02d4f0704b3083a01feda66033449
configure-command =
aclocal
autoheader
automake --foreign
autoconf
./configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:%(PATH)s
......@@ -4,7 +4,7 @@ parts =
[alsa]
# Contains libasound
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.24.1.tar.bz2
md5sum = 7cc05f25e1d5b65da8fb3fdcd540f226
configure-options =
......
......@@ -8,7 +8,7 @@ extends =
[apache-perl]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://perl.apache.org/dist/mod_perl-2.0.5.tar.gz
md5sum = 03d01d135a122bd8cebd0cd5b185d674
configure-command =
......
......@@ -15,32 +15,31 @@ extends =
../mariadb/buildout.cfg
../openldap/buildout.cfg
../pkgconfig/buildout.cfg
../zip/buildout.cfg
../zlib/buildout.cfg
[apache-php]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${mariadb:version}
url = http://fr2.php.net/distributions/php-5.3.13.tar.gz
md5sum = 179c67ce347680f468edbfc3c425476a
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
--with-mysql=${mariadb:location}
--with-zlib-dir=${zlib:location}
--with-bz2-dir=${bzip2:location}
--with-bz2=${bzip2:location}
--with-mcrypt=${libmcrypt:location}
--with-gd
--with-jpeg-dir=${libjpeg:location}
--with-png-dir=${libpng:location}
--enable-gd-native-ttf
--with-ttf
--with-freetype-dir=${freetype:location}
--with-pdo-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-curl=${curl:location}
--with-zip-dir=${zip:location}
--with-imap=${cclient:location}
--with-iconv-dir=${libiconv:location}
--with-gettext=${gettext:location}
......@@ -52,10 +51,8 @@ configure-options =
--enable-session
--enable-exif
--enable-zip
--enable-bz2
--enable-ftp
# Changing TMPDIR is required for PEAR installation.
# It will create a pear/temp directory under the SR instead of a shared /tmp/pear/temp.
# XXX we could mkdir tmp there
......@@ -65,26 +62,29 @@ environment =
PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${bzip2:location}/lib -Wl,-rpath -Wl,${bzip2:location}/lib -L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/libblkid
TMPDIR=${buildout:parts-directory}/${:_buildout_section_name_}
HOME=${apache:location}
[apache-php-postgres]
<=apache-php
# Note: Shall react on each build of apache and reinstall itself
recipe = slapos.recipe.cmmi
depends =
${postgresql:url}
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
--with-zlib-dir=${zlib:location}
--with-bz2-dir=${bzip2:location}
--with-bz2=${bzip2:location}
--with-mcrypt=${libmcrypt:location}
--with-gd
--with-jpeg-dir=${libjpeg:location}
--with-png-dir=${libpng:location}
--enable-gd-native-ttf
--with-ttf
--with-freetype-dir=${freetype:location}
--with-curl=${curl:location}
--with-zip-dir=${zip:location}
--with-imap=${cclient:location}
--with-iconv-dir=${libiconv:location}
--with-gettext=${gettext:location}
......@@ -96,17 +96,28 @@ configure-options =
--enable-session
--enable-exif
--enable-zip
--enable-bz2
--enable-ftp
--with-pgsql=${postgresql:location}
# Changing TMPDIR is required for PEAR installation.
# It will create a pear/temp directory under the SR instead of a shared /tmp/pear/temp.
# XXX we could mkdir tmp there
environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${bzip2:location}/lib -Wl,-rpath -Wl,${bzip2:location}/lib -L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/libblkid
TMPDIR=${buildout:parts-directory}/${:_buildout_section_name_}
HOME=${apache:location}
[libmcrypt]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.bz2/download
md5sum = c4f491dd411a09e9de3b8702ea6f73eb
[xml-rpc]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/project/phpxmlrpc/phpxmlrpc/2.2.2/xmlrpc-2.2.2.tar.gz
md5sum = 59a644c636c6d98267d0c99b406ae9e8
......@@ -21,19 +21,19 @@ md5sum = ffee70a111fd07372982b0550bbb14b7
[apr-util]
recipe = hexagonit.recipe.download
version = 1.4.1
version = 1.5.1
url = http://mir2.ovh.net/ftp.apache.org/dist/apr/apr-util-${:version}.tar.bz2
md5sum = 52b31b33fb1aa16e65ddaefc76e41151
md5sum = 9c1db8606e520f201c451ec9a0b095f6
[apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${gdbm:version}
version = 2.4.3
revision = 2
version = 2.4.4
revision = 1
url = http://mir2.ovh.net/ftp.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 87aaf7bc7e8715f0455997bb8c6791aa
md5sum = 0e712ee2119cd798c8ae39d5f11a9206
configure-command = cp -ar ${apr:location}/apr-${apr:version} srclib/apr/; cp -ar ${apr-util:location}/apr-util-${apr-util:version} srclib/apr-util; ./configure
configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
......@@ -101,7 +101,7 @@ md5sum = 4f074f035d3b37f3f3e71cd9616440f3
[apache-antiloris]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download
md5sum = 66862bf10e9be3a023e475604a28a0b4
patch-options = -p0
......@@ -119,9 +119,9 @@ make-targets =
[apache-2.2]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = hexagonit.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.22.tar.gz
md5sum = d77fa5af23df96a8af68ea8114fa6ce1
recipe = slapos.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.24.tar.gz
md5sum = 64a3392018ad60583209a16d728180d3
patch-options = -p1
configure-options = --disable-static
--enable-authn-alias
......@@ -179,7 +179,7 @@ environment =
[apache-antiloris-apache-2.2]
# Note: Shall react on each build of apache and reinstall itself
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2/download
md5sum = 66862bf10e9be3a023e475604a28a0b4
configure-command = ${apache-2.2:location}/bin/apxs
......
......@@ -3,7 +3,7 @@ parts =
aspell
aspell-en-dictonary
extends =
extends =
../ncurses/buildout.cfg
[aspell-common-dictionary]
......@@ -14,12 +14,19 @@ update-command = ${:command}
stop-on-error = yes
[aspell]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
revision = 1
url = http://ftp.gnu.org/gnu/aspell/aspell-0.60.6.1.tar.gz
md5sum = e66a9c9af6a60dc46134fdacf6ce97d7
environment =
CPPFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
[aspell-en-dictionary]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-7.1-0.tar.bz2
md5sum = beba5e8f3afd3ed1644653bb685b2dfb
configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin
\ No newline at end of file
configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin
depends =
${aspell:url}
${aspell:revision}
......@@ -3,7 +3,7 @@
parts = attr
[attr]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.igh.cnrs.fr/pub/nongnu/attr/attr-2.4.46.src.tar.gz
md5sum = db557c17fdfa4f785333ecda08654010
configure-options =
......
......@@ -6,7 +6,7 @@ parts =
autoconf
[autoconf]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
md5sum = 82d05e03b93e45f5a39b828dc9c6c29b
environment =
......
......@@ -2,12 +2,13 @@
extends =
../autoconf/buildout.cfg
../perl/buildout.cfg
../xz-utils/buildout.cfg
parts =
automake
[automake]
recipe = hexagonit.recipe.cmmi
md5sum = e620cb9e0259159341c0e0d6b712b67a
url = http://ftp.gnu.org/gnu/automake/automake-1.12.2.tar.gz
recipe = slapos.recipe.cmmi
md5sum = 140e084223bf463a24c1a28427c6aec7
url = http://ftp.gnu.org/gnu/automake/automake-1.12.6.tar.xz
environment =
PATH =${autoconf:location}/bin:${perl:location}/bin:%(PATH)s
PATH =${autoconf:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
......@@ -3,6 +3,6 @@ parts =
bash
[bash]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
md5sum = 3fb927c7c33022f1c327f14a81c0d4b0
......@@ -3,6 +3,6 @@ parts =
binutils
[binutils]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.bz2
md5sum = bde820eac53fa3a8d8696667418557ad
......@@ -17,7 +17,7 @@ patch-options = -p1
patches =
${bison-drop.gets.patch:location}/${bison-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/bison/bison-2.5.tar.bz2
md5sum = 9dba20116b13fc61a0846b0058fbe004
environment =
......
......@@ -10,7 +10,7 @@ download-only = true
filename = bzip2-hooks.py
[bzip2]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
md5sum = 00b516f4704d4a7cb50a1d97e6e8e15b
configure-command = true
......
......@@ -17,7 +17,7 @@ filename = ${:_buildout_section_name_}
download-only = true
[ca-certificates]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 20130119
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
......
......@@ -2,7 +2,7 @@
parts = ccache
[ccache-common]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
[ccache]
<= ccache-3.1
......
......@@ -17,7 +17,7 @@ md5sum = 42c77fdd5d7a976fc302b93aadb3da98
filename = imap-2007f.patch
[cclient]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
md5sum = 2126fd125ea26b73b20f01fcd5940369
configure-command = true
......
......@@ -51,7 +51,7 @@ md5sum = 5dc8cc28447ed3747b8a53c768d872aa
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command
stop-on-error = true
commit = 9158bbf9e886e3b96e91239249aca66e420aa8d1
commit = f7d102bc225c922f116d2cea52a746d64343ea59
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};
......
......@@ -15,14 +15,10 @@ update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/cloudooo.egg-link
[cloudooo-repository]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/cloudooo.git
branch = master
revision =
command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location} && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
git-executable = ${git:location}/bin/git
[cloudooo]
recipe = zc.recipe.egg
......@@ -44,4 +40,4 @@ scripts =
paster=cloudooo_paster
runCloudoooUnitTest
runCloudoooTestSuite
ugly-depend-on = ${cloudooo-repository:command} ${cloudooo-repository:update-command} ${cloudooo-check-recipe:command}
ugly-depend-on = ${cloudooo-repository:recipe} ${cloudooo-repository:repository} ${cloudooo-check-recipe:command}
[buildout]
extends =
../ncurses/buildout.cfg
parts =
cmake
[cmake]
recipe = hexagonit.recipe.cmmi
url = http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
md5sum = ba74b22c788a0c8547976b880cd02b17
recipe = slapos.recipe.cmmi
url = http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
md5sum = 097278785da7182ec0aea8769d06860c
environment =
CMAKE_INCLUDE_PATH=${ncurses:location}/include
CMAKE_LIBRARY_PATH=${ncurses:location}/lib
[buildout]
extends =
../xz-utils/buildout.cfg
parts =
coreutils
[coreutils-drop.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 63c2299d92d23e4748abb9668b7e62ea
download-only = true
filename = drop.gets.patch
[coreutils]
virtual-depends = ${coreutils-drop.gets.patch:md5sum}
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/coreutils/coreutils-8.12.tar.gz
md5sum = fce7999953a67243d00d75cc86dbcaa6
patch-options = -p1
patches =
${coreutils-drop.gets.patch:location}/${coreutils-drop.gets.patch:filename}
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
md5sum = 065ba41828644eca5dd8163446de5d64
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --enable-install-program=tr,basename,uname,cat,cp,ls
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
LDFLAGS =-Wl,--as-needed
diff -ur coreutils-8.12.old/lib/stdio.in.h coreutils-8.12/lib/stdio.in.h
--- coreutils-8.12.old/lib/stdio.in.h 2011-04-25 11:01:29.000000000 +0200
+++ coreutils-8.12/lib/stdio.in.h 2012-07-23 16:02:17.591610452 +0200
@@ -181,7 +181,9 @@
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@
......@@ -5,7 +5,7 @@ parts =
corocosync
[corosync]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp:downloads@corosync.org/downloads/corosync-1.3.1/corosync-1.3.1.tar.gz
md5sum = c58459a009a3a9d0b9c00e276a190d90
environment =
......
......@@ -10,7 +10,7 @@ extends =
parts = couchdb
[couchdb]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://mir2.ovh.net/ftp.apache.org/dist//couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz
md5sum = cd126219b9cb69a4c521abd6960807a6
configure-options =
......
......@@ -15,6 +15,6 @@ virtual-depends =
patch-options = -p1
patches =
${cpio-drop.gets.patch:location}/${cpio-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.bz2
md5sum = 20fc912915c629e809f80b96b2e75d7d
......@@ -5,7 +5,7 @@ extends =
parts = cuneiform
[cuneiform]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://launchpad.net/cuneiform-linux/1.0/1.0/+download/cuneiform-linux-1.0.0.tar.bz2
md5sum = 785232ffffad7d82446fbac08a1c3ef9
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......
......@@ -10,9 +10,9 @@ parts =
curl
[curl]
recipe = hexagonit.recipe.cmmi
url = http://curl.haxx.se/download/curl-7.24.0.tar.bz2
#md5sum = 5f6d50c4d4ee38c57fe37e3cff75adbd
recipe = slapos.recipe.cmmi
url = http://curl.haxx.se/download/curl-7.30.0.tar.bz2
md5sum = 0db5ec03a5001b42a2edc03bf63b5ceb
configure-options =
--disable-static
--disable-ldap
......@@ -27,10 +27,12 @@ configure-options =
--disable-gopher
--enable-ipv6
--disable-sspi
--without-gnutls
--with-ssl=${openssl:location}
--with-zlib=${zlib:location}
--without-nss
--without-libssh2
--without-librtmp
--without-libidn
environment =
......
......@@ -4,24 +4,10 @@ parts =
extends =
../zlib/buildout.cfg
[cyrus-sasl-gcc4.4-patch]
# patch available thanks to Gentoo packagers
# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-gcc44.patch?revision=1.2
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 5deb4d67b53ecba20c7887fc8fdebee1
filename = cyrus-sasl-2.1.22-gcc44.patch
download-only = true
[cyrus-sasl]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.23.tar.gz
md5sum = 2eb0e48106f0e9cd8001e654f267ecbc
patches =
${cyrus-sasl-gcc4.4-patch:location}/${cyrus-sasl-gcc4.4-patch:filename}
patch-options =
-p1
recipe = slapos.recipe.cmmi
url = ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
md5sum = a7f4e5e559a0e37b3ffc438c9456e425
configure-options =
--disable-digest
......
......@@ -3,7 +3,7 @@
parts = dash
[dash]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.7.tar.gz
md5sum = f6cedb10ae7258adb5ab17a10ae80d51
configure-options =
......
......@@ -8,7 +8,7 @@ parts =
dbus
[dbus]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://dbus.freedesktop.org/releases/dbus/dbus-1.4.10.tar.gz
md5sum = 402a2f8102bedbe236e2891b2b0f31c2
configure-options =
......@@ -20,7 +20,7 @@ environment =
LDFLAGS=-L${libexpat:location}/lib
[dbus-glib]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.94.tar.gz
md5sum = e1f1506a6f4941e67bffd614b1ad5af6
environment =
......
......@@ -9,7 +9,7 @@ filename = dcron-4.4.noroot.no.globals.patch
download-only = true
[dcron]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.jimpryor.net/linux/releases/dcron-4.4.tar.gz
md5sum = 02d848ba043a9df5bf2102a9f4bc04bd
configure-command = true
......
......@@ -40,7 +40,7 @@ filename = dropbear-0.53.1-static_build_fix.patch
download-only = true
[dropbear]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = 0284ea239083f04c8b874e08e1aca243
# XXX: We still use an old version of dropbear instead of the last one
# in order have all patches working.
......
......@@ -8,7 +8,7 @@ extends =
parts = erlang
[erlang]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.erlang.org/download/otp_src_R14B04.tar.gz
md5sum = 4b469729f103f52702bfb1fb24529dc0
configure-options =
......
......@@ -4,7 +4,7 @@ extends =
../zlib/buildout.cfg
[fastjar]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/fastjar/files/fastjar/0.94/fastjar-0.94.tar.gz/download
md5sum = 14d4bdfac236e347d806c6743dba48c6
environment =
......
......@@ -12,14 +12,14 @@ parts =
<= ffmpeg-0.8
[libogg]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/ogg/libogg-1.2.2.tar.gz
md5sum = 5a9fcabc9a1b7c6f1cd75ddc78f36c56
configure-options =
--disable-static
[libvorbis]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
md5sum = 798a4211221073c1409f26eac4567e8b
configure-options =
......@@ -29,7 +29,7 @@ environment =
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig
[libtheora]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
md5sum = 292ab65cedd5021d6b7ddd117e07cd8e
configure-options =
......@@ -39,11 +39,11 @@ environment =
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libvorbis:location}/lib/pkgconfig
[yasm]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz
[libvpx]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://webm.googlecode.com/files/libvpx-v0.9.6.tar.bz2
md5sum = 383f3f07a76099682abb43f79b692b72
configure-options =
......@@ -52,7 +52,7 @@ environment =
PATH=${yasm:location}/bin:%(PATH)s
[libx264]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20111005-2245-stable.tar.bz2
md5sum = f86260b2ea6d6cb5186937c9363891d7
configure-options =
......@@ -62,7 +62,7 @@ environment =
PATH=${yasm:location}/bin:%(PATH)s
[lame]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/lame/lame-3.98.4.tar.gz
md5sum = 8e9866ad6b570c6c95c8cba48060473f
configure-options =
......@@ -70,14 +70,14 @@ configure-options =
--disable-gtktest
[opencore-amr]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/opencore-amr/opencore-amr/opencore-amr-0.1.2.tar.gz
md5sum = 8e8b8b253eb046340ff7b6bf7a6ccd3e
configure-options =
--disable-static
[ffmpeg-0.8]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ffmpeg.org/releases/ffmpeg-0.8.5.tar.bz2
md5sum = 726877b19ece7ea64def8b7e6727e182
configure-options =
......
......@@ -7,7 +7,7 @@ extends =
../zlib/buildout.cfg
[file]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.astron.com/pub/file/file-5.11.tar.gz
md5sum = 16a407bd66d6c7a832f3a5c0d609c27b
configure-options =
......
......@@ -22,8 +22,8 @@ depends =
${liberation-fonts:location}
${ipaex-fonts:location}
x86 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/11.0/linux-i686/fr/firefox-11.0.tar.bz2 a7e9c614ddac993476ef771afaedf568
x86-64 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/11.0/linux-x86_64/fr/firefox-11.0.tar.bz2 b358865c08145211314a62660e871614
x86 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/18.0.2/linux-i686/en-US/firefox-18.0.2.tar.bz2 9eb4dcf2e9578203a16da3c70817ccb2
x86-64 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/18.0.2/linux-x86_64/en-US/firefox-18.0.2.tar.bz2 29903172f6fd788f04dbeb27b9193fe6
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
......@@ -34,9 +34,9 @@ script =
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash
cd %(location)s
export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:${freetype:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${bzip2:location}/lib/:${libXext:location}/lib/:${libXt:location}/lib/:${zlib:location}/lib/:${libXcursor:location}/lib/:${gtk-2:location}/lib/:${cairo:location}/lib/:${pango:location}/lib/:${glib:location}/lib/:${atk:location}/lib/:${gdk-pixbuf:location}/lib/:${alsa:location}/lib/:${libpng:location}/lib/:${libSM:location}/lib/:${libICE:location}/lib:${libxml2:location}/lib:${openssl:location}/lib
export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:{dbus:location}/lib/:${dbus-glib:location}/lib/:${freetype:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${bzip2:location}/lib/:${libXext:location}/lib/:${libXt:location}/lib/:${zlib:location}/lib/:${libXcursor:location}/lib/:${gtk-2:location}/lib/:${cairo:location}/lib/:${pango:location}/lib/:${glib:location}/lib/:${atk:location}/lib/:${gdk-pixbuf:location}/lib/:${alsa:location}/lib/:${libpng:location}/lib/:${libSM:location}/lib/:${libICE:location}/lib:${libxml2:location}/lib:${openssl:location}/lib
export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/firefox $*""")
wrapper.close()
os.chmod(wrapper_location, 0777)
os.chmod(wrapper_location, 0755)
......@@ -7,7 +7,7 @@ parts =
flare
[flare]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://labs.gree.jp/data/source/flare-1.0.9.tgz
md5sum = e59ccce1ba29e7edf6f665561678d5c8
configure-options =
......
......@@ -5,7 +5,7 @@ parts =
flex
[flex]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz
md5sum = 201d3f38758d95436cbc64903386de0b
environment =
......
......@@ -12,18 +12,17 @@ parts =
fontconfig
[fontconfig]
recipe = hexagonit.recipe.cmmi
url = http://fontconfig.org/release/fontconfig-2.9.0.tar.gz
md5sum = 26c83855ed256b5c032baae032fadc4f
recipe = slapos.recipe.cmmi
url = http://fontconfig.org/release/fontconfig-2.10.2.tar.bz2
md5sum = 2f239690057d1438aa282e051f721d08
# XXX-Cedric : should we use --with-add-fonts={somefont:location}/share,{someotherfont:location}/share?
configure-options =
--disable-static
--disable-docs
--enable-libxml2
--with-default-fonts=${fonts:location}
--with-freetype-config=${freetype:location}/bin/freetype-config
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig
PKG_CONFIG_PATH=${freetype:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig
CPPFLAGS=-I${zlib:location}/include -I${bzip2:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib
......@@ -14,8 +14,8 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[liberation-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-1.07.0.tar.gz
md5sum = 8150db1c6e27cacdfd524b563b85b69e
url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz
md5sum = 5c781723a0d9ed6188960defba8e91cf
destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex and IPA Font - Japanese fonts provided by IPA
......@@ -23,8 +23,8 @@ destination = ${fonts:location}/${:_buildout_section_name_}
[ipaex-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAexfont00103.zip
md5sum = ac67b2fc3aab7f683d89f0070df284e7
url = http://ossipedia.ipa.go.jp/ipafont/ipaexfont/IPAexfont00201.php
md5sum = 7bf84182a04a9632268dbcb03f100d05
destination = ${fonts:location}/${:_buildout_section_name_}
[ipa-fonts]
......
......@@ -10,9 +10,9 @@ parts =
freetype
[freetype]
recipe = hexagonit.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.bz2
md5sum = 77a893dae81fd5b896632715ca041179
recipe = slapos.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.bz2
md5sum = b93435488942486c8d0ca22e8f768034
configure-options =
--disable-static
environment =
......
......@@ -2,7 +2,7 @@
parts = garbage-collector
[garbage-collector]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = 2ff9924c7249ef7f736ecfe6f08f3f9b
url = http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz
configure-options =
......
......@@ -10,7 +10,7 @@ parts =
gcc
[mpfr]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2
md5sum = bfbecb2eacb6d48432ead5cfc3f7390a
configure-options =
......@@ -20,7 +20,7 @@ environment =
LDFLAGS=-Wl,-rpath=${gmp:location}/lib
[mpc]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz
md5sum = 0d6acab8d214bd7d1fbbc593e83dd00d
configure-options =
......@@ -31,7 +31,7 @@ environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp:location}/lib
[ppl]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# we should use version 0.10.x for gcc-4.5
url = http://www.cs.unipr.it/ppl/Download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
md5sum = 5667111f53150618b0fa522ffc53fc3e
......@@ -44,7 +44,7 @@ environment =
LDFLAGS=-Wl,-rpath=${gmp:location}/lib
[cloog-ppl]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.9.tar.gz
md5sum = 806e001d1b1a6b130069ff6274900af5
configure-options =
......@@ -55,13 +55,6 @@ environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${ppl:location}/lib
[ecj]
recipe = hexagonit.recipe.download
download-only = true
url = ftp://sourceware.org/pub/java/ecj-4.5.jar
md5sum = d7cd6a27c8801e66cbaa964a039ecfdb
filename = ecj.jar
[gcc-download]
hack-revision = ${gcc-interconnection-workaround:hack-revision}
recipe = hexagonit.recipe.download
......@@ -70,15 +63,6 @@ md5sum = 8e0b5c12212e185f3e4383106bfa9cc6
strip-top-level-dir = True
destination = ${gcc-source:location}
[gcc-java-download]
hack-revision = ${gcc-interconnection-workaround:hack-revision}
recipe = hexagonit.recipe.download
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-java-4.5.3.tar.bz2
md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab
strip-top-level-dir = True
destination = ${gcc-source:location}
ignore-existing = true
[gcc-source]
hack-revision = ${gcc-interconnection-workaround:hack-revision}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......@@ -90,54 +74,11 @@ url = ${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true
[gcc-java-pre-4.4.patch]
recipe = hexagonit.recipe.download
md5sum = 9a563576126d9fcf234ef29c2fc7df76
url = ${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true
[gcc-java-minimal]
hack-revision = ${gcc-interconnection-workaround:hack-revision}
depends =
${gcc-download:location}
${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi
path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
${gcc-java-pre-4.4.patch:location}/${gcc-java-pre-4.4.patch:filename}
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--enable-languages=java
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--with-ecj-jar=${ecj:location}/${ecj:filename}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--without-ppl
--without-cloog
environment =
CPPFLAGS =-I${mpfr:location}/include -I${gmp:location}/include -I${mpc:location}/include
LDFLAGS =-L${mpfr:location}/lib -Wl,-rpath=${mpfr:location}/lib -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib
PATH=${zip:location}/bin:%(PATH)s
# make install does not work when several core are used
make-targets = install -j1
[gcc]
hack-revision = ${gcc-interconnection-workaround:hack-revision}
depends =
${gcc-download:location}
${gcc-java-download:location}
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
path = ${gcc-source:location}
md5sum = bb3265edf0fa7543e50cedb93e04e427
patches =
......@@ -145,11 +86,11 @@ patches =
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# as slapos.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--disable-bootstrap
--enable-languages="c,c++,java"
--enable-languages="c,c++"
--disable-multilib
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
......
......@@ -3,7 +3,7 @@ parts =
gdbm
[gdbm]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 1.10
url = ftp://ftp.gnu.org/gnu/gdbm/gdbm-${:version}.tar.gz
md5sum = 88770493c2559dc80b561293e39d3570
......
......@@ -6,22 +6,10 @@ extends =
../libxml2/buildout.cfg
../zlib/buildout.cfg
[gettext-drop.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 1a17a2e6c1539927304379dfa0f149c5
download-only = true
filename = drop.gets.patch
[gettext]
virtual-depends = ${gettext-drop.gets.patch:md5sum}
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.1.1.tar.gz
md5sum = 3dd55b952826d2b32f51308f2f91aa89
patch-options = -p1
patches =
${gettext-drop.gets.patch:location}/${gettext-drop.gets.patch:filename}
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.1.tar.gz
md5sum = 034c8103b14654ebd300fadac44d6f14
configure-options =
--disable-static
......
diff -ur gettext-0.18.1.1.orig/gettext-runtime/gnulib-lib/stdio.in.h gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h
--- gettext-0.18.1.1.orig/gettext-runtime/gnulib-lib/stdio.in.h 2010-05-17 21:56:12.000000000 +0200
+++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h 2012-07-20 17:42:29.940524198 +0200
@@ -141,7 +141,9 @@
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 -ur gettext-0.18.1.1.orig/gettext-tools/gnulib-lib/stdio.in.h gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h
--- gettext-0.18.1.1.orig/gettext-tools/gnulib-lib/stdio.in.h 2010-05-24 11:42:46.000000000 +0200
+++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h 2012-07-20 17:45:20.550461064 +0200
@@ -141,7 +141,9 @@
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 -ur gettext-0.18.1.1.orig/gettext-tools/libgettextpo/stdio.in.h gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h
--- gettext-0.18.1.1.orig/gettext-tools/libgettextpo/stdio.in.h 2010-05-17 21:58:03.000000000 +0200
+++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h 2012-07-20 17:45:15.937129402 +0200
@@ -141,7 +141,9 @@
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@
......@@ -8,14 +8,17 @@ extends =
parts = ghostscript
[ghostscript-common]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${libtiff:version}
configure-options =
--disable-cups
--disable-threadsafe
--with-system-libtiff
--without-libidn
--without-x
--with-drivers=FILES
--with-fontpath=${ghostscript-fonts:location}
# it seems that parallel build sometimes fails for ghostscript.
make-options = -j1
environment =
......@@ -29,5 +32,11 @@ environment =
[ghostscript-9]
<= ghostscript-common
url = http://downloads.ghostscript.com/public/ghostscript-9.06.tar.bz2
md5sum = 46f9ebe40dc52755287b30704270db11
url = http://downloads.ghostscript.com/public/ghostscript-9.07.tar.bz2
md5sum = eea27befc1e85bef6d4768202f6b03a5
[ghostscript-fonts]
recipe = hexagonit.recipe.download
url = http://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz
md5sum = 6865682b095f8c4500c54b285ff05ef6
strip-top-level-dir = true
......@@ -3,7 +3,7 @@ parts =
giflib
[giflib]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/giflib/giflib-4.2.0.tar.bz2?download
md5sum = 711ad48551ee14db7c200b5f402df849
configure-options =
......
......@@ -11,7 +11,7 @@ parts =
git
[git]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.12.tar.gz
md5sum = ceb1a6b17a3e33bbc70eadf8fce5876c
configure-options =
......
......@@ -4,7 +4,7 @@ extends =
../zlib/buildout.cfg
[glib]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.8.tar.bz2
md5sum = 789e7520f71c6a4bf08bc683ec764d24
configure-options =
......
......@@ -6,12 +6,12 @@ parts =
gmp
[gmp]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# we should use version 4.x for ppl-0.10
url = ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
md5sum = dd60683d7057917e34630b4a787932e8
# GMP does not correctly detect achitecture so it have to be given
# as hexagonit.recipe.cmmi is using shell expansion in subproceses
# as slapos.recipe.cmmi is using shell expansion in subproceses
# backticks are working
configure-options =
--build=`uname -m`-linux
......
[buildout]
extends =
extends =
../readline/buildout.cfg
../ncurses/buildout.cfg
../zlib/buildout.cfg
......@@ -7,12 +7,12 @@ extends =
parts = gnutls
[gpg-error]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.gz
md5sum = 7c2710ef439f82ac429b88fec88e9a4c
[gcrypt]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.gz
md5sum = 78f8f8bec4580f75b25816f7896d0389
configure-options =
......@@ -23,8 +23,8 @@ environment =
[gnutls]
# XXX-Cedric : update to latest gnutls
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/gnutls/v2.8/gnutls-2.8.6.tar.bz2
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnutls.org/gcrypt/gnutls/v2.8/gnutls-2.8.6.tar.bz2
md5sum = eb0a6d7d3cb9ac684d971c14f9f6d3ba
configure-options =
--with-libgcrypt-prefix=${gcrypt:location}
......
......@@ -13,7 +13,7 @@ extends =
../zlib/buildout.cfg
[graphviz]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz
md5sum = 8d26c1171f30ca3b1dc1b429f7937e58
configure-options =
......
[buildout]
extends =
../pcre/buildout.cfg
../xz-utils/buildout.cfg
parts =
grep
[grep]
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/grep/grep-2.9.tar.gz
md5sum = 03e3451a38b0d615cb113cbeaf252dc0
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/grep/grep-2.14.tar.xz
md5sum = d4a3f03849d1e17ce56ab76aa5a24cab
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${pcre:location}/include
LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib
......@@ -3,7 +3,7 @@ parts =
groff
[groff]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/groff/groff-1.21.tar.gz
md5sum = 8b8cd29385b97616a0f0d96d0951c5bf
configure-options =
......
......@@ -5,10 +5,15 @@
parts =
groonga
extends =
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://packages.groonga.org/source/groonga/groonga-2.0.6.tar.gz
md5sum = 64467d1ab8d5e0df8348a636972a95a7
recipe = slapos.recipe.cmmi
version = 3.0.3
url = http://packages.groonga.org/source/groonga/groonga-${:version}.tar.gz
md5sum = 19dbee5393b2f9c793c4caae5ba81bec
configure-options =
--disable-static
--disable-glibtest
......@@ -16,3 +21,20 @@ configure-options =
--disable-document
--disable-groonga-httpd
--without-mecab
environment =
CPPFLAGS =-I${zlib:location}/include
LDFLAGS =-Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib
[groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi
version = 1.0.3
url = http://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-${:version}.tar.gz
md5sum = 3f266c608017eb1b2e24b6bac1801ab2
location = ${groonga:location}
depends =
${groonga:version}
configure-options =
--disable-static
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
......@@ -15,11 +15,12 @@ parts =
gtk-2
[cairo]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://cairographics.org/releases/cairo-1.10.2.tar.gz
md5sum = f101a9e88b783337b20b2e26dfd26d5f
configure-options =
--enable-tee=yes
--enable-xlib=no
environment =
PATH=${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig
......@@ -28,7 +29,7 @@ environment =
LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib:${libXrender:location}/lib
[pango]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/pango/1.29/pango-1.29.3.tar.bz2
md5sum = be4e3891353fae6b62a6f8d7689c4266
configure-options =
......@@ -36,13 +37,13 @@ configure-options =
# XXX-Cedric : Why, god, why do I have to supply the -lXrender option to linker?
environment =
PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig::${libXrender:location}/lib/pkgconfig
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig
CPPFLAGS=-I${cairo:location}/include/cairo -I${libX11:location}/include/X11 -I${libxcb:location}/include/xcb -I${libXau:location}/include/X11 -I${bzip2:location}/include -L${libXrender:location}/include -I${zlib:location}/include
LDFLAGS=-L${cairo:location}/lib -Wl,-rpath=${cairo:location}/lib -L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libxcb:location}/lib -Wl,-rpath=${libxcb:location}/lib -L${libXau:location}/lib -Wl,-rpath=${libXau:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${libXrender:location}/lib -Wl,-rpath=${libXrender:location}/lib -lXrender -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib:${libXrender:location}/lib
[gdk-pixbuf]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.24/gdk-pixbuf-2.24.0.tar.bz2
md5sum = d8ece3a4ade4a91c768328620e473ab8
configure-options =
......@@ -56,7 +57,7 @@ environment =
LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib
[atk]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/atk/2.0/atk-2.0.1.tar.bz2
md5sum = 87f20b78deaedef858ac54358c0786b1
environment =
......@@ -66,7 +67,7 @@ environment =
LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib
[gtk-2]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.6.tar.bz2
md5sum = 421100f6597e613234f8dead6091a9fe
configure-options =
......
[buildout]
extends =
../xz-utils/buildout.cfg
parts =
gzip
[gzip-drop.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = d9b1156f912c8cf006f140482918ebc9
download-only = true
filename = drop.gets.patch
[gzip]
virtual-depends = ${gzip-drop.gets.patch:md5sum}
recipe = hexagonit.recipe.cmmi
patch-options = -p1
patches =
${gzip-drop.gets.patch:location}/${gzip-drop.gets.patch:filename}
url = ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.4.tar.gz
md5sum = e381b8506210c794278f5527cba0e765
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.5.tar.xz
md5sum = 2a431e169b6f62f7332ef6d47cc53bae
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
......@@ -8,9 +8,9 @@ extends =
parts = haproxy
[haproxy]
recipe = hexagonit.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.22.tar.gz
md5sum = a0b007c76f6a78524f3b3dd5e704979c
recipe = slapos.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.23.tar.gz
md5sum = 6535d5e58037ada4b58b439cebe03c79
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
......
......@@ -3,7 +3,7 @@
parts = icu4c
[icu4c]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz
md5sum = ea93970a0275be6b42f56953cd332c17
......
......@@ -13,9 +13,12 @@ extends =
../libpng/buildout.cfg
../libtiff/buildout.cfg
../libtool/buildout.cfg
../libxml2/buildout.cfg
../jasper/buildout.cfg
../jbigkit/buildout.cfg
../pkgconfig/buildout.cfg
../webp/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
[imagemagick-6.6.6-1-no-gsx-gsc-probe.patch]
......@@ -27,12 +30,11 @@ download-only = true
filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch
[imagemagick]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.8.1-10.tar.bz2
md5sum = cde56988f9d2208d9d61815cc23665b4
recipe = slapos.recipe.cmmi
url = http://ftp.vim.org/ImageMagick/ImageMagick-6.8.2-6.tar.xz
md5sum = ee01558201041a9978dd14b1db946ce8
depends =
${libtiff:version}
${librsvg:version}
configure-options =
--disable-static
--without-x
......@@ -49,22 +51,21 @@ configure-options =
--without-lcms
--without-lcms2
--without-lqr
--without-lzma
--without-openexr
--without-pango
--without-rsvg
--without-wmf
--without-xml
--with-bzlib=${bzip2:location}
--with-zlib=${zlib:location}
--with-ltdl-include=${libtool:location}/include
--with-ltdl-lib=${libtool:location}/lib
--with-rsvg=${librsvg:location}
--with-gs-font-dir=${ghostscript-fonts:location}
--with-frozenpaths
patch-options = -p1
patches =
${imagemagick-6.6.6-1-no-gsx-gsc-probe.patch:location}/${imagemagick-6.6.6-1-no-gsx-gsc-probe.patch:filename}
environment =
PATH=${freetype:location}/bin:${ghostscript:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${fontconfig:location}/lib/pkgconfig:${librsvg:location}/lib/pkgconfig
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include -I${jbigkit:location}/include -I${libjpeg:location}/include -I${libtiff:location}/include -I${libpng:location}/include -I${jasper:location}/include -I${freetype:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${jbigkit:location}/lib -Wl,-rpath=${jbigkit:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libpng:location}/lib -Wl,-rpath=${libpng:location}/lib -L${jasper:location}/lib -Wl,-rpath=${jasper:location}/lib -L${freetype:location}/lib -Wl,-rpath=${freetype:location}/lib
PATH=${freetype:location}/bin:${ghostscript:location}/bin:${librsvg:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${xz-utils:location}/lib/pkgconfig
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include -I${jbigkit:location}/include -I${libjpeg:location}/include -I${libtiff:location}/include -I${libpng:location}/include -I${jasper:location}/include -I${freetype:location}/include -I${webp:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${jbigkit:location}/lib -Wl,-rpath=${jbigkit:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libpng:location}/lib -Wl,-rpath=${libpng:location}/lib -L${jasper:location}/lib -Wl,-rpath=${jasper:location}/lib -L${freetype:location}/lib -Wl,-rpath=${freetype:location}/lib -L${webp:location}/lib -Wl,-rpath=${webp:location}/lib
......@@ -8,7 +8,7 @@ parts =
intltool
[intltool]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://edge.launchpad.net/intltool/trunk/0.41.1/+download/intltool-0.41.1.tar.gz
md5sum = d6c91bf06681919ccfdf3624035b75dc
depends =
......
......@@ -5,7 +5,7 @@ parts =
jasper
[jasper]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.zip
md5sum = a342b2b4495b3e1394e161eb5d85d754
# jasper configure script is not executable by default
......
......@@ -41,7 +41,7 @@ script =
(download_dir, filename) = os.path.split(download_file)
auto_extract_bin = os.path.join(extract_dir, filename)
shutil.move(download_file, auto_extract_bin)
os.chmod(auto_extract_bin, 0777)
os.chmod(auto_extract_bin, 0755)
subprocess.call([auto_extract_bin])
self.cleanup_dir_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
......
......@@ -19,7 +19,7 @@ filename = jbigkit-2.0-build.patch
md5sum = e974958e9331735c07478e9c2dde8795
[jbigkit]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-2.0.tar.gz
md5sum = 3dd87f605abb1a97a22dc79d8b3e8f6c
patch-options =
......
# jsl - command line javascript lint
# http://javascriptlint.com/
[buildout]
parts = jsl
[jsl]
recipe = slapos.recipe.build
url = http://www.javascriptlint.com/download/jsl-0.3.0-src.tar.gz
md5sum = 2b94ffa4fab07acabe0c5e73cd49bcdf
script =
location = %(location)r
self.failIfPathExists(location)
import sys
url = self.options['url']
md5sum = self.options['md5sum']
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir)
os.chdir(os.path.join(workdir, 'src'))
os.system('make -f Makefile.ref -j 1 DIST="%(location)s" all export')
......@@ -30,6 +30,7 @@ md5sum = 46148e9536222d0ad2ef36777c55714d
patches = ${kumo-ipv6-multiip-patch-download:location}/${kumo-ipv6-multiip-patch-download:filename}
patch-options = -p1
configure-options =
--enable-tcadb
--with-tokyocabinet=${tokyocabinet:location}
--with-msgpack=${messagepack:location}
......
......@@ -10,7 +10,7 @@ extends =
../giflib/buildout.cfg
[leptonica]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://leptonica.googlecode.com/files/leptonica-1.68.tar.gz
md5sum = 5cd7092f9ff2ca7e3f3e73bfcd556403
configure-command =
......
......@@ -3,7 +3,7 @@ parts =
libaio
[libaio]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# originally located at http://www.kernel.org/pub/linux/libs/aio/
url = http://ftp.free.fr/mirrors/ftp.debian.org/pool/main/liba/libaio/libaio_0.3.109.orig.tar.gz
md5sum = 435a5b16ca6198eaf01155263d855756
......
......@@ -9,7 +9,7 @@ download-only=true
filename = libdb-hooks.py
[libdb]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://download.oracle.com/berkeley-db/db-4.5.20.tar.gz
md5sum = b0f1c777708cb8e9d37fb47e7ed3312d
pre-configure-hook = ${libdb-hooks-download:location}/${libdb-hooks-download:filename}:pre_configure_hook
......
......@@ -12,14 +12,14 @@ parts =
dmtx-utils
[libdmtx]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libdmtx/libdmtx-0.7.4.tar.bz2
md5sum = d3a4c0becd92895eb606dbdb78b023e2
configure-options =
--disable-static
[dmtx-utils]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libdmtx/dmtx-utils-0.7.4.tar.bz2
md5sum = b132ab9fb1d289869469b8bb4959a08a
configure-options =
......
......@@ -2,7 +2,7 @@
parts = libevent
[libevent]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
md5sum = 0b3ea18c634072d12b3c1ee734263664
configure-options =
......
......@@ -3,7 +3,7 @@ parts =
libexpat
[libexpat]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download
md5sum = dd7dab7a5fea97d2a6a43f511449b7cd
configure-options =
......
......@@ -17,4 +17,4 @@ patches =
${libiconv.gets.patch:location}/${libiconv.gets.patch:filename}
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
md5sum = e34509b1623cec449dfeb73d7ce9c6c6
\ No newline at end of file
md5sum = e34509b1623cec449dfeb73d7ce9c6c6
......@@ -3,7 +3,7 @@ parts =
libjpeg
[libjpeg]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.ijg.org/files/jpegsrc.v8d.tar.gz
md5sum = 52654eb3b2e60c35731ea8fc87f1bd29
configure-options =
......
......@@ -17,7 +17,7 @@ url = http://launchpad.net/libmemcached/1.0/0.44/+download/libmemcached-0.44.tar
md5sum = e6bd825c46fa080b550f90f9001cba8c
[libmemcached-common]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
configure-options =
--without-docs
--without-memcached
......
[buildout]
extends =
../xz-utils/buildout.cfg
../zlib/buildout.cfg
parts =
......@@ -7,10 +8,11 @@ parts =
libpng
[libpng-common]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
configure-options =
--disable-static
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
CPPFLAGS =-I${zlib:location}/include
LDFLAGS =-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -21,5 +23,5 @@ md5sum = 717caa58e9c71a80820eb38c4f4d6ec3
[libpng]
<= libpng-common
url = http://download.sourceforge.net/libpng/libpng-1.5.12.tar.bz2
md5sum = d87f9c34ccab8242c00e41925839f6c9
url = http://download.sourceforge.net/libpng/libpng-1.5.14.tar.xz
md5sum = 94284b01d62ca43c5eb3f6702db08ed8
......@@ -12,15 +12,14 @@ find-links =
[libreoffice-bin]
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
version = 3.5.6
#url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
url = http://ftp.psu.ac.th/pub/libreoffice/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
version = 3.6.5
url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums
md5sum_x86 = 079609188b86ede3b3eebe2b75862b31
md5sum_x86-64 = 6a559fa9c62c810464254d129bd2dc17
md5sum_x86 = 9575c9a567d48a9feeaed2f915bfdf7f
md5sum_x86-64 = 302e326f2b2a524a78994705ea782770
# where office code can be found?
officedir = libreoffice3.5
officedir = libreoffice3.6
# script to install
script =
......
[buildout]
parts = librsvg
extends =
extends =
../bzip2/buildout.cfg
../pkgconfig/buildout.cfg
../libxml2/buildout.cfg
../zlib/buildout.cfg
../gtk-2/buildout.cfg
../xorg/buildout.cfg
../xz-utils/buildout.cfg
[libcroco]
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.3.tar.bz2
md5sum = e1e93eeff4367c896f3959af34ba20eb
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.8.tar.xz
md5sum = 767e73c4174f75b99695d4530fd9bb80
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
LDFLAGS=-Wl,-rpath=${zlib:location}/lib
[librsvg]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 2.36.1
url = http://www.nexedi.org/static/tarballs/librsvg/librsvg-${:version}.tar.gz
md5sum = 699cb7124d319035346e69782baa7c36
# The original source provided by gnome is tar.xz and it is not a supported compression
# on hexagonit.recipe.cmmi neither by slapos.recipe.build, so keep alternative source
# with tar.gz format as a temporary alternative for this.
# url = http://ftp.acc.umu.se/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.1.tar.xz
url = http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.4.tar.xz
md5sum = 3c94524c8ccf668e30b236f409239f54
configure-options =
--disable-static
--disable-gtk-theme
......@@ -34,7 +31,7 @@ configure-options =
--disable-tools
--disable-gtk-doc-html
--enable-introspection=no
environment =
PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:%(PATH)s
environment =
PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${cairo:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -7,7 +7,7 @@ parts =
librsync
[librsync]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/sourceforge/librsync/librsync-0.9.7.tar.gz
md5sum = 24cdb6b78f45e0e83766903fd4f6bc84
configure-options =
......
......@@ -8,7 +8,7 @@ parts =
libtiff
[libtiff]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 4.0.3
url = http://www.imagemagick.org/download/delegates/tiff-${:version}.tar.gz
md5sum = 051c1068e6a0627f461948c365290410
......
......@@ -2,7 +2,7 @@
parts = libtool
[libtool]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = d2f3b7d4627e69e13514a40e72a24d50
url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
configure-options =
......
......@@ -3,7 +3,7 @@ parts =
libuuid
[libuuid]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.kernel.org/pub/linux/utils/util-linux/v2.18/util-linux-ng-2.18.tar.bz2
md5sum = 2f5f71e6af969d041d73ab778c141a77
configure-options =
......
......@@ -7,9 +7,9 @@ parts =
libxml2
[libxml2]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
md5sum = c62106f02ee00b6437f0fb9d370c1093
recipe = slapos.recipe.cmmi
url = ftp://ftp.xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz
md5sum = 9c0cfef285d5c4a5c80d00904ddab380
configure-options =
--disable-static
--without-python
......
[buildout]
extends =
../libxml2/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
parts =
libxslt
[libxslt]
url = ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz
md5sum = e61d0364a30146aaa3001296f853b2b9
recipe = hexagonit.recipe.cmmi
url = ftp://xmlsoft.org/libxslt/libxslt-1.1.28.tar.gz
md5sum = 9667bf6f9310b957254fdcf6596600b7
recipe = slapos.recipe.cmmi
configure-options =
--disable-static
--with-libxml-prefix=${libxml2:location}
......@@ -19,7 +18,5 @@ configure-options =
--without-debug
--without-debugger
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-Wl,-rpath=${zlib:location}/lib
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
CPPFLAGS=-I${zlib:location}/include -I${libxml2:location}/include
LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -4,6 +4,6 @@ parts =
libyaml
[libyaml]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
md5sum = 36c852831d02cf90508c29852361d01b
......@@ -11,7 +11,7 @@ md5sum = 6beac248c978b767d4bccc1b7eebe6bd
filename = ${:_buildout_section_name_}
[logrotate]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.7.9.tar.gz
md5sum = eeba9dbca62a9210236f4b83195e4ea5
patch-options = -p1
......
......@@ -32,7 +32,7 @@ download-only = true
md5sum = 8d3706a9bd60b6ebfea33998644b1a99
[lxc-0.8]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://lxc.sourceforge.net/download/lxc/lxc-0.8.0-rc2.tar.gz
md5sum = 9bd6988542fd7dd198d056ef3a2db9f6
patch-binary = ${patch:location}/bin/patch
......
......@@ -2,6 +2,6 @@
parts = lynx
[lynx]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = 124253e635f7c76bdffc47b9d036c812
url = http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.gz
......@@ -15,6 +15,6 @@ patch-options = -p1
patches =
${m4-drop.gets.patch:location}/${m4-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.bz2
md5sum = 8a7cef47fecab6272eb86a6be6363b2f
......@@ -24,11 +24,11 @@ filename = mariadb_5.5_create_system_tables__no_test.patch
download-only = true
[mariadb]
recipe = hexagonit.recipe.cmmi
version = 5.5.28a
recipe = slapos.recipe.cmmi
version = 5.5.30
revision = 1
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb
md5sum = a2d20a040ef1e49944a4ffe65ed7fefa
md5sum = 39d4da4dabc8bda012517b3587dee6f8
# compile directory is required to build mysql plugins.
keep-compile-dir = true
patch-options = -p0
......@@ -61,19 +61,18 @@ environment =
[mroonga-mariadb]
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = hexagonit.recipe.cmmi
url = https://github.com/downloads/mroonga/mroonga/mroonga-2.06.tar.gz
md5sum = 89ce640a57ed8f2161b8358ff4c29c66
recipe = slapos.recipe.cmmi
url = http://packages.groonga.org/source/mroonga/mroonga-3.03.tar.gz
md5sum = daa1547259145b05b4cdee6b513bf8c8
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
depends =
${mariadb:version}
${mariadb:revision}
${groonga-normalizer-mysql:version}
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
LDFLAGS=-L${groonga:location}/lib
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig
CXXFLAGS=-Wno-deprecated
# CXXFLAGS workaround: avoid depracation warning in order to compile on gcc 4.7+
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig:${groonga-normalizer-mysql:location}/lib/pkgconfig
......@@ -34,7 +34,7 @@ recipe = hexagonit.recipe.download
strip-top-level-dir = true
[membase-component-common]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
path = ${membase-source:location}/${:component}
prefix = ${membase:location}
configure-options =
......
......@@ -20,7 +20,7 @@ download-only = true
md5sum = fd98d0cbfc4d3a25ac9808472fbe62f8
[memcached]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://memcached.googlecode.com/files/memcached-1.4.8.tar.gz
md5sum = b7104e269511621c2777367d6d6315fe
patches =
......
......@@ -10,7 +10,7 @@ parts =
memstrike
[memstrike]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
path = ${memstrikesource:location}
configure-command =
./bootstrap
......
......@@ -7,7 +7,7 @@ parts =
[libdrm]
#does not seem to compile with -jX
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://dri.freedesktop.org/libdrm/libdrm-2.4.26.tar.bz2
md5sum = 062569426773f69b11a47a7712bba770
configure-options =
......@@ -18,7 +18,7 @@ environment =
[mesa]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.freedesktop.org//pub/mesa/7.11/MesaLib-7.11.tar.bz2
md5sum = ff03aca82d0560009a076a87c888cf13
configure-options =
......
......@@ -59,10 +59,10 @@ script =
call(['make'], cwd=workdir, env=env)
call(['make', 'install'], cwd=workdir, env=env)
# XXX-Antoine: here's what I did using hexagonit.recipe.cmmi.
# XXX-Antoine: here's what I did using slapos.recipe.cmmi.
# and it wasn't working !
#[mydumper]
#recipe = hexagonit.recipe.cmmi
#recipe = slapos.recipe.cmmi
#url = http://launchpad.net/mydumper/0.2/0.2.3/+download/mydumper-0.2.3.tar.gz
#md5sum = 36e6a1c97a9634a6882ddaac5e2697d5
#strip-top-level-dir = true
......
......@@ -29,7 +29,7 @@ filename = mysql_create_system_tables__no_test.patch
download-only = true
[mysql-5.1]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 5.1.58
url = http://mysql.he.net/Downloads/MySQL-5.1/mysql-${:version}.tar.gz
md5sum = ae5aef506088e521e4b1cc4f668e96d2
......@@ -74,7 +74,7 @@ environment =
LDFLAGS =-L${readline:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib
[groonga-storage-engine-mysql-5.1]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-1.0.0.tar.gz
md5sum = 289b8b7919e790599ea79b6fe9270e04
configure-options =
......
......@@ -32,7 +32,7 @@ filename = mysql_create_system_tables__no_test.patch
download-only = true
[mysql-5.5]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 5.5.16
url = http://mysql.he.net/Downloads/MySQL-5.5/mysql-${:version}.tar.gz
md5sum = 462ab3752dd666ec06ca32f92673b59e
......@@ -63,7 +63,7 @@ environment =
LDFLAGS=-L${libaio:location}/lib
[groonga-storage-engine-mysql-5.5]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-1.0.0.tar.gz
md5sum = 289b8b7919e790599ea79b6fe9270e04
configure-options =
......
......@@ -18,7 +18,7 @@ parts =
mysql-tritonn-5.0
[senna]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/tarballs/senna/senna-r1311.tar.gz
md5sum = 1cc51554789f81a9e5208da04a5c2f4c
configure-command =
......@@ -50,7 +50,7 @@ filename = mysql-5.0.87-sphinx-1.10.diff
download-only = true
[mysql-tritonn-5.0]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/tarballs/mysql/mysql-5.0.87.tar.gz
md5sum = 65e6229cc98b6a8d4c5206d7fe16c7be
# configure: how to avoid searching for my.cnf?
......
......@@ -3,7 +3,7 @@ parts =
ncurses
[ncurses]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
md5sum = 8cb9c412e5f2d96bc6f459aa8c6282a1
configure-options =
......
......@@ -8,7 +8,7 @@ extends =
../zlib/buildout.cfg
[neon]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.webdav.org/neon/neon-0.29.5.tar.gz
md5sum = ff369e69ef0f0143beb5626164e87ae2
configure-options =
......
......@@ -4,14 +4,36 @@ extends =
../zlib/buildout.cfg
../openssl/buildout.cfg
parts = nginx
[nginx]
recipe = hexagonit.recipe.cmmi
url = http://nginx.org/download/nginx-1.0.14.tar.gz
recipe = slapos.recipe.cmmi
url = http://nginx.org/download/nginx-1.2.7.tar.gz
md5sum = d252f5c689a14a668e241c744ccf5f06
configure-options=
--with-ipv6
--with-http_ssl_module
--with-mail
--with-mail_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"
[nginx-unstable]
<= nginx
url = http://nginx.org/download/nginx-1.3.15.tar.gz
md5sum = ded252047393c79a31b0862e9166a065
[hexaglobe-nginx-module]
recipe = hexagonit.recipe.download
url = http://easicloud-p.cdn.hexaglobe.net/nginx-easicloud.tar.gz
md5sum = 57fe2ceb09740f22b5b1023f29889e0e
strip-top-level-dir = true
[nginx-enable-sub]
# Used by Hexaglobe for watermarking
<= nginx
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"
--add-module=${hexaglobe-nginx-module:location}/sub_module
# --add-module=${hexaglobe-nginx-module:location}/nginx-upstream-fair
......@@ -4,6 +4,7 @@ parts =
[noVNC]
recipe = hexagonit.recipe.download
url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.4.tar.gz
md5sum = 5703d5d46022d8723796dcbbf821ee7f
# Post-0.4 release from January 2013
url = http://github.com/kanaka/noVNC/zipball/3b2acc2258d36137a37edfbe0f03a3099189c49d
md5sum = a276be8fa193652bb5de8a271603f11f
strip-top-level-dir = true
......@@ -13,7 +13,7 @@ parts =
[nodejs-0.8]
# Server-side Javascript.
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz
md5sum = 284fd2c7578064c339d9cf6a3a475ac7
configure-options =
......@@ -28,7 +28,7 @@ environment =
[nodejs-0.6]
# Server-side Javascript.
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://nodejs.org/dist/v0.6.21/node-v0.6.21.tar.gz
md5sum = 0da985a0bf820400af92363b9f453fe4
configure-options =
......@@ -42,7 +42,7 @@ environment =
LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[nodejs-0.4]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://nodejs.org/dist/node-v0.4.12.tar.gz
md5sum = a6375eaa43db5356bf443e25b828ae16
configure-options =
......
......@@ -9,7 +9,7 @@ md5sum = 7c00beff0475314f59214842509e407f
download-only = true
[nspr]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.7/src/nspr-4.8.7.tar.gz
md5sum = 97e30989a56ab813453b71261849c200
patches = ${nspr-pkgconfig-patch-download:location}/${nspr-pkgconfig-patch-download:filename}
......
......@@ -58,7 +58,7 @@ command =
rm -rf ${:compile-location}
[nss-cmmi]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
path = ${nss-download:location}/mozilla/security/nss
configure-command = echo "No need to configure"
make-binary = gmake
......
......@@ -2,6 +2,6 @@
parts = nullmailer
[nullmailer]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://untroubled.org/nullmailer/nullmailer-1.05.tar.gz
md5sum = 35124cc05f893efba1310e2ec7c876ff
......@@ -9,7 +9,7 @@ url = ${:_profile_base_location_}/${:filename}
md5sum = 08710ec022f3ce13e5c0b584dfee2c1c
[ocropus]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/packages/source/ocropus/ocropus-0.4.4.tar.gz
md5sum = 1485dbe9aab27574bfe3c8b4395cf3ce
configure-options =
......@@ -37,7 +37,7 @@ url = ${:_profile_base_location_}/${:filename}
md5sum = dbbdf909814fb84ffe47e2ff59980db7
[iulib]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/packages/source/ocropus/iulib-0.4.4.tar.gz
md5sum = 3d9754dbd64c56029ce1cd7c2f61894c
# workaround http://code.google.com/p/iulib/issues/detail?id=27
......
......@@ -7,9 +7,9 @@ extends =
../cyrus-sasl/buildout.cfg
[openldap]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.32.tgz
md5sum = 6a3e85cf61860ca5e8a1eba6753dd9d0
recipe = slapos.recipe.cmmi
url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.33.tgz
md5sum = 5adae44897647c15ce5abbff313bc85a
configure-options =
--disable-static
--disable-slapd
......
[buildout]
[opensp]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/openjade/OpenSP-1.5.2.tar.gz
md5sum = 670b223c5d12cee40c9137be86b6c39b
configure-options =
......
......@@ -12,7 +12,7 @@ parts =
openssh
[openssh]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = 0541579adf9d55abb15ef927048d372e
url = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.8p2.tar.gz
......
......@@ -28,9 +28,9 @@ filename = ${:_buildout_section_name_}
download-only = true
[openssl]
recipe = hexagonit.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.1c.tar.gz
md5sum = ae412727c8c15b67880aef7bd2999b2e
recipe = slapos.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.1e.tar.gz
md5sum = 66bf6f10f060d561929de96f9dfe5b8c
patch-binary = ${patch:location}/bin/patch
patches =
${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename}
......@@ -45,6 +45,7 @@ configure-options =
--libdir=lib
shared no-idea no-mdc2 no-rc5 zlib
-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib
&& make depend
# it seems that parallel build sometimes fails for openssl.
make-options =
......
[buildout]
extends =
../xz-utils/buildout.cfg
parts =
patch
[patch]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/patch/patch-2.6.1.tar.gz
md5sum = d758eb96d3f75047efc004a720d33daf
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/patch/patch-2.7.1.tar.xz
md5sum = e9ae5393426d3ad783a300a338c09b72
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
......@@ -3,10 +3,9 @@ parts =
pcre
[pcre]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.bz2
md5sum = 0a7b592bea64b7aa7f4011fc7171a730
recipe = slapos.recipe.cmmi
url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.bz2
md5sum = 62f02a76bb57a40bc66681760ed511d5
configure-options =
--disable-static
--enable-utf8
--enable-unicode-properties
......@@ -24,7 +24,7 @@ md5sum = d2a067b98953ad30ba1230f87dfb8b92
download-only = true
[pdftk]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.44-src.zip
md5sum = 9eb50fffcd621a627d387750c60982b4
configure-command = true
......
......@@ -7,10 +7,11 @@ parts =
percona-toolkit
[percona-toolkit]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://www.percona.com/redir/downloads/percona-toolkit/2.1.3/percona-toolkit-2.1.3.tar.gz
md5sum = 6f8c4a0a0e43e467766cbdabaec9ef93
version = 2.1.9
url = http://www.percona.com/redir/downloads/percona-toolkit/${:version}/percona-toolkit-${:version}.tar.gz
md5sum = 94545d0fe6a4893dcad8a3411531107d
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -5,7 +5,7 @@ parts =
perl-Class-Accessor
[perl-Class-Accessor]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/K/KA/KASEI/Class-Accessor-0.34.tar.gz
......
......@@ -5,7 +5,7 @@ parts =
perl-Config-General
[perl-Config-General]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/T/TL/TLINDEN/Config-General-2.50.tar.gz
......
......@@ -7,7 +7,7 @@ parts =
perl-DBD-MySQL
[perl-DBD-MySQL]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 4.019
depends =
${perl:version}
......
......@@ -7,11 +7,13 @@ parts =
perl-DBD-mariadb
[perl-DBD-mariadb]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 4.019
# binary library should be rebuilt when perl is updated.
depends =
${mariadb:version}
${perl:version}
${perl:revision}
${perl-DBI:version}
url = http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.019.tar.gz
md5sum = 566d98ab8ffac9626a31f6f6d455558e
......
......@@ -5,10 +5,12 @@ parts =
perl-DBI
[perl-DBI]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
version = 1.616
# binary library should be rebuilt when perl is updated.
depends =
${perl:version}
${perl:revision}
url = http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.616.tar.gz
md5sum = 799313e54a693beb635b47918458f7c4
configure-command =
......
......@@ -5,9 +5,11 @@ parts =
perl-Encode-HanExtra
[perl-Encode-HanExtra]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# binary library should be rebuilt when perl is updated.
depends =
${perl:version}
${perl:revision}
url = http://search.cpan.org/CPAN/authors/id/A/AU/AUDREYT/Encode-HanExtra-0.23.tar.gz
md5sum = e1d3bc32c1c8ee304235a06fbcd5d5a4
configure-command =
......
......@@ -5,7 +5,7 @@ parts =
perl-HTML-Encoding
[perl-HTML-Encoding]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/B/BJ/BJOERN/HTML-Encoding-0.61.tar.gz
......
......@@ -6,9 +6,11 @@ parts =
perl-HTML-Parser
[perl-HTML-Parser]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# binary library should be rebuilt when perl is updated.
depends =
${perl:version}
${perl:revision}
${perl-HTML-Tagset:location}
url = http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTML-Parser-3.68.tar.gz
md5sum = 5550b2da7aa94341f1e8a17a4ac20c68
......
......@@ -5,7 +5,7 @@ parts =
perl-HTML-Tagset
[perl-HTML-Tagset]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz
......
......@@ -5,7 +5,7 @@ parts =
perl-HTML-Template
[perl-HTML-Template]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/S/SA/SAMTREGAR/HTML-Template-2.9.tar.gz
......
......@@ -12,7 +12,7 @@ download-only = true
filename = ${:_buildout_section_name_}
[perl-Image-Magick]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
${imagemagick:location}
......
......@@ -5,7 +5,7 @@ parts =
perl-JSON
[perl-JSON]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/M/MA/MAKAMAKA/JSON-2.50.tar.gz
......
......@@ -5,7 +5,7 @@ parts =
perl-Net-IP
[perl-Net-IP]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/M/MA/MANU/Net-IP-1.25.tar.gz
......
......@@ -7,14 +7,17 @@ parts =
perl-SGML-Parser-OpenSP
[perl-SGML-Parser-OpenSP]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# binary library should be rebuilt when perl is updated.
depends =
${perl:version}
${perl:revision}
${perl-Class-Accessor:location}
url = http://search.cpan.org/CPAN/authors/id/B/BJ/BJOERN/SGML-Parser-OpenSP-0.994.tar.gz
md5sum = b1ee0244e9daa4d37f28cf32c4753691
configure-command =
${perl:location}/bin/perl Makefile.PL
${perl:location}/bin/perl Makefile.PL \
INC=-I${opensp:location}/include \
LIBS="-lstdc++ -L${opensp:location}/lib -losp"
make-options =
INC=-I${opensp:location}/include
OTHERLDFLAGS="-L${opensp:location}/lib -Wl,-rpath=${opensp:location}/lib"
OTHERLDFLAGS="-Wl,-rpath=${opensp:location}/lib"
......@@ -13,7 +13,7 @@ download-only = true
filename = ${:_buildout_section_name_}
[perl-Term-ReadLine-Gnu]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz
......
......@@ -5,7 +5,7 @@ parts =
perl-URI
[perl-URI]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/URI-1.58.tar.gz
......
......@@ -9,9 +9,11 @@ parts =
perl-XML-LibXML
[perl-XML-LibXML]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# binary library should be rebuilt when perl is updated.
depends =
${perl:version}
${perl:revision}
${perl-XML-NamespaceSupport:location}
${perl-XML-SAX:location}
url = http://search.cpan.org/CPAN/authors/id/P/PA/PAJAS/XML-LibXML-1.70.tar.gz
......
......@@ -5,7 +5,7 @@ parts =
perl-XML-NamespaceSupport
[perl-XML-NamespaceSupport]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
url = http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz
......
......@@ -9,7 +9,7 @@ parts =
perl-XML-Parser
[perl-XML-Parser]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
${perl-libwww-perl:location}
......
......@@ -6,7 +6,7 @@ parts =
perl-XML-SAX
[perl-XML-SAX]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
${perl-XML-NamespaceSupport:location}
......
......@@ -6,7 +6,7 @@ parts =
perl-libwww-perl
[perl-libwww-perl]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${perl:version}
${perl-HTML-Parser:location}
......
......@@ -20,21 +20,20 @@ download-only = true
filename = create-libs-symlink.py
[perl]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${gdbm:version}
version = 5.14.2
version = 5.16.3
# increase revision when we need to rebuild binary libraries.
revision = 2
url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2
md5sum = 04a4c5d3c1f9f19d77daff8e8cd19a26
md5sum = 025102de0e4a597cf541e57da80c6aa3
siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_}
patch-options = -p1
patches =
${perl-keep-linker-flags-in-ldflags.patch:location}/${perl-keep-linker-flags-in-ldflags.patch:filename}
# Viktor has adapted the following commands for AMD64 compilation
# TODO: find out how we can write a generic code that suits all architectures
configure-command =
sh Configure -des \
-A ccflags=-fPIC \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
-Dsiteprefix=${:siteprefix} \
-Dcflags=-I${gdbm:location}/include \
......@@ -44,5 +43,4 @@ configure-command =
-Dusethreads
environment =
PATH=${patch:location}/bin:%(PATH)s
CFLAGS='-m64 -mtune=nocona'
post-make-hook = ${perl-postmakehook-download:location}/${perl-postmakehook-download:filename}:post_make_hook
\ No newline at end of file
post-make-hook = ${perl-postmakehook-download:location}/${perl-postmakehook-download:filename}:post_make_hook
[buildout]
extends =
../fontconfig/buildout.cfg
../libexpat/buildout.cfg
../dash/buildout.cfg
parts =
phantomjs
[phantomjs]
recipe = slapos.recipe.build
slapos_promise =
file:phantomjs-slapos
depends =
${liberation-fonts:location}
${ipaex-fonts:location}
x86 = https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-i686.tar.bz2 2e94dcad7660d24309abe01011461693
x86-64 = https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2 8075fa873d8741c7ae9093c80a589a1f
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
wrapper_location = os.path.join("%(location)s", "phantomjs-slapos")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash
cd %(location)s
export LD_LIBRARY_PATH=%(location)s:${freetype:location}/lib/:${fontconfig:location}/lib/:${libexpat:location}/lib
export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/bin/phantomjs $*""")
wrapper.flush()
wrapper.close()
os.chmod(wrapper_location, 0755)
\ No newline at end of file
......@@ -13,9 +13,9 @@ extends =
<= pkgconfig
[pkgconfig]
recipe = hexagonit.recipe.cmmi
url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz
md5sum = 47525c26a9ba7ba14bf85e01509a7234
recipe = slapos.recipe.cmmi
url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.1.tar.gz
md5sum = 5392b4e3372879c5bf856173b418d6a2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
# build pkg-config twice so that second configure can use pkg-config
# to compute GLIB_CFLAGS and GLIB_LIBS.
......
......@@ -12,9 +12,9 @@ extends =
../zlib/buildout.cfg
[poppler]
recipe = hexagonit.recipe.cmmi
md5sum = 28c40266f374e1960a7bcead17d39f96
url = http://poppler.freedesktop.org/poppler-0.20.3.tar.gz
recipe = slapos.recipe.cmmi
md5sum = be915388eaad6865cee5a156c8119ec1
url = http://poppler.freedesktop.org/poppler-0.22.3.tar.gz
depends =
${libtiff:version}
configure-options =
......
......@@ -3,7 +3,7 @@ parts =
popt
[popt]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://anduin.linuxfromscratch.org/BLFS/svn/p/popt-1.16.tar.gz
md5sum = 3743beefa3dd6247a73f8f7a32c14c33
configure-options =
......
......@@ -10,7 +10,7 @@ extends =
parts = postfix
[postfix]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.8.3.tar.gz
md5sum = b3922ededd3fd6051f759e58a4ada3ae
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......
......@@ -13,9 +13,9 @@ parts = postgresql
[postgresql91]
recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.1.7/postgresql-9.1.7.tar.bz2
md5sum = eaf7b67493d59d1a60767ffdfbd65ce9
recipe = slapos.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.1.9/postgresql-9.1.9.tar.bz2
md5sum = 6b5ea53dde48fcd79acfc8c196b83535
configure-options = --with-openssl --with-perl
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
......@@ -23,9 +23,9 @@ environment =
[postgresql92]
recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.bz2
md5sum = 1cc388988e69bf75c6b55d59070100f6
recipe = slapos.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2
md5sum = 6ee5bb53b97da7c6ad9cb0825d3300dd
configure-options = --with-openssl
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
......
......@@ -3,6 +3,6 @@ parts =
pwgen
[pwgen]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/project/pwgen/pwgen/2.06/pwgen-2.06.tar.gz
md5sum = 935aebcbe610fbc9de8125e7b7d71297
......@@ -35,7 +35,7 @@ download-only = true
filename = python2.4-backport-CPPFLAGS-setup-from-python2.6.patch
[python2.4]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
# This is actually the default setting for prefix, but we can't use it in
# other settings in this part if we don't set it explicitly here.
prefix = ${buildout:parts-directory}/${:_buildout_section_name_}
......
......@@ -24,7 +24,7 @@ download-only = true
filename = python-2.6.6-no_system_inc_dirs.patch
[python2.6]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${gdbm:version}
# This is actually the default setting for prefix, but we can't use it in
......
......@@ -24,10 +24,10 @@ arguments = sys.argv[1:] + ["bootstrap"]
python = python2.7
[python2.7]
recipe = hexagonit.recipe.cmmi
package_version = 2.7.3
recipe = slapos.recipe.cmmi
package_version = 2.7.4
package_version_suffix =
md5sum = c57477edd6d18bd9eeca2f21add73919
md5sum = 62704ea0f125923208d84ff0568f7d50
depends =
${gdbm:version}
......
......@@ -7,6 +7,7 @@ download-only = true
filename = setuptools-0.6c11-py2.7.egg
url = http://pypi.python.org/packages/2.7/s/setuptools/${:filename}
md5sum = fe1f997bc722265116870bc7919059ea
mode = 0644
[python-setuptools]
# Hack to manually install setuptools outside of the Buildout environment.
......@@ -19,4 +20,5 @@ environment = export PATH=${python2.7:location}/bin:$PATH; export PYTHONPATH=${:
stop-on-error = true
recipe = plone.recipe.command
update = true
command = ${:environment} (mkdir ${:location}; sh ${setuptools-download:location}/${setuptools-download:filename} --install-dir ${:location}) || (rm -fr ${:location}; exit 1)
# chmod is a hack, but the mode of hexagonit.recipe.download above didn't worked yet (there was new version recently)
command = ${:environment} (mkdir ${:location}; chmod 644 ${setuptools-download:location}/${setuptools-download:filename} ; sh ${setuptools-download:location}/${setuptools-download:filename} --install-dir ${:location}) || (rm -fr ${:location}; exit 1)
[buildout]
extends =
../../component/gnutls/buildout.cfg
../../component/libpng/buildout.cfg
../../component/libuuid/buildout.cfg
../../component/xorg/buildout.cfg
../../component/zlib/buildout.cfg
[kvm]
# Backward compatibility
<= qemu-kvm
[qemu-kvm]
recipe = slapos.recipe.cmmi
# qemu-kvm and qemu are now the same since 1.3.
url = http://wiki.qemu-project.org/download/qemu-1.4.1.tar.bz2
md5sum = eb2d696956324722b5ecfa46e41f9a75
configure-options =
--target-list=""
--disable-sdl
--disable-xen
--enable-vnc-tls
--disable-vnc-sasl
--disable-curses
--disable-curl
--enable-kvm
--disable-docs
--enable-vnc-png
--disable-vnc-jpeg
--enable-vnc-ws
--extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include"
--extra-ldflags="-Wl,-rpath -Wl,${glib:location}/lib -L${glib:location}/lib -Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -Wl,-rpath -Wl,${gpg-error:location}/lib -L${gpg-error:location}/lib -L${gettext:location}/lib -Wl,-rpath -Wl,${gettext:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls"
--disable-werror
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig
......@@ -25,7 +25,7 @@ script =
(download_dir, filename) = os.path.split(download_file)
auto_extract_bin = os.path.join(extract_dir, filename)
shutil.move(download_file, auto_extract_bin)
os.chmod(auto_extract_bin, 0777)
os.chmod(auto_extract_bin, 0755)
subprocess.call([auto_extract_bin])
self.cleanup_dir_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
......
......@@ -5,7 +5,7 @@ parts =
# readline-5.x is still used for GPL2 only softwares.
[readline5]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
md5sum = e39331f32ad14009b9ff49cc10c5e751
configure-options =
......@@ -13,7 +13,7 @@ configure-options =
--disable-static
[readline]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
md5sum = 67948acb2ca081f23359d0256e9a271c
configure-options =
......
......@@ -3,6 +3,7 @@ parts =
rpm2cpio
[rpm2cpio]
# https://github.com/ruda/rpm2cpio
recipe = slapos.recipe.build:download
url = https://raw.github.com/ruda/rpm2cpio/e196173f1f6b746463b7398e381b94a42edfa345/rpm2cpio.py
url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum = c5bb6227d99e1ff5df880f997cbed2e3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Standalone RPM to CPIO converter
# Copyright (c) 2012 Rudá Moura
#
'''Extract cpio archive from RPM package.
rpm2cpio converts the RPM on standard input or first parameter to a CPIO archive on standard output.
Usage:
rpm2cpio < adjtimex-1.20-2.1.i386.rpm | cpio -it
./sbin/adjtimex
./usr/share/doc/adjtimex-1.20
./usr/share/doc/adjtimex-1.20/COPYING
./usr/share/doc/adjtimex-1.20/COPYRIGHT
./usr/share/doc/adjtimex-1.20/README
./usr/share/man/man8/adjtimex.8.gz
133 blocks
'''
import sys
import StringIO
import gzip
RPM_MAGIC = '\xed\xab\xee\xdb'
GZIP_MAGIC = '\x1f\x8b'
def rpm2cpio(stream_in=sys.stdin, stream_out=sys.stdout):
lead = stream_in.read(96)
if lead[0:4] != RPM_MAGIC:
raise IOError, 'the input is not a RPM package'
data = stream_in.read()
idx = data.find(GZIP_MAGIC)
if idx == -1:
raise IOError, 'could not find compressed cpio archive'
gzstream = StringIO.StringIO(data[idx:])
gzipper = gzip.GzipFile(fileobj=gzstream)
data = gzipper.read()
stream_out.write(data)
if __name__ == '__main__':
if sys.argv[1:]:
try:
fin = open(sys.argv[1])
rpm2cpio(fin)
fin.close()
except IOError, e:
print 'Error:', sys.argv[1], e
else:
try:
rpm2cpio()
except IOError, e:
print 'Error:', e
......@@ -3,7 +3,7 @@ parts =
rsync
[rsync]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://rsync.samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz
md5sum = 5ee72266fe2c1822333c407e1761b92b
make-options =
......
[buildout]
extends =
../gdbm/buildout.cfg
../openssl/buildout.cfg
../zlib/buildout.cfg
../readline/buildout.cfg
../ncurses/buildout.cfg
../libyaml/buildout.cfg
parts = ruby
[ruby-1.9.3]
recipe = hexagonit.recipe.cmmi
recipe = slapos.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
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libyaml:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${gdbm:location}/include -I${openssl:location}/include
LDFLAGS=-L${zlib:location}/lib -L${libyaml:location}/lib -L${readline:location}/lib -L${ncurses:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${libyaml:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib
[ruby-1.9]
<= ruby-1.9.3
......
......@@ -3,7 +3,7 @@ parts =
sed
[sed]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.gz
md5sum = f0fd4d7da574d4707e442285fd2d3b86
environment =
......
......@@ -8,7 +8,7 @@ extends =
../zlib/buildout.cfg
[serf]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://serf.googlecode.com/files/serf-0.7.0.tar.gz
md5sum = 3233f22a5875320da7bdc854d0873080
configure-options =
......
......@@ -2,7 +2,7 @@
parts = sheepstrike
[sheepstrike]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = https://gitorious.org/sheepstrike/sheepstrike/archive-tarball/0.1
md5sum = 2c5009eb7c32d7ba5d270d0b88d7e5ab
prefix = ${buildout:parts-directory}/${:_buildout_section_name_}
......
......@@ -20,7 +20,7 @@ url = ${:_profile_base_location_}/${:filename}
download-only = true
[shellinabox]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://shellinabox.googlecode.com/files/shellinabox-2.10.tar.gz
md5sum = 0e144910d85d92edc54702ab9c46f032
environment =
......
......@@ -31,6 +31,7 @@ parts =
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/
versions = versions
......@@ -130,54 +131,44 @@ scripts = py
# Use our own buildout version
zc.buildout = 1.6.0-dev-SlapOS-010
# Don't use beta
lxml = 3.0.2
# Force to use zc.recipe.egg 1.x
zc.recipe.egg = 1.3.2
# Use own version of h.r.download to be able to open archives not supported by python2.x: .xz
hexagonit.recipe.download = 1.6nxd002
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
collective.recipe.template = 1.9
hexagonit.recipe.cmmi = 1.6
collective.recipe.template = 1.10
lxml = 3.1.2
meld3 = 0.6.10
netaddr = 0.7.10
slapos.core = 0.35
slapos.libnetworkcache = 0.13.3
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.35
# slapos.core==0.35.2-dev
Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# Required by:
# slapos.core==0.35
# slapos.core==0.35.2-dev
netifaces = 0.8
# Required by:
# slapos.core==0.35
pyflakes = 0.6.1
# Required by:
# slapos.core==0.35
# slapos.core==0.35.2-dev
# slapos.libnetworkcache==0.13.3
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.35
# slapos.core==0.35.2-dev
supervisor = 3.0b1
# Required by:
# slapos.core==0.35
unittest2 = 0.5.1
# slapos.core==0.35.2-dev
zope.interface = 4.0.5
# Required by:
# slapos.core==0.35
zope.interface = 4.0.3
......@@ -17,7 +17,7 @@ download-only = true
filename = sphinx-1.10-beta-snowball.patch
[sphinx]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
depends =
${mariadb:version}
url = http://sphinxsearch.com/files/sphinx-2.0.5-release.tar.gz
......
......@@ -4,9 +4,9 @@ parts =
sqlite3
[sqlite3]
recipe = hexagonit.recipe.cmmi
url = http://www.sqlite.org/sqlite-autoconf-3071300.tar.gz
md5sum = c97df403e8a3d5b67bb408fcd6aabd8e
recipe = slapos.recipe.cmmi
url = http://www.sqlite.org/2013/sqlite-autoconf-3071601.tar.gz
md5sum = 8860d1a1ed26d40f07e3c7ae035b644a
configure-options =
--disable-static
--enable-readline
......
......@@ -6,7 +6,7 @@ parts =
[stunnel]
<= stunnel-4
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
[stunnel-4-hook-download]
recipe = hexagonit.recipe.download
......@@ -16,9 +16,9 @@ download-only=true
filename = stunnel-4-hooks.py
[stunnel-4]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/archive/4.x/stunnel-4.54.tar.gz
md5sum = c2b1db99e3ed547214568959a8ed18ac
recipe = slapos.recipe.cmmi
url = ftp://ftp.stunnel.org/stunnel/archive/4.x/stunnel-4.55.tar.gz
md5sum = ebe6670368d30c6a01ca33b9c50cb239
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
--enable-ipv6
......
......@@ -23,7 +23,7 @@ url = ${:_profile_base_location_}/${:filename}
md5sum = 8d911ec2422dc4c08a00693ac915a07a
[subversion]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://subversion.tigris.org/downloads/subversion-1.6.17.tar.bz2
md5sum = 81e5dc5beee4b3fc025ac70c0b6caa14
patches =
......
......@@ -8,7 +8,7 @@ parts =
swig
[swig]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/project/swig/swig/swig-1.3.40/swig-1.3.40.tar.gz
md5sum = 2df766c9e03e02811b1ab4bba1c7b9cc
configure-options =
......
......@@ -15,7 +15,7 @@ patch-options = -p1
patches =
${tar-drop.gets.patch:location}/${tar-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz
md5sum = 00d1e769c6af702c542cca54b728920d
environment =
......
......@@ -23,7 +23,7 @@ filename = ${:_buildout_section_name_}
md5sum = 2e691858cb492b7c17d23bf0912b3d24
[tesseract]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
md5sum = 1ba496e51a42358fb9d3ffe781b2d20a
patch-options =
......
......@@ -5,7 +5,7 @@ extends =
parts = tokyocabinet
[tokyocabinet]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://fallabs.com/tokyocabinet/tokyocabinet-1.4.46.tar.gz
md5sum = 341dadd1f3d68760e350f7e731111786
......
......@@ -15,7 +15,7 @@ extends =
<= varnish-2.0
[varnish-2.0]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/varnish/files/varnish/2.0.6/varnish-2.0.6.tar.gz/download
md5sum = d91dc21c636db61c69b5e8f061c5bb95
configure-options =
......@@ -25,7 +25,7 @@ environment =
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
[varnish-2.1]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://repo.varnish-cache.org/source/varnish-2.1.5.tar.gz
md5sum = 2d2f227da36a2a240c475304c717b8e3
configure-options =
......
......@@ -20,7 +20,7 @@ md5sum = 75422a6f7f671b3a6d9add6724cc0945
virtual-depend =
${w3m-w3m.gcc.forward.compat.patch:md5sum}
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = 1b845a983a50b8dec0169ac48479eacc
url = http://downloads.sourceforge.net/project/w3m/w3m/w3m-0.5.3/w3m-0.5.3.tar.gz
configure-options =
......
# WebP - A new image format for the Web
# https://developers.google.com/speed/webp/
[buildout]
parts =
webp
extends =
../libjpeg/buildout.cfg
../libpng/buildout.cfg
[webp]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = https://webp.googlecode.com/files/libwebp-0.1.3.tar.gz
md5sum = 254d4670e14e9ed881f0536b006ab336
configure-options =
--disable-static
--with-jpegincludedir=${libjpeg:location}/include
--with-jpeglibdir=${libjpeg:location}/lib
environment =
PATH=${libpng:location}/bin:%(PATH)s
[buildout]
extends =
../openssl/buildout.cfg
../pcre/buildout.cfg
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
parts =
wget
[wget-drop.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 866907ebc89fc2e76b44c519cb84930f
download-only = true
filename = drop.gets.patch
[wget]
virtual-depends = ${wget-drop.gets.patch:md5sum}
patch-options = -p1
patches =
${wget-drop.gets.patch:location}/${wget-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.bz2
md5sum = 12115c3750a4d92f9c6ac62bac372e85
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz
md5sum = 316f6f59292c9098ad81fd54f658c579
configure-options =
--enable-ipv6
--enable-opie
......@@ -31,7 +21,7 @@ configure-options =
--with-zlib-lib=${zlib:location}
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib
CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include
LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib
CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include -I${pcre:location}/include
diff -ur wget-1.13.4.orig/lib/stdio.in.h wget-1.13.4/lib/stdio.in.h
--- wget-1.13.4.orig/lib/stdio.in.h 2011-09-13 10:15:14.000000000 +0200
+++ wget-1.13.4/lib/stdio.in.h 2012-07-23 14:47:39.793579086 +0200
@@ -697,8 +697,10 @@
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
+#endif
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
[buildout]
extends =
../fontconfig/buildout.cfg
../xorg/buildout.cfg
parts =
wkhtmltopdf
[wkhtmltopdf]
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
url_x86-64 = http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2
url_x86 = http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
# supported architectures md5sums
md5sum_x86 = d796cfb66e45673d8f6728b61f34d5e0
md5sum_x86-64 = 02a2c6963728b69b8e329dcbf1f4c7e1
# script to install.
script =
location = %(location)r
self.failIfPathExists(location)
import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
WK_SUFIX_MAP = { 'x86': 'i386', 'x86-64': 'amd64' }
platform = guessPlatform()
url = self.options['url_' + platform]
md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
shutil.move(extract_dir, location)
wrapper_location = os.path.join("%(location)s", "wkhtmltopdf")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!${dash:location}/bin/dash
cd %(location)s
export LD_LIBRARY_PATH=%(location)s:${libXrender:location}/lib/:${fontconfig:location}/lib/:${libX11:location}/lib/:${libXext:location}/lib/
export PATH=${fontconfig:location}/bin:$PATH
exec %(location)s/wkhtmltopdf-""" + WK_SUFIX_MAP[platform]+ """ $*""")
wrapper.close()
os.chmod(wrapper_location, 0755)
......@@ -6,7 +6,7 @@ depends =
../libuuid/buildout.cfg
[xapian]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://oligarchy.co.uk/xapian/1.2.12/xapian-core-1.2.12.tar.gz
md5sum = faf33a3945edbe4c848627750856cbeb
environment =
......
......@@ -27,12 +27,12 @@ parts =
ACLOCAL=${xorg-util-macros:location}/share/aclocal
[xorg-util-macros]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/util/util-macros-1.11.0.tar.bz2
md5sum = 22d5cdff672450cb6902e0d68c200dcb
[xproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/proto/xproto-7.0.20.tar.bz2
md5sum = 65633168e5315c19defb4652cd3d83c1
configure-options =
......@@ -44,7 +44,7 @@ environment =
PATH=${libxml2:location}/bin:${pkgconfig:location}/bin:%(PATH)s
[xextproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/proto/xextproto-7.1.2.tar.bz2
md5sum = 263ae968b223c23b2986603d84e5c30e
configure-options =
......@@ -63,7 +63,7 @@ filename = xtrans_tmp_env.patch
md5sum = 37d82a3b6009113023599632117a6855
[xtrans]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/xtrans-1.2.6.tar.bz2
md5sum = c66f9ffd2da4fb012220c6c40ebc7609
patches =
......@@ -79,7 +79,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[libXau]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXau-1.0.6.tar.bz2
md5sum = 4a2cbd83727682f9ee1c1e719bac6adb
configure-options =
......@@ -89,7 +89,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[xcbproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xcb/xcb-proto-1.6.tar.bz2
md5sum = 04313e1d914b44d0e457f6c494fc178b
environment =
......@@ -97,7 +97,7 @@ environment =
PYTHON=${buildout:executable}
[xorg-libpthread-stubs]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xcb/libpthread-stubs-0.3.tar.bz2
md5sum = e8fa31b42e13f87e8f5a7a2b731db7ee
......@@ -109,7 +109,7 @@ filename = xcb_tmp_env.patch
md5sum = 61f39878120ba434a169e24cae2af862
[libxcb]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xcb/libxcb-1.7.tar.bz2
md5sum = 925699df361b99491165ebc12068056b
patches =
......@@ -120,7 +120,7 @@ configure-options =
--disable-static
--disable-build-docs
environment =
PKG_CONFIG_PATH=${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig
PKG_CONFIG_PATH=${libXau:location}/lib/pkgconfig:${xcbproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:${libxslt:location}/bin:%(PATH)s
PYTHON=${buildout:executable}
# Python note: libxcb requires python with ElementTree. In case of appliance
......@@ -129,14 +129,12 @@ environment =
# suitable library.
[libXext]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXext-1.2.0.tar.bz2
md5sum = 9bb236ff0193e9fc1c1fb504dd840331
environment =
PKG_CONFIG_PATH=${xorg-util-macros:location}/share/pkgconfig:${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig
CPPFLAGS=-I${xcbproto:location}/include -I${libXau:location}/include -I${xproto:location}/include -I${xorg-libpthread-stubs:location}/include -I${xextproto:location}/include -I${libX11:location}/include -I${libxcb:location}/include
LD_LIBRARY_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib
PKG_CONFIG_PATH=${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${libX11:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
# Warning: do *not* enable -fPIC CFLAGS for this library. Even if it fails and ld asks you to enable it. This will not solve your problem, and create an unexpected (by build chain) setup (all .o will be position-independant code).
# CFLAGS=-fPIC
......@@ -160,17 +158,17 @@ filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch
md5sum = 52635ef694ee6f1acb642a77ee8eb010
[inputproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/inputproto-2.0.1.tar.bz2
md5sum = da9bf9e5d174163f597d2d72757d9038
[kbproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/kbproto-1.0.5.tar.bz2
md5sum = e7edb59a3f54af15f749e8f3e314ee62
[libX11]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libX11-1.4.0.tar.bz2
md5sum = b63d9f7493a61df51d0c0be04ac435e4
configure-options =
......@@ -183,9 +181,7 @@ configure-options =
--without-xmlto
--without-fop
environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig
LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
LD_RUN_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib
PKG_CONFIG_PATH=${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
......@@ -193,7 +189,7 @@ environment =
[libXdmcp]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXdmcp-1.1.0.tar.bz2
md5sum = 762b6bbaff7b7d0831ddb4f072f939a5
environment =
......@@ -205,67 +201,67 @@ configure-options =
--without-fop
[fixesproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/fixesproto-4.1.2.tar.bz2
md5sum = bdb58ecc313b509247036d5c11fa99df
[bigreqsproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/bigreqsproto-1.1.1.tar.bz2
md5sum = 6f6c24436c2b3ab235eb14a85b9aaacf
[xcmiscproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/xcmiscproto-1.2.1.tar.bz2
md5sum = cd7372cd827bfd7ca7e9238f2ce274b1
[damageproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/damageproto-1.2.1.tar.bz2
md5sum = 998e5904764b82642cc63d97b4ba9e95
[randrproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/randrproto-1.3.2.tar.bz2
md5sum = 597491c0d8055e2a66f11350c4985775
[renderproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/renderproto-0.11.1.tar.bz2
md5sum = a914ccc1de66ddeb4b611c6b0686e274
[videoproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/videoproto-2.3.1.tar.bz2
md5sum = c3b348c6e2031b72b11ae63fc7f805c2
[fontsproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/fontsproto-2.1.1.tar.bz2
md5sum = 37102ffcaa73f77d700acd6f7a25d8f0
[recordproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/recordproto-1.14.1.tar.bz2
md5sum = 24541a30b399213def35f48efd926c63
[resourceproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/resourceproto-1.1.1.tar.bz2
md5sum = 8ff0525ae7502b48597b78d00bc22284
[xineramaproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/xineramaproto-1.2.tar.bz2
md5sum = a8aadcb281b9c11a91303e24cdea45f5
[pixman]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/archive/individual/lib/pixman-0.23.2.tar.bz2
md5sum = 2e2805f5ca02edeb15a7862779670069
[libfontenc]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/libfontenc-1.1.0.tar.bz2
md5sum = 11d3c292f05a90f6f67840a9e9c3d9b8
environment =
......@@ -277,7 +273,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[libXfont]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/libXfont-1.4.3.tar.bz2
md5sum = 6fb689cfe13d8d9460f4abb5bd88588d
environment =
......@@ -289,7 +285,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[libxkbfile]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/everything/libxkbfile-1.0.7.tar.bz2
md5sum = 59b4fe0bdf8d9b05e45b59e8fe9e7516
environment =
......@@ -300,7 +296,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[xkeyboard-config]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.1.tar.bz2
md5sum = 57ecc78bacd8ecc398d8ed6588f4d04b
depends =
......@@ -316,7 +312,7 @@ environment =
PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig
[xkbcomp]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/app/xkbcomp-1.2.0.tar.bz2
md5sum = 0f55995cd8da9b2d88553e1a2e17cd0a
# Hardcoded location for xkeyboard-config, needed during compile time
......@@ -331,26 +327,22 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[render]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xlibs.freedesktop.org/release/renderext-0.9.tar.bz2
md5sum = d43c2afc69937655d13c02588c9ff974
[libXrender]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xlibs.freedesktop.org/release/libXrender-0.9.0.tar.bz2
md5sum = ce7cda009aa0b10a73637941d44ae789
configure-options =
--disable-static
environment =
PKG_CONFIG_PATH=${renderproto:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig:${render:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig
CPPFLAGS=-I${renderproto:location}/include/ -I${libX11:location}/include/ -I${libxcb:location}/include -I${libXau:location}/include -I${libXdmcp:location}/include -I${xproto:location}/include -I${kbproto:location}/include
LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib
LD_RUN_PATH=${render:location}/lib
LDFLAGS=-L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libxcb:location}/lib -Wl,-rpath=${libxcb:location}/lib -L${libXau:location}/lib -Wl,-rpath=${libXau:location}/lib -L${libXdmcp:location}/lib -Wl,-rpath=${libXdmcp:location}/lib
PKG_CONFIG_PATH=${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${render:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:%(PATH)s
[libXinerama]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2
md5sum = ecd4839ad01f6f637c6fb5327207f89b
environment =
......@@ -360,7 +352,7 @@ configure-options =
--disable-static
[libICE]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libICE-1.0.7.tar.bz2
md5sum = bb72a732b15e9dc25c3036559387eed5
configure-options =
......@@ -372,7 +364,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[libSM]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libSM-1.2.0.tar.bz2
md5sum = e78c447bf1790552b644eca81b542742
configure-options =
......@@ -385,7 +377,7 @@ environment =
LIBUUID_CFLAGS=-I${libuuid:location}/include
[libXt]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXt-1.0.9.tar.bz2
md5sum = 8a414f8f2327aaa616ca2dcac1f5d8c3
environment =
......@@ -394,7 +386,7 @@ environment =
CPPFLAGS=-I${libSM:location}/include -I${kbproto:location}/include -I${libICE:location}/include -I${xproto:location}/include -I${libX11:location}/include
[dri2proto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.6.tar.gz
md5sum = 873142af5db695537cfe05e01d13541f
configure-options =
......@@ -405,7 +397,7 @@ environment =
[pciaccess]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libpciaccess-0.12.0.tar.bz2
md5sum = 285e07976274572e1f1e68edee09b70a
configure-options =
......@@ -414,7 +406,7 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
[makedepend]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.3.tar.bz2
md5sum = 4e6cb97bbecfbb34f3f644a75e513093
configure-options =
......@@ -424,7 +416,7 @@ environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig
[glproto]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/releases/individual/proto/glproto-1.4.14.tar.bz2
md5sum = f48257daf0017f7a7667e5bf48ca3578
configure-options =
......@@ -434,7 +426,7 @@ environment =
PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig
[xfixes]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/releases/individual/lib/libXfixes-4.0.5.tar.bz2
md5sum = 1b4b8386bd5d1751b2c7177223ad4629
configure-options =
......@@ -445,7 +437,7 @@ environment =
CPPFLAGS=-I${libX11:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${xextproto:location}/include
[xdamage]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/releases/individual/lib/libXdamage-1.1.3.tar.bz2
md5sum = 44774e1a065158b52f1a0da5100cebec
configure-options =
......@@ -463,7 +455,7 @@ filename = tmp_env.patch
md5sum = 8b60ab8121f0564a681fc00d03101696
[libxmu]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXmu-1.1.0.tar.gz
md5sum = 15e1cb9aaf97eae169bfe6944e0a541e
environment =
......@@ -472,7 +464,7 @@ environment =
CPPFLAGS=-I${libX11:location}/include -I${xextproto:location}/include
[libXcursor]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/lib/libXcursor-1.1.11.tar.gz
md5sum = 55558a41d0bcf9210636858844fa4d2f
environment =
......@@ -481,7 +473,7 @@ environment =
CPPFLAGS=-I${render:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${libX11:location}/include -I${xfixes:location}/include -I${libXrender:location}/include
[xwd]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/app/xwd-1.0.4.tar.gz
md5sum = f8da771069756210833524b5afa1832c
environment =
......@@ -492,7 +484,7 @@ environment =
[xserver]
# Adds Xvfb functionnality
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.6/src/xserver/xorg-server-1.9.3.tar.bz2
md5sum = 5bef6839a76d029204ab31aa2fcb5201
patches =
......
......@@ -35,7 +35,7 @@ filename = xpdf-3.02pl5.patch
md5sum = 504902ca5e9d66c67eed03636ec6b163
[xpdf-3.02]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
md5sum = 599dc4cc65a07ee868cf92a667a913d2
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz
configure-options =
......
......@@ -46,7 +46,7 @@ download-only = true
filename = libtar-${:version}.tar.gz
[xtrabackup]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.percona.com/downloads/XtraBackup/XtraBackup-1.6.3/source/xtrabackup-1.6.3.tar.gz
md5sum = d0b827fd18cd76416101eb7b7c56a311
make-binary = true
......
[buidout]
[buildout]
parts =
xz-utils
[xz-utils]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://tukaani.org/xz/xz-5.0.4.tar.gz
md5sum = df3df690aef18384e1e031be7ec3a964
......@@ -3,9 +3,9 @@ parts =
zabbix-agent
[zabbix-agent]
recipe = hexagonit.recipe.cmmi
url = http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.1.tar.gz?download
md5sum = 3b301aa4f2b7cb5ede46884b9c7873e1
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.5.tar.gz?download
md5sum = 0c0721c31889b63bce9aa556bcb927e8
configure-options =
--enable-agent
--enable-ipv6
......@@ -2,7 +2,7 @@
parts = zip
[zip]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz/download
md5sum = 7b74551e63f8ee6aab6fbc86676c0d37
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......
......@@ -3,6 +3,6 @@ parts =
zlib
[zlib]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libpng/zlib-1.2.6.tar.bz2?download
md5sum = dc2cfa0d2313ca77224b4d932b2911e9
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.72.0'
version = '0.78.1.dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -52,6 +52,7 @@ setup(name=name,
packages=find_packages(),
include_package_data=True,
install_requires=[
'hexagonit.recipe.download',
'lxml', # for full blown python interpreter
'netaddr', # to manipulate on IP addresses
'setuptools', # namespaces
......@@ -73,6 +74,7 @@ setup(name=name,
'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe',
'apacheperl = slapos.recipe.apacheperl:Recipe',
'apachephp = slapos.recipe.apachephp:Recipe',
'apachephpconfigure = slapos.recipe.apachephpconfigure:Recipe',
'apacheproxy = slapos.recipe.apacheproxy:Recipe',
'boinc = slapos.recipe.boinc:Recipe',
'boinc.app = slapos.recipe.boinc:App',
......@@ -88,6 +90,7 @@ setup(name=name,
'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe',
'condor = slapos.recipe.condor:Recipe',
'condor.submit = slapos.recipe.condor:AppSubmit',
'configurationfile = slapos.recipe.configurationfile:Recipe',
'cron = slapos.recipe.dcron:Recipe',
'cron.d = slapos.recipe.dcron:Part',
'davstorage = slapos.recipe.davstorage:Recipe',
......@@ -113,6 +116,8 @@ setup(name=name,
'generic.kumofs = slapos.recipe.generic_kumofs:Recipe',
'generic.memcached = slapos.recipe.generic_memcached:Recipe',
'generic.mysql = slapos.recipe.generic_mysql:Recipe',
'generic.mysql.wrap_update_mysql = slapos.recipe.generic_mysql:WrapUpdateMySQL',
'generic.mysql.wrap_mysqld = slapos.recipe.generic_mysql:WrapMySQLd',
'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',
......@@ -120,11 +125,14 @@ setup(name=name,
'haproxy = slapos.recipe.haproxy:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe',
'importmdb = slapos.recipe.importmdb:Recipe',
'ipv4toipv6 = slapos.recipe.6tunnel:FourToSix',
'ipv6toipv4 = slapos.recipe.6tunnel:SixToFour',
'java = slapos.recipe.java:Recipe',
'kumofs = slapos.recipe.kumofs:Recipe',
'kvm = slapos.recipe.kvm:Recipe',
'kvm.frontend = slapos.recipe.kvm_frontend:Recipe',
'lamp = slapos.recipe.lamp:Request',
'lamp.generic = slapos.recipe.lampgeneric:Recipe',
'lamp.request = slapos.recipe.lamp:Request',
'lamp.simple = slapos.recipe.lamp:Simple',
'lamp.static = slapos.recipe.lamp:Static',
......@@ -139,6 +147,9 @@ setup(name=name,
'mydumper = slapos.recipe.mydumper:Recipe',
'mysql = slapos.recipe.mysql:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe',
'neoppod.admin = slapos.recipe.neoppod:Admin',
'neoppod.master = slapos.recipe.neoppod:Master',
'neoppod.storage = slapos.recipe.neoppod:Storage',
'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
'notifier = slapos.recipe.notifier:Recipe',
'notifier.callback = slapos.recipe.notifier:Callback',
......@@ -151,12 +162,17 @@ setup(name=name,
'postgres.import = slapos.recipe.postgres.backup:ImportRecipe',
'proactive = slapos.recipe.proactive:Recipe',
'publish = slapos.recipe.publish:Recipe',
'publish.serialised = slapos.recipe.publish:Serialised',
'publishsection = slapos.recipe.publish:PublishSection',
'publishurl = slapos.recipe.publishurl:Recipe',
'pwgen = slapos.recipe.pwgen:Recipe',
'pwgen.stable = slapos.recipe.pwgen:StablePasswordGeneratorRecipe',
'redis.server = slapos.recipe.redis:Recipe',
'request = slapos.recipe.request:Recipe',
'request.serialised = slapos.recipe.request:Serialised',
'request.edge = slapos.recipe.request:RequestEdge',
'requestoptional = slapos.recipe.request:RequestOptional',
'reverseproxy.nginx = slapos.recipe.reverse_proxy_nginx:Recipe',
'seleniumrunner = slapos.recipe.seleniumrunner:Recipe',
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed',
'shell = slapos.recipe.shell:Recipe',
......@@ -165,6 +181,7 @@ setup(name=name,
'simplelogger = slapos.recipe.simplelogger:Recipe',
'siptester = slapos.recipe.siptester:SipTesterRecipe',
'slapconfiguration = slapos.recipe.slapconfiguration:Recipe',
'slapconfiguration.serialised = slapos.recipe.slapconfiguration:Serialised',
'slapcontainer = slapos.recipe.container:Recipe',
'slapmonitor = slapos.recipe.slapmonitor:MonitorRecipe',
'slapmonitor-xml = slapos.recipe.slapmonitor:MonitorXMLRecipe',
......@@ -187,6 +204,7 @@ setup(name=name,
'xvfb = slapos.recipe.xvfb:Recipe',
'xwiki = slapos.recipe.xwiki:Recipe',
'zabbixagent = slapos.recipe.zabbixagent:Recipe',
'zimbra.kvm = slapos.recipe.zimbra_kvm:Recipe',
'zeo = slapos.recipe.zeo:Recipe',
],
'slapos.recipe.nosqltestbed.plugin': [
......
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
"""
ipv4toipv6 tunnel configuration.
"""
# Override in subclasses
template_name = None
def install(self):
return [
self.createExecutable(
self.options['runner-path'],
self.substituteTemplate(
self.getTemplateFilename(self.template_name),
{
'ipv6': self.options['ipv6'],
'ipv6_port': self.options['ipv6-port'],
'ipv4': self.options['ipv4'],
'ipv4_port': self.options['ipv4-port'],
'shell_path': self.options['shell-path'],
'6tunnel_path': self.options['6tunnel-path'],
},
),
)
]
class SixToFour(Recipe):
template_name = '6to4.in'
class FourToSix(Recipe):
template_name = '4to6.in'
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec %(6tunnel_path)s -d -l %(ipv4)s %(ipv4_port)s %(ipv6)s %(ipv6_port)s
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec %(6tunnel_path)s -6 -4 -d -l %(ipv6)s %(ipv6_port)s %(ipv4)s %(ipv4_port)s
......@@ -36,6 +36,7 @@ import ConfigParser
import re
import traceback
TRUE_VALUES = ['y', 'yes', '1', 'true']
class Recipe(BaseSlapRecipe):
......@@ -65,13 +66,13 @@ class Recipe(BaseSlapRecipe):
# self.cron_d is a directory, where cron jobs can be registered
self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
self.killpidfromfile = zc.buildout.easy_install.scripts(
[('killpidfromfile', 'slapos.recipe.erp5.killpidfromfile',
[('killpidfromfile', 'slapos.toolbox.killpidfromfile',
'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0]
self.path_list.append(self.killpidfromfile)
rewrite_rule_list = []
rewrite_rule_https_only_list = []
rewrite_rule_zope_list = []
rewrite_rule_zope_path_list = []
slave_dict = {}
......@@ -85,11 +86,19 @@ class Recipe(BaseSlapRecipe):
domain_dict = {}
for slave_instance in slave_instance_list:
# Sanitize inputs
backend_url = slave_instance.get("url", None)
reference = slave_instance.get("slave_reference")
enable_cache = slave_instance.get('enable_cache', '').lower() in TRUE_VALUES
slave_type = slave_instance.get('type', '').lower() or None
https_only = slave_instance.get('https-only', '').lower() in TRUE_VALUES
# Set scheme (http? https?)
# Future work may allow to choose between http and https (or both?)
scheme = 'http://'
if https_only:
scheme = 'https://'
else:
scheme = 'http://'
self.logger.info('Processing slave instance: %s' % reference)
......@@ -120,27 +129,36 @@ class Recipe(BaseSlapRecipe):
slave_dict[reference] = "%s%s/" % (scheme, domain)
# Check if we want varnish+stunnel cache.
if slave_instance.get("enable_cache", "").upper() in ('1', 'TRUE'):
# XXX-Cedric : need to refactor to clean code? (to many variables)
rewrite_rule = self.configureVarnishSlave(
base_varnish_port, backend_url, reference, service_dict, domain)
base_varnish_port += 2
else:
rewrite_rule = "%s %s" % (domain, backend_url)
#if enable_cache:
# # XXX-Cedric : need to refactor to clean code? (to many variables)
# rewrite_rule = self.configureVarnishSlave(
# base_varnish_port, backend_url, reference, service_dict, domain)
# base_varnish_port += 2
#else:
# rewrite_rule = "%s %s" % (domain, backend_url)
# Temporary forbid activation of cache until it is properly tested
rewrite_rule = "%s %s" % (domain, backend_url)
# Finally, if successful, we add the rewrite rule to our list of rules
# We have 4 RewriteMaps:
# - One for generic (non-zope) websites, accepting both HTTP and HTTPS
# - One for generic websites that only accept HTTPS
# - Two for Zope-based websites
if rewrite_rule:
# We check if we have a zope slave. It requires different rewrite
# rule structure.
# So we will have one RewriteMap for normal websites, and one
# RewriteMap for Zope Virtual Host Monster websites.
if slave_instance.get("type", "").lower() in ['zope']:
if slave_type in ['zope']:
rewrite_rule_zope_list.append(rewrite_rule)
# For Zope, we have another dict containing the path e.g '/erp5/...
rewrite_rule_path = "%s %s" % (domain, slave_instance.get('path', ''))
rewrite_rule_zope_path_list.append(rewrite_rule_path)
else:
rewrite_rule_list.append(rewrite_rule)
if https_only:
rewrite_rule_https_only_list.append(rewrite_rule)
else:
rewrite_rule_list.append(rewrite_rule)
# Certificate stuff
valid_certificate_str = self.parameter_dict.get("domain_ssl_ca_cert")
......@@ -172,6 +190,7 @@ class Recipe(BaseSlapRecipe):
plain_http_port=frontend_plain_http_port_number,
name=frontend_domain_name,
rewrite_rule_list=rewrite_rule_list,
rewrite_rule_https_only_list=rewrite_rule_https_only_list,
rewrite_rule_zope_list=rewrite_rule_zope_list,
rewrite_rule_zope_path_list=rewrite_rule_zope_path_list,
key=key, certificate=certificate)
......@@ -265,29 +284,6 @@ class Recipe(BaseSlapRecipe):
return "%s http://%s:%s" % \
(domain, varnish_ip, base_varnish_port)
def installLogrotate(self):
"""Installs logortate main configuration file and registers its to cron"""
logrotate_d = os.path.abspath(os.path.join(self.etc_directory,
'logrotate.d'))
self._createDirectory(logrotate_d)
logrotate_backup = self.createBackupDirectory('logrotate')
logrotate_conf = self.createConfigurationFile("logrotate.conf",
"include %s" % logrotate_d)
logrotate_cron = os.path.join(self.cron_d, 'logrotate')
state_file = os.path.join(self.data_root_directory, 'logrotate.status')
open(logrotate_cron, 'w').write('0 0 * * * %s -s %s %s' %
(self.options['logrotate_binary'], state_file, logrotate_conf))
self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron])
return logrotate_d, logrotate_backup
def registerLogRotation(self, name, log_file_list, postrotate_script):
"""Register new log rotation requirement"""
open(os.path.join(self.logrotate_d, name), 'w').write(
self.substituteTemplate(self.getTemplateFilename(
'logrotate_entry.in'),
dict(file_list=' '.join(['"'+q+'"' for q in log_file_list]),
postrotate=postrotate_script, olddir=self.logrotate_backup)))
def requestCertificate(self, name):
hash = hashlib.sha512(name).hexdigest()
key = os.path.join(self.ca_private, hash + self.ca_key_ext)
......@@ -404,8 +400,7 @@ class Recipe(BaseSlapRecipe):
def _getApacheConfigurationDict(self, name, ip_list, port):
apache_conf = dict()
apache_conf['server_name'] = name
apache_conf['pid_file'] = os.path.join(self.run_directory,
name + '.pid')
apache_conf['pid_file'] = self.options['pid-file']
apache_conf['lock_file'] = os.path.join(self.run_directory,
name + '.lock')
apache_conf['document_root'] = os.path.join(self.data_root_directory,
......@@ -415,13 +410,8 @@ class Recipe(BaseSlapRecipe):
apache_conf['ip_list'] = ip_list
apache_conf['port'] = port
apache_conf['server_admin'] = 'admin@'
apache_conf['error_log'] = os.path.join(self.log_directory,
'frontend-apache-error.log')
apache_conf['access_log'] = os.path.join(self.log_directory,
'frontend-apache-access.log')
self.registerLogRotation(name, [apache_conf['error_log'],
apache_conf['access_log']], self.killpidfromfile + ' ' +
apache_conf['pid_file'] + ' SIGUSR1')
apache_conf['error_log'] = self.options['error-log']
apache_conf['access_log'] = self.options['access-log']
return apache_conf
def installVarnishCache(self, name, ip, port, control_port, backend_host,
......@@ -503,10 +493,13 @@ class Recipe(BaseSlapRecipe):
port=4443, plain_http_port=8080,
rewrite_rule_list=None,
rewrite_rule_zope_list=None,
rewrite_rule_https_only_list=None,
rewrite_rule_zope_path_list=None,
access_control_string=None):
if rewrite_rule_list is None:
rewrite_rule_list = []
if rewrite_rule_https_only_list is None:
rewrite_rule_zope_path_list = []
if rewrite_rule_zope_list is None:
rewrite_rule_zope_list = []
if rewrite_rule_zope_path_list is None:
......@@ -529,7 +522,7 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(mod_ssl_cache_location)
# Create "custom" apache configuration files if it does not exist.
# Note : Those files won't be erased or changed when slapgrid is ran.
# Note : Those files won't be erased or changed by slapgrid.
# It can be freely customized by node admin.
custom_apache_configuration_directory = os.path.join(
self.data_root_directory, 'apache-conf.d')
......@@ -537,12 +530,14 @@ class Recipe(BaseSlapRecipe):
# First one is included in the end of the apache configuration file
custom_apache_configuration_file_location = os.path.join(
custom_apache_configuration_directory, 'apache_frontend.custom.conf')
open(custom_apache_configuration_file_location, 'a')
if not os.path.exists(custom_apache_configuration_file_location):
open(custom_apache_configuration_file_location, 'w')
# Second one is included in the virtualhost of apache configuration file
custom_apache_virtual_configuration_file_location = os.path.join(
custom_apache_configuration_directory,
'apache_frontend.virtualhost.custom.conf')
open(custom_apache_virtual_configuration_file_location, 'a')
if not os.path.exists(custom_apache_virtual_configuration_file_location):
open(custom_apache_virtual_configuration_file_location, 'w')
# Create backup of custom apache configuration
backup_path = self.createBackupDirectory('custom_apache_conf_backup')
......@@ -555,15 +550,22 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(backup_cron)
# Create configuration file and rewritemaps
apachemap_name = "apachemap.txt"
apachemapzope_name = "apachemapzope.txt"
apachemapzopepath_name = "apachemapzopepath.txt"
self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list))
self.createConfigurationFile(apachemapzope_name,
"\n".join(rewrite_rule_zope_list))
self.createConfigurationFile(apachemapzopepath_name,
"\n".join(rewrite_rule_zope_path_list))
apachemap_path = self.createConfigurationFile(
"apache_rewritemap_generic.txt",
"\n".join(rewrite_rule_list)
)
apachemap_httpsonly_path = self.createConfigurationFile(
"apache_rewritemap_httpsonly.txt",
"\n".join(rewrite_rule_https_only_list)
)
apachemap_zope_path = self.createConfigurationFile(
"apache_rewritemap_zope.txt",
"\n".join(rewrite_rule_zope_list)
)
apachemap_zopepath_path = self.createConfigurationFile(
"apache_rewritemap_zopepath.txt",
"\n".join(rewrite_rule_zope_path_list)
)
apache_conf = self._getApacheConfigurationDict(name, ip_list, port)
apache_conf['ssl_snippet'] = self.substituteTemplate(
......@@ -590,9 +592,10 @@ class Recipe(BaseSlapRecipe):
apache_conf.update(**dict(
path_enable=path,
apachemap_path=os.path.join(self.etc_directory, apachemap_name),
apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name),
apachemapzopepath_path=os.path.join(self.etc_directory, apachemapzopepath_name),
apachemap_path=apachemap_path,
apachemap_httpsonly_path=apachemap_httpsonly_path,
apachemapzope_path=apachemap_zope_path,
apachemapzopepath_path=apachemap_zopepath_path,
apache_domain=name,
https_port=port,
plain_http_port=plain_http_port,
......
......@@ -22,7 +22,7 @@ ServerTokens Prod
# Log configuration
ErrorLog "%(error_log)s"
LogLevel warn
LogLevel info
LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
......@@ -60,8 +60,8 @@ BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
......@@ -84,7 +84,7 @@ MCacheRemovalAlgorithm LRU
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent
......@@ -104,10 +104,12 @@ Header append Vary User-Agent
# or changed when slapgrid is ran. It can be freely customized by node admin.
Include %(custom_apache_virtualhost_conf)s
# Define the two RewriteMaps (key -> value store): one for Zope, one generic
# Define the 3 RewriteMaps (key -> value store): one for Zope, one generic,
# one generic https only,
# containing: rewritten URL -> original URL (a.k.a VirtualHostBase in Zope)
RewriteMap apachemapzope txt:%(apachemapzope_path)s
RewriteMap apachemapgeneric txt:%(apachemap_path)s
RewriteMap apachemapgenerichttpsonly txt:%(apachemap_httpsonly_path)s
# Define another RewriteMap for Zope, containing:
# rewritten URL -> VirtualHostRoot
......@@ -123,20 +125,32 @@ Header append Vary User-Agent
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
# We suppose that Apache listens to 443 (even indirectly thanks to things like iptables)
RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P]
# Same for https only server
RewriteCond ${apachemapgenerichttpsonly:%%{SERVER_NAME}} >""
# We suppose that Apache listens to 443 (even indirectly thanks to things like iptables)
RewriteRule ^/(.*)$ ${apachemapgenerichttpsonly:%%{SERVER_NAME}}/$1 [L,P]
# If nothing exist : put a nice error
ErrorDocument 404 /notfound.html
</VirtualHost>
# Only accept generic (i.e not Zope) backends on http
<VirtualHost *:%(plain_http_port)s>
RewriteEngine On
SSLProxyEngine on
# Rewrite part
ProxyVia On
ProxyPreserveHost On
ProxyTimeout 600
RewriteEngine On
# Remove "Secure" from cookies, as backend may be https
Header edit Set-Cookie "(?i)^(.+);secure$" "$1"
# Include configuration file not operated by slapos. This file won't be erased
# or changed when slapgrid is ran. It can be freely customized by node admin.
Include %(custom_apache_virtualhost_conf)s
# We accept generic (i.e not lamp) backends on http
RewriteMap apachemapgeneric txt:%(apachemap_path)s
RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >""
RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P]
......@@ -147,6 +161,7 @@ Header append Vary User-Agent
RewriteRule ^/(.*)$ https://%%{SERVER_NAME}%%{REQUEST_URI}
</VirtualHost>
# Include configuration file not operated by slapos. This file won't be erased
# or changed when slapgrid is ran. It can be freely customized by node admin.
Include %(custom_apache_conf)s
......@@ -29,61 +29,71 @@ import pkg_resources
class Recipe(GenericBaseRecipe):
def install(self):
path_list = []
ip = self.options['ip']
port = self.options['port']
backend = self.options['backend']
apache_conf = dict()
try:
backend_list = self.options['backend-list']
except KeyError:
backend_list = [(self.options['port'], self.options['backend'])]
scheme = self.options['scheme']
if scheme == 'http':
required_path_list = []
apache_conf['ssl_snippet'] = ''
ssl_enable = ssl_snippet = ''
elif scheme == 'https':
key = self.options['key-file']
certificate = self.options['cert-file']
required_path_list = [key, certificate]
apache_conf['key'] = key
apache_conf['certificate'] = certificate
apache_conf['ssl_session_cache'] = self.options['ssl-session-cache']
apache_conf['ssl_snippet'] = pkg_resources.resource_string(__name__,
'template/snippet.ssl.in') % apache_conf
ssl_snippet = self.substituteTemplate(self.getTemplateFilename('snippet.ssl.in'), {
'key': key,
'certificate': certificate,
'ssl_session_cache': self.options['ssl-session-cache'],
})
if 'ssl-authentication' in self.options and self.optionIsTrue(
'ssl-authentication'):
apache_conf['ssl_snippet'] += pkg_resources.resource_string(__name__,
'template/snippet.ssl.ca.in') % dict(
ca_certificate=self.options['ssl-authentication-certificate'],
ca_crl=self.options['ssl-authentication-crl']
)
ssl_snippet += self.substituteTemplate(self.getTemplateFilename('snippet.ssl.ca.in'), {
'ca_certificate': self.options['ssl-authentication-certificate'],
'ca_crl': self.options['ssl-authentication-crl'],
})
ssl_enable = 'SSLEngine on'
else:
raise ValueError, "Unsupported scheme %s" % scheme
raise ValueError('Unsupported scheme %s' % scheme)
access_control_string = self.options['access-control-string']
apache_conf['pid_file'] = self.options['pid-file']
apache_conf['lock_file'] = self.options['lock-file']
apache_conf['ip'] = ip
apache_conf['port'] = port
apache_conf['server_admin'] = 'admin@'
apache_conf['error_log'] = self.options['error-log']
apache_conf['access_log'] = self.options['access-log']
apache_conf['server_name'] = '%s' % apache_conf['ip']
apache_conf['path'] = '/'
apache_conf['access_control_string'] = access_control_string
apache_conf['rewrite_rule'] = "RewriteRule (.*) %s%s$1 [L,P]" % (backend,
self.options.get('backend-path', '/'))
apache_conf_string = pkg_resources.resource_string(__name__,
'template/apache.zope.conf.in') % apache_conf
apache_config_file = self.createFile(self.options['configuration-file'],
apache_conf_string)
path_list.append(apache_config_file)
wrapper = self.createPythonScript(self.options['wrapper'], __name__ +
'.apache.runApache', [
dict(
required_path_list=required_path_list,
binary=self.options['apache-binary'],
config=apache_config_file
)
])
path_list.append(wrapper)
return path_list
ip = self.options['ip']
backend_path = self.options.get('backend-path', '/')
vhost_template_name = self.getTemplateFilename('vhost.in')
apache_config_file = self.createFile(
self.options['configuration-file'],
self.substituteTemplate(
self.getTemplateFilename('apache.zope.conf.in'),
{
'path': '/',
'server_admin': 'admin@',
'pid_file': self.options['pid-file'],
'lock_file': self.options['lock-file'],
'error_log': self.options['error-log'],
'access_log': self.options['access-log'],
'access_control_string': self.options['access-control-string'],
'ssl_snippet': ssl_snippet,
'vhosts': ''.join(self.substituteTemplate(vhost_template_name, {
'ip': ip,
'port': port,
'backend': backend,
'backend-path': backend_path,
'ssl_enable': ssl_enable,
}) for (port, backend) in backend_list),
},
)
)
return [
apache_config_file,
self.createPythonScript(
self.options['wrapper'],
__name__ + '.apache.runApache',
[
{
'required_path_list': required_path_list,
'binary': self.options['apache-binary'],
'config': apache_config_file,
},
],
),
]
......@@ -22,7 +22,6 @@ LoadModule headers_module modules/mod_headers.so
# Basic server configuration
PidFile "%(pid_file)s"
Listen %(ip)s:%(port)s
ServerAdmin %(server_admin)s
TypesConfig conf/mime.types
AddType application/x-compress .Z
......@@ -63,4 +62,4 @@ CustomLog "%(access_log)s" combined
# Magic of Zope related rewrite
RewriteEngine On
%(rewrite_rule)s
%(vhosts)s
# SSL Configuration
SSLEngine on
SSLCertificateFile %(certificate)s
SSLCertificateKeyFile %(key)s
SSLRandomSeed startup builtin
......
Listen %(ip)s:%(port)s
<VirtualHost *:%(port)s>
%(ssl_enable)s
RewriteRule (.*) %(backend)s%(backend-path)s$1 [L,P]
</VirtualHost>
......@@ -124,7 +124,15 @@ class Recipe(GenericBaseRecipe):
mysql_ip=self.options['mysql-host'],
mysql_port=self.options['mysql-port'],
secret_key=secret_key,
ip='[%s]' % self.options['ip'],
port=self.options['port'],
# XXX-Cedric: add frontend url.
)
# Allow to give custom parameters to template
application_parameter_prefix = 'application-'
for key in self.options.keys():
if key.startswith(application_parameter_prefix):
application_conf[key.lstrip(application_parameter_prefix)] = self.options[key]
directory, file_ = os.path.split(self.options['configuration'])
......
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import zc.buildout
import sys
import zc.recipe.egg
class Recipe(GenericBaseRecipe):
def install(self):
"""
Taken out from the old "lamp" recipe. Allows do configure a LAMP instance.
"""
self.path_list = []
document_root = self.options['htdocs']
url = self.options.get('url', '')
mysql_conf = {'mysql_host': self.options['mysql-host'],
'mysql_port': self.options['mysql-port'],
'mysql_user': self.options['mysql-username'],
'mysql_password': self.options['mysql-password'],
'mysql_database': self.options['mysql-database'],
}
self.configureInstallation(document_root, url, mysql_conf)
return self.path_list
def configureInstallation(self, document_root, url, mysql_conf):
"""Start process which can launch python scripts, move or remove files or
directories when installing software.
"""
if not self.options.has_key('delete') and not self.options.has_key('rename') and not\
self.options.has_key('chmod') and not self.options.has_key('script') and not self.options.has_key('sql-script'):
return ""
delete = []
chmod = []
data = []
rename = []
rename_list = ""
argument = [self.options['lampconfigure'], "-H", mysql_conf['mysql_host'], "-P", mysql_conf['mysql_port'],
"-p", mysql_conf['mysql_password'], "-u", mysql_conf['mysql_user']]
if not self.options.has_key('file_token'):
argument = argument + ["-d", mysql_conf['mysql_database'],
"--table", self.options['table_name'].strip(), "--cond",
self.options.get('constraint', '1').strip()]
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(','):
delete.append(fname.strip())
if self.options.has_key('rename'):
for fname in self.options['rename'].split(','):
if fname.find("=>") < 0:
old_name = fname
fname = []
fname.append(old_name)
fname.append(old_name + '-' + mysql_conf['mysql_user'])
else:
fname = fname.split("=>")
cmd = ["rename"]
if self.options.has_key('rename_chmod'):
cmd += ["--chmod", self.options['rename_chmod'].strip()]
rename.append(cmd + [fname[0].strip(), fname[1].strip()])
rename_list += fname[0] + " to " + fname[1] + " "
if self.options.has_key('chmod'):
chmod = ["chmod", self.options['mode'].strip()]
for fname in self.options['chmod'].split(','):
chmod.append(fname.strip())
if self.options.has_key('script') and \
self.options['script'].strip().endswith(".py"):
data = ["run", self.options['script'].strip(), "-v", mysql_conf['mysql_database'], url, document_root]
if self.options.has_key('sql-script'):
data = ["sql", self.options['sql-script'].strip(), "-v", mysql_conf['mysql_database'], url, document_root]
# TODO factor
if delete != []:
print "Creating lampconfigure with 'delete' arguments"
command = argument + delete
if rename != []:
for parameters in rename:
print "Creating lampconfigure with 'rename' arguments"
command = argument + rename
if chmod != []:
print "Creating lampconfigure with 'chmod' arguments"
command = argument + chmod
if data != []:
print "Creating lampconfigure with 'run' arguments"
command = argument + data
configureinstall_wrapper_path = self.createPythonScript(
self.options['configureinstall-location'],
__name__ + '.runner.executeRunner',
[argument, delete, rename, chmod, data]
)
#TODO finish to port this and remove upper one
#configureinstall_wrapper_path = self.createPythonScript(
# self.options['configureinstall-location'],
# 'slapos.lamp.run',
# [command]
#)
self.path_list.append(configureinstall_wrapper_path)
return rename_list
import subprocess
def executeRunner(args):
"""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.
"""
arguments, delete, rename, chmod, data = args
if delete != []:
print "Calling lampconfigure with 'delete' arguments"
result = subprocess.Popen(arguments + delete)
result.wait()
if rename != []:
for parameters in rename:
print "Calling lampconfigure with 'rename' arguments"
result = subprocess.Popen(arguments + parameters)
result.wait()
if chmod != []:
print "Calling lampconfigure with 'chmod' arguments"
result = subprocess.Popen(arguments + chmod)
result.wait()
if data != []:
print "Calling lampconfigure with 'run' arguments"
print arguments + data
result = subprocess.Popen(arguments + data)
result.wait()
return
......@@ -39,7 +39,7 @@ class Recipe(GenericBaseRecipe):
'url': url,
'shell_path': self.options['dash_path'],
'curl_path': self.options['curl_path'],
'pattern': self.options.get('pattern', url),
'match': self.options.get('match', url)
}
# XXX-Cedric in this script, curl won't check certificate
......
......@@ -3,14 +3,14 @@
# BEWARE: It will be overwritten automatically
URL="%(url)s"
PATTERN="%(pattern)s"
MATCH="%(match)s"
if [ -z $URL ]; then
echo "No URL specified." >&2
exit 3
fi
%(curl_path)s -k -sL $URL | grep "$PATTERN" > /dev/null
%(curl_path)s -k -sL $URL | grep "$MATCH" > /dev/null
if [ $? != 0 ]; then
echo "Content at $URL seems to be corrupted" >&2
......
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
configuration_file = self.createFile(
self.options['configuration-file-path'],
self.substituteTemplate(
self.options['configuration-template-path'],
self.options
)
)
return configuration_file
......@@ -36,6 +36,11 @@ from slapos.recipe.librecipe import GenericBaseRecipe
BUFFER_SIZE = 1024
# XXX-Cedric: For god's sake, why do we always reinvent the wheel???
# DON'T use this and use h.r.download, except if you need the "confirm" feature.
# XXX-Cedric: implement "confirm" feature in h.r.download
def service(args):
environ = os.environ.copy()
environ.update(PATH=args['path'])
......
......@@ -35,6 +35,10 @@ class Recipe(GenericBaseRecipe):
kumo_server_listen_port = int(self.options['server-listen-port'])
kumo_gateway_port = int(self.options['gateway-port'])
path_list = []
if 'data-path' in self.options:
kumo_server_storage = self.options.get('data-path')
else:
kumo_server_storage = os.path.join(self.options['data-directory'], "kumodb.tch")
# XXX: kumo is not storing pid in file, unless it is not running as daemon
# but running daemons is incompatible with SlapOS, so there is currently
# no way to have Kumo's pid files to rotate logs and send signals to them
......@@ -48,7 +52,7 @@ class Recipe(GenericBaseRecipe):
kumo_server_binary=self.options['kumo-server-binary'],
kumo_server_ip=ip,
kumo_server_log=self.options['kumo-server-log'],
kumo_server_storage=os.path.join(self.options['data-directory'], "kumodb.tch"),
kumo_server_storage=kumo_server_storage,
kumo_manager_port=kumo_manager_port,
kumo_server_port=kumo_server_port,
kumo_server_listen_port=kumo_server_listen_port,
......
......@@ -69,9 +69,16 @@ class Recipe(GenericBaseRecipe):
mysql_script_list = []
# user defined functions
mroonga = self.options.get('mroonga', 'ha_mroonga.so')
if mroonga:
last_insert_grn_id = "CREATE FUNCTION last_insert_grn_id RETURNS " \
"INTEGER SONAME '" + mroonga + "';"
else:
last_insert_grn_id = ""
mysql_script_list.append(self.substituteTemplate(
self.getTemplateFilename('mysql-init-function.sql.in'),
{
'last_insert_grn_id': last_insert_grn_id,
}
))
# real database
......@@ -119,14 +126,13 @@ class Recipe(GenericBaseRecipe):
)
path_list.append(mysql_update)
mysqld_binary = self.options['mysqld-binary']
mysqld = self.createPythonScript(
self.options['wrapper'],
'%s.mysql.runMysql' % __name__,
[dict(
mysql_base_directory=self.options['mysql-base-directory'],
mysql_install_binary=self.options['mysql-install-binary'],
mysqld_binary=mysqld_binary,
mysqld_binary=self.options['mysqld-binary'],
data_directory=self.options['data-directory'],
mysql_binary=mysql_binary,
socket=socket,
......@@ -134,6 +140,7 @@ class Recipe(GenericBaseRecipe):
)]
)
path_list.append(mysqld)
environment = dict(PATH='%s' % self.options['bin-directory'])
# TODO: move to a separate recipe (ack'ed by Cedric)
if 'backup-script' in self.options:
# backup configuration
......@@ -144,7 +151,6 @@ class Recipe(GenericBaseRecipe):
'--defaults-file=%s' % mysql_conf_file,
'--socket=%s' % socket.strip(), '--user=root',
'--ibbackup=%s'% self.options['xtrabackup-binary']]
environment = dict(PATH='%s' % self.options['bin-directory'])
innobackupex_incremental = self.createPythonScript(self.options['innobackupex-incremental'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list + ['--incremental'], environment])
path_list.append(innobackupex_incremental)
innobackupex_full = self.createPythonScript(self.options['innobackupex-full'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list, environment])
......@@ -204,3 +210,33 @@ class Recipe(GenericBaseRecipe):
path_list.append(pt_exe)
return path_list
class WrapUpdateMySQL(GenericBaseRecipe):
def install(self):
return [
self.createPythonScript(
self.options['output'],
__name__ + '.mysql.updateMysql',
[{
'mysql_upgrade_binary': self.options['binary'],
'mysql_binary': self.options['mysql'],
'mysql_script_file': self.options['init-script'],
}]
),
]
class WrapMySQLd(GenericBaseRecipe):
def install(self):
return [
self.createPythonScript(
self.options['output'],
__name__ + '.mysql.runMysql',
[{
'mysqld_binary': self.options['binary'],
'configuration_file': self.options['configuration-file'],
'data_directory': self.options['data-directory'],
'mysql_install_binary': self.options['mysql-install-binary'],
'mysql_base_directory': self.options['mysql-base-directory'],
}]
),
]
......@@ -41,8 +41,18 @@ def updateMysql(args):
conf = args[0]
sleep = 30
is_succeed = False
try:
script_filename = conf.pop('mysql_script_file')
except KeyError:
pass
else:
assert 'mysql_script' not in conf
with open(script_filename) as script_file:
conf['mysql_script'] = script_file.read()
while True:
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--no-defaults', '--user=root', '--socket=%s' % conf['socket']]
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--no-defaults', '--user=root']
if 'socket' in conf:
mysql_upgrade_list.append('--socket=' + conf['socket'])
mysql_upgrade = subprocess.Popen(mysql_upgrade_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = mysql_upgrade.communicate()[0]
if mysql_upgrade.returncode is None:
......@@ -54,7 +64,9 @@ def updateMysql(args):
print "MySQL database upgraded with result:\n%s" % result
else:
print "No need to upgrade MySQL database"
mysql_list = [conf['mysql_binary'].strip(), '--no-defaults', '-B', '--user=root', '--socket=%s' % conf['socket']]
mysql_list = [conf['mysql_binary'].strip(), '--no-defaults', '-B', '--user=root']
if 'socket' in conf:
mysql_list.append('--socket=' + conf['socket'])
mysql = subprocess.Popen(mysql_list, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = mysql.communicate(conf['mysql_script'])[0]
......
......@@ -22,7 +22,7 @@ slow_query_log
slow_query_log_file = %(slow_query_log)s
long_query_time = 1
max_allowed_packet = 128M
query_cache_size = 32M
query_cache_size = 0
plugin-load = ha_mroonga.so;handlersocket.so
......
USE mysql;
DROP FUNCTION IF EXISTS last_insert_grn_id;
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';
%(last_insert_grn_id)s
DROP FUNCTION IF EXISTS sphinx_snippets;
#CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
......@@ -66,40 +66,53 @@ class Recipe(GenericBaseRecipe):
# stick in other nodes and are not coming back. Please note this option
# is not an issue if you have more than (maxqueue * node_quantity) requests
# because haproxy will handle a top-level queue
try:
backend_dict = self.options['backend-dict']
except KeyError:
backend_list = self.options['backend-list']
if isinstance(backend_list, str):
# BBB
backend_list = backend_list.split()
backend_dict = {
self.options['name']: (self.options['port'], backend_list),
}
snippet_filename = self.getTemplateFilename(
'haproxy-server-snippet.cfg.in')
# Prepare all filestorages
server_snippet_filename = self.getTemplateFilename(
'haproxy-server-snippet.cfg.in')
listen_snippet_filename = self.getTemplateFilename(
'haproxy-listen-snippet.cfg.in')
server_snippet = ""
ip = self.options['ip']
server_check_path = self.options['server-check-path']
# FIXME: maxconn must be provided per-backend, not globally
maxconn = self.options['maxconn']
i = 0
name = self.options['name']
backend_list = self.options['backend-list']
if isinstance(backend_list, str):
# BBB
backend_list = backend_list.split()
for address in backend_list:
i += 1
for name, (port, backend_list) in backend_dict.iteritems():
server_snippet += self.substituteTemplate(
snippet_filename, dict(
name='%s_%s' % (name, i),
address=address,
cluster_zope_thread_amount=self.options['maxconn']))
listen_snippet_filename, {
'name': name,
'ip': ip,
'port': port,
'server_check_path': server_check_path,
})
for address in backend_list:
i += 1
server_snippet += self.substituteTemplate(
server_snippet_filename, {
'name': '%s_%s' % (name, i),
'address': address,
'cluster_zope_thread_amount': maxconn,
})
config = dict(
name=name,
ip=self.options['ip'],
port=self.options['port'],
server_text=server_snippet,
server_check_path=self.options['server-check-path'],)
template_filename = self.getTemplateFilename('haproxy.cfg.in')
configuration_path = self.createFile(
self.options['conf-path'],
self.substituteTemplate(template_filename, config))
# Create running wrapper
self.options['conf-path'],
self.substituteTemplate(
self.getTemplateFilename('haproxy.cfg.in'),
{'server_text': server_snippet},
)
)
wrapper_path = self.createPythonScript(
self.options['wrapper-path'],
'slapos.recipe.librecipe.execute.execute',
arguments=[self.options['binary-path'].strip(), '-f', configuration_path],)
return [configuration_path, wrapper_path]
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
balance roundrobin
option httpchk GET %(server_check_path)s
stats uri /haproxy
stats realm Global\ statistics
server %(name)s %(address)s cookie %(name)s check inter 3s rise 1 fall 2 maxqueue 5 maxconn %(cluster_zope_thread_amount)s
......@@ -29,13 +29,4 @@ defaults
# to render a page
option forceclose
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
balance roundrobin
%(server_text)s
option httpchk GET %(server_check_path)s
stats uri /haproxy
stats realm Global\ statistics
......@@ -107,7 +107,8 @@ class Recipe(GenericSlapRecipe):
http_redirect_server = ''
config = dict(
ip=self.options['ip'],
ipv6=self.options['ipv6'],
ipv4=self.options['ipv4'],
port=self.options['port'],
key=self.options['ssl-key-path'],
certificate=self.options['ssl-cert-path'],
......
......@@ -37,12 +37,13 @@ var fs = require('fs'),
httpProxy = require('http-proxy'),
proxyByUrl = require('proxy-by-url');
var listenInterface = process.argv[2],
port = process.argv[3],
sslKeyFile = process.argv[4],
sslCertFile = process.argv[5],
proxyTable = process.argv[6],
redirect = process.argv[7] || false,
var listenInterfacev6 = process.argv[2],
listenInterfacev4 = process.argv[3],
port = process.argv[4],
sslKeyFile = process.argv[5],
sslCertFile = process.argv[6],
proxyTable = process.argv[7],
redirect = process.argv[8] || false,
isRawIPv6;
if (process.argv.length < 7) {
......@@ -50,11 +51,6 @@ if (process.argv.length < 7) {
process.exit(1);
}
isRawIPv6 = function checkipv6(str) {
// Inspired by http://forums.intermapper.com/viewtopic.php?t=452
return (/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(str));
}(listenInterface);
/**
* Dummy middleware that throws 404 not found. Does not contain websocket
* middleware.
......@@ -69,7 +65,7 @@ var middlewareNotFound = function(req, res, proxy) {
/**
* Create server
*/
var proxyServer = httpProxy.createServer(
var proxyServerv6 = httpProxy.createServer(
// We declare our proxyByUrl middleware
proxyByUrl(proxyTable),
// Then we add your dummy middleware, called when proxyByUrl doesn't find url.
......@@ -87,42 +83,70 @@ var proxyServer = httpProxy.createServer(
)
},
source: {
host: listenInterface,
host: listenInterfacev6,
port: port
}}
);
var proxyServerv4 = httpProxy.createServer(
// We declare our proxyByUrl middleware
proxyByUrl(proxyTable),
// Then we add your dummy middleware, called when proxyByUrl doesn't find url.
middlewareNotFound,
// And we set HTTPS options for server. HTTP will be forbidden.
{
https: {
key: fs.readFileSync(
sslKeyFile,
'utf8'
),
cert: fs.readFileSync(
sslCertFile,
'utf8'
)
},
source: {
host: listenInterfacev4,
port: port
}}
);
console.log('HTTPS server starting and trying to listen on ' +
listenInterface + ':' + port);
listenInterfacev4 + ':' + port);
// Release the beast.
proxyServer.listen(port, listenInterface);
proxyServerv6.listen(port, listenInterfacev6);
proxyServerv4.listen(port, listenInterfacev4);
// Dummy HTTP server redirecting to HTTPS. Only has sense if we can use port 80
if (redirect === '1') {
console.log('HTTP redirect server starting and trying to listen on ' +
listenInterface + ':' + httpPort);
try {
var httpPort = 80;
http.createServer(function(req, res) {
var url;
if (isRawIPv6 === true) {
url = 'https://[' + listenInterface + ']';
} else {
url = 'https://' + listenInterface;
}
// If non standard port : need to specify it
if (port !== 443) {
url = url + ':' + port;
}
// Add last part of URL
url = url + req.url;
console.log(url);
// Anwser "permanently redirected"
res.statusCode = 301;
res.setHeader('Location', url);
res.end();
}).listen(httpPort, listenInterface);
} catch (error) {
console.log('Couldn\'t start plain HTTP redirection server : ' + error)
}
/*
*try {
* var httpPort = 80;
* http.createServer(function(req, res) {
* var url;
* if (isRawIPv6 === true) {
* url = 'https://[' + listenInterface + ']';
* } else {
* url = 'https://' + listenInterface;
* }
* // If non standard port : need to specify it
* if (port !== 443) {
* url = url + ':' + port;
* }
* // Add last part of URL
* url = url + req.url;
* console.log(url);
* // Anwser "permanently redirected"
* res.statusCode = 301;
* res.setHeader('Location', url);
* res.end();
* }).listen(httpPort, listenInterface);
* } catch (error) {
* console.log('Couldn\'t start plain HTTP redirection server : ' + error)
* }
*/
}
......@@ -2,4 +2,4 @@
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
export NODE_PATH=%(node_env)s
exec %(node_path)s %(conf_path)s %(ip)s %(port)s %(key)s %(certificate)s %(map_path)s %(plain_http)s
exec %(node_path)s %(conf_path)s %(ipv6)s %(ipv4)s %(port)s %(key)s %(certificate)s %(map_path)s %(plain_http)s
##############################################################################
#
# Copyright (c) 2013 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import shutil
import os
import zc.buildout
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
# XXX-Cedric: write docstring
def install(self):
path_list = []
# Download and unpack application if not already existing
htdocs_location = self.options['htdocs']
if not (os.path.exists(htdocs_location) and os.listdir(htdocs_location)):
try:
os.rmdir(htdocs_location)
except:
pass
self.download(htdocs_location)
# Install php.ini
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
'php.ini'),
self.substituteTemplate(self.getTemplateFilename('php.ini.in'),
dict(tmp_directory=self.options['tmp-dir']))
)
path_list.append(php_ini)
# Install apache
apache_config = dict(
pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'],
ip=self.options['ip'],
port=self.options['port'],
error_log=self.options['error-log'],
access_log=self.options['access-log'],
document_root=self.options['htdocs'],
php_ini_dir=self.options['php-ini-dir'],
)
httpd_conf = self.createFile(self.options['httpd-conf'],
self.substituteTemplate(self.getTemplateFilename('apache.in'),
apache_config)
)
path_list.append(httpd_conf)
wrapper = self.createWrapper(name=self.options['wrapper'],
command=self.options['httpd-binary'],
parameters=[
'-f',
self.options['httpd-conf'],
'-DFOREGROUND'
])
path_list.append(wrapper)
return path_list
# Apache static configuration
# Automatically generated
# Basic server configuration
PidFile "%(pid_file)s"
Listen %(ip)s:%(port)s
PHPINIDir %(php_ini_dir)s
ServerAdmin someone@email
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml .php5 .php4
AddType application/x-httpd-php-source .phps
# Log configuration
ErrorLog "%(error_log)s"
LogLevel warn
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory %(document_root)s>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot %(document_root)s
DirectoryIndex index.html index.php
# List of modules
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
LoadModule alias_module modules/mod_alias.so
[PHP]
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
session.save_path = "%(tmp_directory)s"
session.auto_start = 0
date.timezone = Europe/Paris
file_uploads = On
upload_max_filesize = 8M
post_max_size = 8M
magic_quotes_gpc=Off
......@@ -35,12 +35,28 @@ import netaddr
import time
import re
import urlparse
import json
# Use to do from slapos.recipe.librecipe import GenericBaseRecipe
from generic import GenericBaseRecipe
from genericslap import GenericSlapRecipe
from filehash import filehash
# Utility functions to (de)serialise live python objects in order to send them
# to master.
JSON_SERIALISED_MAGIC_KEY = '_'
def wrap(value):
return {JSON_SERIALISED_MAGIC_KEY: json.dumps(value)}
def unwrap(value):
try:
value = value[JSON_SERIALISED_MAGIC_KEY]
except (KeyError, TypeError):
pass
else:
value = json.loads(value)
return value
class BaseSlapRecipe:
"""Base class for all slap.recipe.*"""
......
......@@ -32,6 +32,7 @@ import os
import sys
import inspect
import re
import shutil
import urllib
import urlparse
......@@ -231,3 +232,30 @@ class GenericBaseRecipe(object):
url = urlparse.urlunparse((scheme, netloc, path, params, query, fragment))
return url
def setLocationOption(self):
if not self.options.get('location'):
self.options['location'] = os.path.join(
self.buildout['buildout']['parts-directory'], self.name)
def download(self, destination=None):
""" A simple wrapper around h.r.download, downloading to self.location"""
self.setLocationOption()
import hexagonit.recipe.download
if not destination:
destination = self.location
if os.path.exists(destination):
# leftovers from a previous failed attempt, removing it.
log.warning('Removing already existing directory %s' % destination)
shutil.rmtree(destination)
os.mkdir(destination)
try:
options = self.options.copy()
options['destination'] = destination
hexagonit.recipe.download.Recipe(
self.buildout, self.name, options).install()
except:
shutil.rmtree(destination)
raise
......@@ -34,9 +34,6 @@ from slapos.recipe.librecipe import filehash
class Recipe(GenericBaseRecipe):
def _options(self, options):
options['password'] = self.generatePassword()
def install(self):
path_list = []
......
from slapos.recipe.librecipe import GenericBaseRecipe
class NeoBaseRecipe(GenericBaseRecipe):
_binding_port_mandatory = True
def install(self):
options = self.options
if not options['masters']:
# All parameters are always provided.
# This parameter needs special care, because it is initially generated
# empty, until all requested master nodes get their partitions
# allocated.
# Only then can this recipe start succeeding and actually doing anything
# useful, as per NEO deploying constraints.
raise Exception('"masters" parameter is mandatory')
option_list = [
options['binary'],
'-l', options['logfile'],
'-m', options['masters'],
'-b', self._getBindingAddress(),
# TODO: reuse partition reference for better log readability.
#'-n', options['name'],
'-c', options['cluster'],
]
if options['verbose']:
option_list.append('-v')
option_list.extend(self._getOptionList())
return [self.createPythonScript(
options['wrapper'],
'slapos.recipe.librecipe.execute.execute',
option_list
)]
def _getBindingAddress(self):
options = self.options
bind = options['ip']
if 'port' in options:
# Some node types support port auto-allocation when no binding port is
# requested.
bind = bind + ':' + options['port']
elif self._binding_port_mandatory:
raise ValueError('"port" option is mandatory.')
return bind
def _getOptionList(self):
raise NotImplementedError
class Storage(NeoBaseRecipe):
_binding_port_mandatory = False
def _getOptionList(self):
return [
'-d', self.options['database-parameters'],
'-a', self.options['database-adapter'],
'-w', self.options['wait-database'],
]
class Admin(NeoBaseRecipe):
def _getOptionList(self):
return []
class Master(NeoBaseRecipe):
def _getOptionList(self):
options = self.options
return [
'-p', options['partitions'],
'-r', options['replicas'],
]
......@@ -25,8 +25,7 @@
#
##############################################################################
from hashlib import sha512
import inspect
import hashlib
import json
import os
import signal
......@@ -43,33 +42,14 @@ from slapos import slap as slapmodule
def promise(args):
def failed_ssh(partition, ssh):
def failed_ssh():
sys.stderr.write("SSH Connection failed\n")
try:
ssh.terminate()
except:
pass
partition = slap.registerComputerPartition(args['computer_id'],
args['partition_id'])
partition.bang("SSH Connection failed. rdiff-backup is unusable.")
def sigterm_handler(signum, frame):
# Walk up in the stack to get promise local
# variables
ssh = None
for upper_frame in inspect.getouterframes(frame):
# Use promise.func_name insteand of 'promise' in order to be
# detected by editor if promise func name change.
# Else, it's hard to debug this kind of error.
if upper_frame[3] == promise.func_name:
try:
partition = upper_frame[0].f_locals['partition']
ssh = upper_frame[0].f_locals['ssh']
except KeyError:
raise SystemExit("SIGTERM Send too soon.")
break
# If ever promise function wasn't found in the stack.
if ssh is None:
raise SystemExit
failed_ssh(partition, ssh)
failed_ssh()
signal.signal(signal.SIGTERM, sigterm_handler)
......@@ -78,9 +58,6 @@ def promise(args):
key_file=args.get('key_file'),
cert_file=args.get('cert_file'))
partition = slap.registerComputerPartition(args['computer_id'],
args['partition_id'])
ssh = subprocess.Popen([args['ssh_client'], '%(user)s@%(host)s/%(port)s' % args],
stdin=subprocess.PIPE,
stdout=open(os.devnull, 'w'),
......@@ -97,7 +74,7 @@ def promise(args):
if ssh.poll() is None:
return 1
if ssh.returncode != 0:
failed_ssh(partition, ssh)
failed_ssh()
return ssh.returncode
......@@ -108,12 +85,12 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
path_list = []
url = entry.get('url')
if url is None:
url = ''
if not url:
raise ValueError('Missing URL parameter for PBS recipe')
# We assume that thanks to sha512 there's no collisions
url_hash = sha512(url).hexdigest()
name_hash = sha512(entry['name']).hexdigest()
url_hash = hashlib.sha512(url).hexdigest()
name_hash = hashlib.sha512(entry['name']).hexdigest()
promise_path = os.path.join(self.options['promises-directory'],
url_hash)
......
......@@ -154,7 +154,7 @@ class Recipe(GenericBaseRecipe):
'# TYPE DATABASE USER ADDRESS METHOD',
'',
'# "local" is for Unix domain socket connections only (check unix_socket_permissions!)',
'local all all ident',
'local all all trust',
'host all all 127.0.0.1/32 md5',
'host all all ::1/128 md5',
]
......
......@@ -63,6 +63,7 @@ class ExportRecipe(GenericBaseRecipe):
umask 077
%(bin)s/pg_dump \\
--host=%(pgdata-directory)s \\
--username postgres \\
--format=custom \\
--file=%(backup-directory)s/database.dump \\
%(dbname)s
......@@ -102,6 +103,7 @@ class ImportRecipe(GenericBaseRecipe):
#!/bin/sh
%(bin)s/pg_restore \\
--host=%(pgdata-directory)s \\
--username postgres \\
--dbname=%(dbname)s \\
--clean \\
--no-owner \\
......
......@@ -25,9 +25,11 @@
#
##############################################################################
import zc.buildout
from slapos.recipe.librecipe import wrap
from slapos.recipe.librecipe import GenericSlapRecipe
CONNECTION_PARAMETER_STRING = 'connection-'
class Recipe(GenericSlapRecipe):
def _install(self):
publish_dict = dict()
......@@ -36,5 +38,37 @@ class Recipe(GenericSlapRecipe):
for k, v in options.iteritems():
publish_dict[k] = v
self._setConnectionDict(publish_dict)
return []
def _setConnectionDict(self, publish_dict):
return self.setConnectionDict(publish_dict)
SERIALISED_MAGIC_KEY = '_'
class Serialised(Recipe):
def _setConnectionDict(self, publish_dict):
return super(Serialised, self)._setConnectionDict(wrap(publish_dict))
class PublishSection(GenericSlapRecipe):
"""
Take a list of "request" sections, and publish every connection parameter.
Input:
section-list: String, representing the list of sections to fetch
parameters to publish, in order, separated by a space.
"""
def _install(self):
publish_dict = dict()
for section in self.options['section-list'].strip().split():
section = section.strip()
options = self.buildout[section].copy()
for k, v in options.iteritems():
if k.startswith(CONNECTION_PARAMETER_STRING):
print k, v
publish_dict[k.lstrip(CONNECTION_PARAMETER_STRING)] = v
self.setConnectionDict(publish_dict)
return []
......@@ -25,6 +25,8 @@
#
##############################################################################
import logging
from slapos.recipe.librecipe import wrap, JSON_SERIALISED_MAGIC_KEY
import json
from slapos import slap as slapmodule
import slapos.recipe.librecipe.generic as librecipe
import traceback
......@@ -87,67 +89,77 @@ class Recipe(object):
def __init__(self, buildout, name, options):
self.logger = logging.getLogger(name)
slap = slapmodule.slap()
software_url = options['software-url']
name = options['name']
slap.initializeConnection(options['server-url'],
options.get('key-file'),
options.get('cert-file'),
)
request = slap.registerComputerPartition(
options['computer-id'], options['partition-id']).request
return_parameters = []
if 'return' in options:
return_parameters = [str(parameter).strip()
for parameter in options['return'].split()]
else:
return_parameters = options.get('return', '').split()
if not return_parameters:
self.logger.debug("No parameter to return to main instance."
"Be careful about that...")
software_type = options.get('software-type', DEFAULT_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]
isSlave = options.get('slave', '').lower() in \
librecipe.GenericBaseRecipe.TRUE_VALUES
filter_kw = dict(
(x, options['sla-' + x]) for x in options.get('sla', '').split()
if options['sla-' + x]
)
partition_parameter_kw = self._filterForStorage(dict(
(x, options['config-' + x])
for x in options.get('config', '').split()
))
slave = options.get('slave', 'false').lower() in \
librecipe.GenericBaseRecipe.TRUE_VALUES
slap = slapmodule.slap()
slap.initializeConnection(
options['server-url'],
options.get('key-file'),
options.get('cert-file'),
)
request = slap.registerComputerPartition(
options['computer-id'],
options['partition-id'],
).request
self._raise_request_exception = None
self._raise_request_exception_formatted = None
self.instance = None
# Try to do the request and fetch parameter dict...
try:
self.instance = request(software_url, software_type,
name, partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, shared=isSlave)
# XXX what is the right way to get a global id?
options['instance_guid'] = self.instance.getId()
filter_kw=filter_kw, shared=slave)
return_parameter_dict = self._getReturnParameterDict(self.instance,
return_parameters)
if not slave:
try:
options['instance-guid'] = self.instance.getInstanceGuid()
# XXX: deprecated, to be removed
options['instance_guid'] = self.instance.getInstanceGuid()
except (slapmodule.ResourceNotReady, AttributeError):
# Backward compatibility. Old SlapOS master and core don't know this.
self.logger.warning("Impossible to fetch instance GUID.")
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady) as exc:
self._raise_request_exception = exc
self._raise_request_exception_formatted = traceback.format_exc()
return_parameter_dict = {}
# Then try to get all the parameters. In case of problem, put empty string.
for param in return_parameters:
options['connection-%s' % param] = ''
if not self.instance:
continue
try:
options['connection-%s' % param] = str(
self.instance.getConnectionParameter(param))
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady):
options['connection-%s' % param] = return_parameter_dict[param]
except KeyError:
if self.failed is None:
self.failed = param
def _filterForStorage(self, partition_parameter_kw):
return partition_parameter_kw
def _getReturnParameterDict(self, instance, return_parameter_list):
result = {}
for param in return_parameter_list:
try:
result[param] = str(instance.getConnectionParameter(param))
except slapmodule.NotFoundError:
pass
return result
def install(self):
if self._raise_request_exception:
raise self._raise_request_exception
......@@ -172,6 +184,7 @@ class Recipe(object):
update = install
class RequestOptional(Recipe):
"""
Request a SlapOS instance. Won't fail if request failed or is not ready.
......@@ -182,7 +195,7 @@ class RequestOptional(Recipe):
self.logger.warning('Optional request failed.')
if not isinstance(self._raise_request_exception, slapmodule.NotFoundError):
# full traceback for optional 'not found' is too verbose and confusing
self.logger.warning(self._raise_request_exception_formatted)
self.logger.debug(self._raise_request_exception_formatted)
elif self.failed is not None:
# Check instance status to know if instance has been deployed
try:
......@@ -190,7 +203,7 @@ class RequestOptional(Recipe):
status = self.instance.getState()
else:
status = 'not ready yet'
except (slapmodule.NotFoundError, slapmodule.ServerError):
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady):
status = 'not ready yet'
except AttributeError:
status = 'unknown'
......@@ -201,3 +214,49 @@ class RequestOptional(Recipe):
return []
update = install
class Serialised(Recipe):
def _filterForStorage(self, partition_parameter_kw):
return wrap(partition_parameter_kw)
def _getReturnParameterDict(self, instance, return_parameter_list):
try:
return json.loads(instance.getConnectionParameter(JSON_SERIALISED_MAGIC_KEY))
except slapmodule.NotFoundError:
return {}
CONNECTION_PARAMETER_STRING = 'connection-'
class RequestEdge(Recipe):
"""
For each country in country-list, do a request.
"""
def __init__(self, buildout, name, options):
self.logger = logging.getLogger(name)
self.options = options
self.request_dict = {}
# Keep a copy of original options dict
original_options = options.copy()
for country in options['country-list'].split(','):
# Request will have its own copy of options dict
local_options = original_options.copy()
local_options['name'] = '%s-%s' % (country, name)
local_options['sla'] = "region"
local_options['sla-region'] = country
self.request_dict[country] = Recipe(buildout, name, local_options)
# "Bubble" all connection parameters
for option, value in local_options.iteritems():
if option.startswith(CONNECTION_PARAMETER_STRING):
self.options['%s-%s' % (option, country)] = value
def install(self):
for country, request in self.request_dict.iteritems():
request.install()
return []
update = install
##############################################################################
#
# 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 operator
from slapos.recipe.librecipe import GenericSlapRecipe
import zc.buildout
class Recipe(GenericSlapRecipe):
def _install(self):
path_list = []
# Check for mandatory arguments
domain_name = self.options['domain']
if not domain_name:
raise zc.buildout.UserError('No domain name specified. Please define '
'the "domain" instance parameter.')
# XXX: add HTTP support
#https_port_number = self.options['https-port']
#http_port_number = self.options['http-port']
# Parse list of slaves
slave_instance_list = sorted(self.options['slave-instance-list'],
key=operator.itemgetter('slave_reference'))
# Now, we only take first instance and only use this one.
# XXX: TODO real implementation of slaves
zimbra_slave_instance = slave_instance_list[0]
# Generate Nginx configuration
nginx_configuration_dict = {
'listen-local-ipv4': self.options['ipv4'],
'listen-global-ipv6': '[%s]' % self.options['ipv6'],
'domain-name': domain_name,
'smtp-port-number': self.options['smtp-port'],
'error-log': self.options['error-log'],
'access-log': self.options['access-log'],
'htdocs': self.options['htdocs'],
'smtp-upstream-host': zimbra_slave_instance['smtp-upstream-host'],
'smtp-upstream-port': zimbra_slave_instance['smtp-upstream-port'],
}
nginx_configuration_file = self.createFile(
self.options['configuration-file'],
self.substituteTemplate(self.getTemplateFilename('nginx.conf.in'),
nginx_configuration_dict)
)
path_list.append(nginx_configuration_file)
# Generate Nginx wrapper
wrapper = self.createWrapper(
name=self.options['wrapper'],
command=self.options['nginx-executable'],
parameters=[
'-c', self.options['configuration-file'],
'-p', self.options['home-directory']
]
)
# TODO: reload configuration or have feature like apache_map
# Send connection informations about each slave
for slave_instance in slave_instance_list:
reference = slave_instance.get("slave_reference")
self.logger.debug('Sending connection parameters of slave '
'instance: %s' % reference)
try:
connection_dict = {
'listening-ipv6': self.options['ipv6'],
# Arbitrary, as the instance doesn't know its public IP.
'listening-ipv4': self.options['public-ipv4'],
# XXX-TODO
#'site_url': url,
}
self.setConnectionDict(connection_dict, reference)
except:
self.logger.fatal("Error while sending slave %s informations: %s",
reference, traceback.format_exc())
return path_list
daemon off;
worker_processes 1;
#XXX-Cedric: TODO separate the different logs
error_log %(error-log)s info;
events {
worker_connections 1024;
use epoll;
}
http {
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
server {
listen %(listen-local-ipv4)s:8008;
server_name localhost;
access_log %(access-log)s main;
error_log %(error-log)s info;
root %(htdocs)s;
location ~ $ {
add_header Auth-Server %(smtp-upstream-host)s;
add_header Auth-Port %(smtp-upstream-port)s;
return 200;
}
}
}
mail {
server_name %(domain-name)s;
auth_http %(listen-local-ipv4)s:8008;
server {
listen %(listen-local-ipv4)s:%(smtp-port-number)s;
listen %(listen-global-ipv6)s:%(smtp-port-number)s;
protocol smtp;
timeout 5s;
proxy on;
xclient off;
smtp_auth none;
}
}
......@@ -25,6 +25,7 @@
#
##############################################################################
import slapos.slap
from slapos.recipe.librecipe import unwrap
from ConfigParser import RawConfigParser
from netaddr import valid_ipv4, valid_ipv6
......@@ -95,9 +96,21 @@ class Recipe(object):
options['partition'],
).getInstanceParameterDict()
# XXX: those are not partition parameters, strictly speaking.
# Discard them, and make them available as separate section keys.
options['slap-software-type'] = parameter_dict.pop(
'slap_software_type')
# Make them available as individual section keys.
for his_key in (
'slap_software_type',
'slap_computer_partition_id',
'slap_computer_id',
'slap_software_release_url',
'slave_instance_list',
'timestamp',
):
try:
value = parameter_dict.pop(his_key)
except KeyError:
pass
else:
options[his_key.replace('_', '-')] = value
ipv4_set = set()
v4_add = ipv4_set.add
ipv6_set = set()
......@@ -121,11 +134,23 @@ class Recipe(object):
options['ipv6-random'] = list(ipv6_set)[0]
options['tap'] = tap_set
options['configuration'] = parameter_dict
parameter_dict = self._expandParameterDict(options, parameter_dict)
match = self.OPTCRE_match
for key, value in parameter_dict.iteritems():
if match(key) is not None:
continue
options['configuration.' + key] = value
def _expandParameterDict(self, options, parameter_dict):
options['configuration'] = parameter_dict
return parameter_dict
install = update = lambda self: []
class Serialised(Recipe):
def _expandParameterDict(self, options, parameter_dict):
options['configuration'] = parameter_dict = unwrap(parameter_dict)
if isinstance(parameter_dict, dict):
return parameter_dict
else:
return {}
......@@ -38,7 +38,7 @@ class Recipe(GenericBaseRecipe):
self.software_directory = options['software-directory'].strip()
self.instance_directory = options['instance-directory'].strip()
self.partition_amount = options['partition-amount'].strip()
self.cloud9_url = options['cloud9-url'].strip()
self.cloud9_url = options.get('cloud9-url', '').strip()
self.log_file = os.path.join(options['log_dir'].strip(), 'slaprunner.log')
# Set slaprunner access URL
options['access-url'] = 'http://[%s]:%s' % (self.ipv6, self.runner_port)
......@@ -109,7 +109,7 @@ class Test(GenericBaseRecipe):
self.software_directory = options['software-directory'].strip()
self.instance_directory = options['instance-directory'].strip()
self.partition_amount = options['partition-amount'].strip()
self.cloud9_url = options['cloud9-url'].strip()
self.cloud9_url = options.get('cloud9-url', '').strip()
# Set slaprunner access URL
options['access-url'] = 'http://[%s]:%s' % (self.ipv6, self.runner_port)
......
......@@ -114,10 +114,14 @@ class Recipe:
if not buildout.has_section('slap-parameter'):
buildout.add_section('slap-parameter')
for parameter, value in self.parameter_dict.items():
if isinstance(value, str):
buildout.set('slap-parameter', parameter, value)
else:
buildout.set('slap-parameter', parameter, json.dumps(value))
# All parameters evaluating to False are... False, and shouldn't
# convey any information.
# Here, all those parameters are simply ignored.
if value:
if isinstance(value, str):
buildout.set('slap-parameter', parameter, value)
else:
buildout.set('slap-parameter', parameter, json.dumps(value))
buildout.add_section('slap-network-information')
buildout.set('slap-network-information', 'local-ipv4',
......
......@@ -43,6 +43,7 @@ class Recipe:
"""
path_list = []
target_directory = self.options['target-directory']
# XXX: breaks if any path contains spaces.
for linkline in self.options['link-binary'].split():
path, linkname = os.path.split(linkline)
......@@ -50,7 +51,7 @@ class Recipe:
if os.path.lexists(link):
if not os.path.islink(link):
raise zc.buildout.UserError(
'Target link already %r exists but it is not link' % link)
'Target %r already exists but is not a link' % link)
os.unlink(link)
os.symlink(linkline, link)
self.logger.debug('Created link %r -> %r' % (link, linkline))
......
......@@ -30,25 +30,34 @@ import shlex
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
command_line = shlex.split(self.options['command-line'])
wrapper_path = self.options['wrapper-path']
wait_files = self.options.get('wait-for-files')
environment = self.options.get('environment')
parameters_extra = self.options.get('parameters_extra')
if not wait_files and not environment:
# Create a simple wrapper as shell script
return [self.createWrapper(
name=wrapper_path,
command=command_line[0],
parameters=command_line[1:],
parameters_extra=parameters_extra,
)]
# More complex needs: create a Python script as wrapper
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 [
environment = dict((k.strip(), v.strip()) for k, v in [
line.split('=')
for line in environment.split('\n')
]}
])
return [self.createPythonScript(
self.options['output'],
wrapper_path,
'slapos.recipe.librecipe.execute.generic_exec',
(command_line, wait_files, environment,),
)]
......@@ -119,10 +119,13 @@ class Recipe(BaseSlapRecipe):
# self.cron_d is a directory, where cron jobs can be registered
self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
zabbix_agentd_conf = self.installZabbixAgentd(self.getGlobalIPv6Address(),
10050,
self.parameter_dict['hostname'],
self.parameter_dict['server'])
zabbix_agentd_conf = self.installZabbixAgentd(
self.getGlobalIPv6Address(),
10050,
self.parameter_dict['hostname'],
self.parameter_dict['server'],
self.parameter_dict.get('custom-user-parameter', '')
)
self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'],
name=zabbix_agentd_conf['hostname'],
port=str(zabbix_agentd_conf['port'])))
......
......@@ -56,17 +56,23 @@ class Recipe(GenericBaseRecipe):
'zeo-filestorage-snippet.conf.in')
# Prepare all filestorages
filestorage_snippet = ""
for storage_definition in self.options['storage'].splitlines():
storage_definition = storage_definition.strip()
if not storage_definition:
continue
for q in storage_definition.split():
if 'storage-name' in q:
storage_name = q.split('=')[1].strip()
if 'zodb-path' in q:
zodb_path = q.split('=')[1].strip()
filestorage_snippet += self.substituteTemplate(
snippet_filename, dict(storage_name=storage_name, path=zodb_path))
storage = self.options['storage']
if isinstance(storage, basestring):
for storage_definition in storage.splitlines():
storage_definition = storage_definition.strip()
if not storage_definition:
continue
for q in storage_definition.split():
if 'storage-name' in q:
storage_name = q.split('=')[1].strip()
if 'zodb-path' in q:
zodb_path = q.split('=')[1].strip()
filestorage_snippet += self.substituteTemplate(
snippet_filename, dict(storage_name=storage_name, path=zodb_path))
else:
for storage_name, path in storage:
filestorage_snippet += self.substituteTemplate(snippet_filename,
{'storage_name': storage_name, 'path': path})
config = dict(
zeo_ip=self.options['ip'],
......
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import sys
class Recipe(GenericBaseRecipe):
"""
kvm instance configuration.
"""
def install(self):
config = dict(
vnc_ip=self.options['vnc-ip'],
vnc_port=self.options['vnc-port'],
boot_disk_path=self.options['boot-disk-path'],
disk_path=self.options['data-disk-path'],
disk_size=self.options['data-disk-size'],
disk_type=self.options['data-disk-type'],
mac_address=self.options['mac-address'],
smp_count=self.options['smp-count'],
ram_size=self.options['ram-size'],
socket_path=self.options['socket-path'],
pid_file_path=self.options['pid-path'],
python_path=sys.executable,
shell_path=self.options['shell-path'],
qemu_path=self.options['qemu-path'],
qemu_img_path=self.options['qemu-img-path'],
vnc_passwd=self.options['passwd']
)
# Runners
runner_path = self.createExecutable(
self.options['runner-path'],
self.substituteTemplate(self.getTemplateFilename('kvm_run.in'), config))
controller_path = self.createExecutable(
self.options['controller-path'],
self.substituteTemplate(self.getTemplateFilename('kvm_controller_run.in'),
config))
return [runner_path, controller_path]
#!%(python_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
# Echo client program
import socket
import time
# Connect to KVM qmp socket
so = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
connected = False
while not connected:
try:
so.connect('%(socket_path)s')
except socket.error:
time.sleep(1)
else:
connected = True
data = so.recv(1024)
# Enable qmp
so.send('{ "execute": "qmp_capabilities" }')
data = so.recv(1024)
# Set VNC password
so.send('{ "execute": "change", ' \
'"arguments": { "device": "vnc", "target": "password", ' \
' "arg": "%(vnc_passwd)s" } }')
data = so.recv(1024)
# Finish
so.close()
#!%(python_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
# Echo client program
import os
import socket
import subprocess
def getSocketStatus(host, port):
s = None
for res in socket.getaddrinfo(host, port,
socket.AF_UNSPEC, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
try:
s = socket.socket(af, socktype, proto)
except socket.error, msg:
s = None
continue
try:
s.connect(sa)
except socket.error, msg:
s.close()
s = None
continue
break
return s
# create disk if doesn't exist
disk_path = '%(disk_path)s'
if not os.path.exists(disk_path):
subprocess.Popen(['%(qemu_img_path)s', 'create' ,'-f', 'qcow2',
disk_path, '%(disk_size)sG'])
# Generate NAT rules
nat_rules = ",".join("hostfwd=tcp:%(vnc_ip)s:%%s-:%%s" %% (port, port) for port in [25, 80, 110, 143, 443, 465, 587, 993, 995, 7071])
kvm_argument_list = ['%(qemu_path)s',
'-enable-kvm', '-net', 'nic,macaddr=%(mac_address)s',
'-net', 'user,hostfwd=tcp:%(vnc_ip)s:2222-:22,%%s' %% nat_rules,
'-smp', '%(smp_count)s',
'-m', '%(ram_size)s',
'-drive', 'file=%(disk_path)s,if=%(disk_type)s',
#'-drive', 'file=%(boot_disk_path)s,if=%(disk_type)s',
'-vnc', '%(vnc_ip)s:1,ipv4,password',
'-boot', 'menu=on',
'-qmp', 'unix:%(socket_path)s,server',
'-pidfile', '%(pid_file_path)s',
]
os.execv('%(qemu_path)s', kvm_argument_list)
......@@ -79,7 +79,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -6,8 +6,18 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
run = $${:etc}/run
agentlog = $${buildout:directory}/var/log/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
recipe = slapos.cookbook:agent
agent_binary = ${buildout:directory}/bin/agent
pidfile = $${directory:srv}/agent.pid
log = $${directory:agentlog}/agent.log
......@@ -21,11 +31,3 @@ default_max_install_duration = $${slap-parameter:default_max_install_duration}
default_max_uninstall_duration = $${slap-parameter:default_max_uninstall_duration}
default_max_request_duration = $${slap-parameter:default_max_request_duration}
default_max_destroy_duration = $${slap-parameter:default_max_destroy_duration}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
run = $${:etc}/run
agentlog = $${buildout:directory}/var/log/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
......@@ -12,52 +12,32 @@ parts =
template
template-agent
slapos.cookbook-repository
check-recipe
slapos.toolbox-repository
check-recipe-toolbox
instance-recipe-egg
check-recipe
slapos-cookbook
script
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = agent
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = agent
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.toolbox.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = agent3
git-executable = ${git:location}/bin/git
[check-recipe-toolbox]
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[instance-recipe]
# XXX-Cedric: it can use newest slapos.cfg to not have duplication
egg = slapos.cookbook
module = agent
[instance-recipe-egg]
# XXX-Cedric: it can use newest slapos.cfg to not have duplication
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${instance-recipe:egg}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link;
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[template]
recipe = slapos.recipe.template
......@@ -70,7 +50,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-agent.cfg
output = ${buildout:directory}/template-agent.cfg
md5sum = fd9670d8473be402b10990398b553b00
md5sum = 7c5c43eb98d5a11961d72fce97a8e67b
mode = 0644
[script]
......
......@@ -43,6 +43,25 @@ all slave instances.
Finally, the slave instance will be accessible from:
https://someidentifier.moulefrite.org.
How to have custom configuration in frontend server
===================================================
In your instance directory, you, as sysadmin, can directly edit two
configuration files that won't be overwritten by SlapOS to customize your
instance:
* $PARTITION_PATH/srv/srv/apache-conf.d/apache_frontend.custom.conf
* $PARTITION_PATH/srv/srv/apache-conf.d/apache_frontend.virtualhost.custom.conf
The first one is included in the end of the main apache configuration file.
The second one is included in the virtualhost of the main apache configuration file.
SlapOS will jsut create those two files for you, then completely forget them.
Note: make sure that the UNIX user of the instance has read access to those
files if you edit them.
Instance Parameters
===================
......@@ -64,6 +83,7 @@ port
Port used by Apache. Optional parameter, defaults to 4443.
plain_http_port
~~~~~~~~~~~~~~~
Port used by apache to serve plain http (only used to redirect to https).
Optional parameter, defaults to 8080.
......@@ -98,6 +118,13 @@ Domain name to use as frontend. The frontend will be accessible from this domain
[instancereference].[masterdomain].
Example: www.mycustomdomain.com
https-only
~~~~~~~~~~
Specify if website should be accessed using https only. If so, the frontend
will redirect the user to https if accessed from http.
Possible values: "true", "false".
This is an optional parameter. Defaults to false.
path
~~~~
Only used if type is "zope".
......@@ -173,7 +200,12 @@ Notes
=====
It is not possible with slapos to listen to port <= 1024, because process are
not run as root. It is a good idea then to go on the node where the instance is
not run as root.
Solution 1 (IPv4 only)
----------------------
It is a good idea then to go on the node where the instance is
and set some iptables rules like (if using default ports)::
iptables -t nat -A PREROUTING -p tcp -d {public_ipv4} --dport 443 -j DNAT --to-destination {listening_ipv4}:4443
......@@ -181,3 +213,12 @@ and set some iptables rules like (if using default ports)::
Where {public ip} is the public IP of your server, or at least the LAN IP to where your NAT will forward to.
{listening ip} is the private ipv4 (like 10.0.34.123) that the instance is using and sending as connection parameter.
Solution 2 (IPv6 only)
----------------------
It is also possible to directly allow the service to listen on 80 and 443 ports using the following command:
setcap 'cap_net_bind_service=+ep' /opt/slapgrid/$APACHE_FRONTEND_SOFTWARE_RELEASE_MD5/parts/apache-2.2/bin/httpd
Then specify in the instance parameters "port" and "plain_http_port" to be 443 and 80, respectively.
......@@ -3,6 +3,7 @@ extends =
../../component/binutils/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/apache/buildout.cfg
../../component/gzip/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/varnish/buildout.cfg
../../component/dcron/buildout.cfg
......@@ -38,14 +39,15 @@ recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[eggs]
recipe = zc.recipe.egg
recipe = z3c.recipe.scripts
eggs =
${lxml-python:egg}
slapos.toolbox
[template]
# Default template for apache instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = fea902a2b9dbf8c80ff201bcf73f9396
md5sum = e7b9f57da7eb1450fc15789e239388d4
output = ${buildout:directory}/template.cfg
mode = 0644
\ No newline at end of file
mode = 0644
[buildout]
parts =
directory
instance
apache
configtest
logrotate
logrotate-entry-apache
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -10,15 +12,23 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
# Create all needed directories
[directory]
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin/
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
var = $${buildout:directory}/var/
backup = $${:srv}/backup
log = $${:var}/log
run = $${:var}/run
service = $${:etc}/service
logrotate-backup = $${:backup}/logrotate
logrotate-entries = $${:etc}/logrotate.d
# Deploy Apache (old way, with monolithic recipe)
[instance]
[apache]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
httpd_home = ${apache-2.2:location}
httpd_binary = ${apache-2.2:location}/bin/httpd
......@@ -31,9 +41,40 @@ rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup
gcc_binary = gcc
binutils_directory = ${binutils:location}/bin/
access-log = $${directory:log}/frontend-apache-access.log
error-log = $${directory:log}/frontend-apache-error.log
pid-file = $${directory:run}/httpd.pid
# Create wrapper for "apachectl conftest" in bin
[configtest]
recipe = slapos.cookbook:wrapper
command-line = $${instance:httpd_binary} -f $${directory:etc}/apache_frontend.conf -t
output = $${directory:bin}/apache-configtest
command-line = $${apache:httpd_binary} -f $${directory:etc}/apache_frontend.conf -t
wrapper-path = $${directory:bin}/apache-configtest
# Deploy Logrotate
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${directory:bin}/logrotate
conf = $${directory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${directory:srv}/logrotate.status
[logrotate-entry-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${apache:error-log} $${apache:access-log}
frequency = daily
rotate-num = 30
post = ${buildout:bin-directory}/killpidfromfile $${apache:pid-file} SIGUSR1
sharedscripts = true
notifempty = true
create = true
......@@ -4,67 +4,101 @@ extends = common.cfg
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.12.3
async = 0.6.1
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.6
gitdb = 0.5.4
hexagonit.recipe.cmmi = 2.0
meld3 = 0.6.10
pycrypto = 2.6
rdiff-backup = 1.0.5
slapos.cookbook = 0.71.1
slapos.recipe.build = 0.11.5
slapos.recipe.build = 0.11.6
slapos.recipe.cmmi = 0.1
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.34.0
smmap = 0.8.2
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.33.1
# slapos.core==0.35.1
# slapos.toolbox==0.34.0
Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# slapos.toolbox==0.34.0
GitPython = 0.3.2.RC1
# Required by:
# slapos.cookbook==0.71.1
# slapos.toolbox==0.34.0
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.34.0
feedparser = 5.1.3
# Required by:
# slapos.cookbook==0.77.1
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.71.1
# slapos.core==0.33.1
# slapos.cookbook==0.77.1
# slapos.core==0.35.1
# xml-marshaller==0.9.7
lxml = 3.0.2
lxml = 3.1.2
# Required by:
# slapos.cookbook==0.71.1
# slapos.cookbook==0.77.1
netaddr = 0.7.10
# Required by:
# slapos.core==0.33.1
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# slapos.cookbook==0.71.1
pytz = 2012j
# slapos.toolbox==0.34.0
paramiko = 1.10.1
# Required by:
# slapos.cookbook==0.71.1
# slapos.core==0.33.1
# slapos.toolbox==0.34.0
psutil = 0.7.0
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7
# Required by:
# slapos.cookbook==0.77.1
pytz = 2013b
# Required by:
# slapos.cookbook==0.77.1
# slapos.core==0.35.1
# slapos.toolbox==0.34.0
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.71.1
slapos.core = 0.33.1
# slapos.cookbook==0.77.1
# slapos.toolbox==0.34.0
slapos.core = 0.35.1
# Required by:
# slapos.core==0.33.1
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.cookbook==0.71.1
xml-marshaller = 0.9.7
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.core==0.33.1
zope.interface = 4.0.3
# slapos.cookbook==0.77.1
# slapos.toolbox==0.34.0
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
[networkcache]
# signature certificates of the following uploaders.
......
......@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -76,7 +76,6 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdfinfo
{{ parameter_dict['poppler'] }}/bin/pdftotext
{{ parameter_dict['poppler'] }}/bin/pdftohtml
{{ parameter_dict['pdftk'] }}/bin/pdftk
# rest of parts are candidates for some generic stuff
[basedirectory]
......
......@@ -34,7 +34,6 @@ fonts = {{ fonts_location }}
coreutils = {{ coreutils_location }}
imagemagick = {{ imagemagick_location }}
poppler = {{ poppler_location }}
pdftk = {{ pdftk_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-cloudooo]
......
[buildout]
extends =
../../stack/shacache-client.cfg
../../stack/slapos.cfg
../../stack/cloudooo.cfg
versions = versions
......@@ -69,7 +69,7 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = ea305baf481766227752e08d287c0bf8
md5sum = 694205787e78c5d615d72d7b4b26d174
extra-context =
key buildout_bin_directory buildout:bin-directory
key dcron_location dcron:location
......@@ -90,7 +90,6 @@ extra-context =
key libreoffice_bin_location libreoffice-bin:location
key libxcb_location libxcb:location
key openssl_location openssl:location
key pdftk_location pdftk:location
key poppler_location poppler:location
key template_cloudooo template-cloudooo:target
key zlib_location zlib:location
......@@ -99,7 +98,7 @@ extra-context =
[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = fd5964a038613ea3e0b54f87564fe248
md5sum = 4c8608f9525be0f01a09d60b240315a9
mode = 640
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -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.1
hexagonit.recipe.download = 1.6nxd002
meld3 = 0.6.7
slapos.cookbook = 0.26
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
\ No newline at end of file
<?php
/*
* This is an example configuration for the mysql auth module.
*
* This SQL statements are optimized for following table structure.
* If you use a different one you have to change them accordingly.
* See comments of every statement for details.
*
* TABLE users
* uid login pass firstname lastname email
*
* TABLE groups
* gid name
*
* TABLE usergroup
* uid gid
*
* To use this configuration you have to copy them to local.protected.php
* or at least include this file in local.protected.php.
*/
/* Options to configure database access. You need to set up this
* options carefully, otherwise you won't be able to access you
* database.
*/
$conf['auth']['mysql']['server'] = '%(mysql_ip)s';
$conf['auth']['mysql']['user'] = '%(mysql_user)s';
$conf['auth']['mysql']['password'] = '%(mysql_password)s';
$conf['auth']['mysql']['database'] = '%(mysql_database)s';
/* This option enables debug messages in the mysql module. It is
* mostly usefull for system admins.
*/
$conf['auth']['mysql']['debug'] = 0;
/* Normally password encryption is done by DokuWiki (recommended) but for
* some reasons it might be usefull to let the database do the encryption.
* Set 'forwardClearPass' to '1' and the cleartext password is forwarded to
* the database, otherwise the encrypted one.
*/
$conf['auth']['mysql']['forwardClearPass'] = 0;
/* Multiple table operations will be protected by locks. This array tolds
* the module which tables to lock. If you use any aliases for table names
* these array must also contain these aliases. Any unamed alias will cause
* a warning during operation. See the example below.
*/
$conf['auth']['mysql']['TablesToLock']= array("users", "users AS u","groups", "groups AS g", "usergroup", "usergroup AS ug");
/***********************************************************************/
/* Basic SQL statements for user authentication (required) */
/***********************************************************************/
/* This statement is used to grant or deny access to the wiki. The result
* should be a table with exact one line containing at least the password
* of the user. If the result table is empty or contains more than one
* row, access will be denied.
*
* The module access the password as 'pass' so a alias might be necessary.
*
* Following patters will be replaced:
* %%{user} user name
* %%{pass} encrypted or clear text password (depends on 'encryptPass')
* %%{dgroup} default group name
*/
$conf['auth']['mysql']['checkPass'] = "SELECT pass
FROM usergroup AS ug
JOIN users AS u ON u.uid=ug.uid
JOIN groups AS g ON g.gid=ug.gid
WHERE login='%%{user}'
AND name='%%{dgroup}'";
/* This statement should return a table with exact one row containing
* information about one user. The field needed are:
* 'pass' containing the encrypted or clear text password
* 'name' the user's full name
* 'mail' the user's email address
*
* Keep in mind that Dokuwiki will access thise information through the
* names listed above so aliasses might be neseccary.
*
* Following patters will be replaced:
* %%{user} user name
*/
$conf['auth']['mysql']['getUserInfo'] = "SELECT pass, CONCAT(firstname,' ',lastname) AS name, email AS mail
FROM users
WHERE login='%%{user}'";
/* This statement is used to get all groups a user is member of. The
* result should be a table containing all groups the given user is
* member of. The module access the group name as 'group' so a alias
* might be nessecary.
*
* Following patters will be replaced:
* %%{user} user name
*/
$conf['auth']['mysql']['getGroups'] = "SELECT name as `group`
FROM groups g, users u, usergroup ug
WHERE u.uid = ug.uid
AND g.gid = ug.gid
AND u.login='%%{user}'";
/***********************************************************************/
/* Additional minimum SQL statements to use the user manager */
/***********************************************************************/
/* This statement should return a table containing all user login names
* that meet certain filter criteria. The filter expressions will be added
* case dependend by the module. At the end a sort expression will be added.
* Important is that this list contains no double entries fo a user. Each
* user name is only allowed once in the table.
*
* The login name will be accessed as 'user' to a alias might be neseccary.
* No patterns will be replaced in this statement but following patters
* will be replaced in the filter expressions:
* %%{user} in FilterLogin user's login name
* %%{name} in FilterName user's full name
* %%{email} in FilterEmail user's email address
* %%{group} in FilterGroup group name
*/
$conf['auth']['mysql']['getUsers'] = "SELECT DISTINCT login AS user
FROM users AS u
LEFT JOIN usergroup AS ug ON u.uid=ug.uid
LEFT JOIN groups AS g ON ug.gid=g.gid";
$conf['auth']['mysql']['FilterLogin'] = "login LIKE '%%{user}'";
$conf['auth']['mysql']['FilterName'] = "CONCAT(firstname,' ',lastname) LIKE '%%{name}'";
$conf['auth']['mysql']['FilterEmail'] = "email LIKE '%%{email}'";
$conf['auth']['mysql']['FilterGroup'] = "name LIKE '%%{group}'";
$conf['auth']['mysql']['SortOrder'] = "ORDER BY login";
/***********************************************************************/
/* Additional SQL statements to add new users with the user manager */
/***********************************************************************/
/* This statement should add a user to the database. Minimum information
* to store are: login name, password, email address and full name.
*
* Following patterns will be replaced:
* %%{user} user's login name
* %%{pass} password (encrypted or clear text, depends on 'encryptPass')
* %%{email} email address
* %%{name} user's full name
*/
$conf['auth']['mysql']['addUser'] = "INSERT INTO users
(login, pass, email, firstname, lastname)
VALUES ('%%{user}', '%%{pass}', '%%{email}',
SUBSTRING_INDEX('%%{name}',' ', 1),
SUBSTRING_INDEX('%%{name}',' ', -1))";
/* This statement should add a group to the database.
* Following patterns will be replaced:
* %%{group} group name
*/
$conf['auth']['mysql']['addGroup'] = "INSERT INTO groups (name)
VALUES ('%%{group}')";
/* This statement should connect a user to a group (a user become member
* of that group).
* Following patterns will be replaced:
* %%{user} user's login name
* %%{uid} id of a user dataset
* %%{group} group name
* %%{gid} id of a group dataset
*/
$conf['auth']['mysql']['addUserGroup']= "INSERT INTO usergroup (uid, gid)
VALUES ('%%{uid}', '%%{gid}')";
/* This statement should remove a group fom the database.
* Following patterns will be replaced:
* %%{group} group name
* %%{gid} id of a group dataset
*/
$conf['auth']['mysql']['delGroup'] = "DELETE FROM groups
WHERE gid='%%{gid}'";
/* This statement should return the database index of a given user name.
* The module will access the index with the name 'id' so a alias might be
* necessary.
* following patters will be replaced:
* %%{user} user name
*/
$conf['auth']['mysql']['getUserID'] = "SELECT uid AS id
FROM users
WHERE login='%%{user}'";
/***********************************************************************/
/* Additional SQL statements to delete users with the user manager */
/***********************************************************************/
/* This statement should remove a user fom the database.
* Following patterns will be replaced:
* %%{user} user's login name
* %%{uid} id of a user dataset
*/
$conf['auth']['mysql']['delUser'] = "DELETE FROM users
WHERE uid='%%{uid}'";
/* This statement should remove all connections from a user to any group
* (a user quits membership of all groups).
* Following patterns will be replaced:
* %%{uid} id of a user dataset
*/
$conf['auth']['mysql']['delUserRefs'] = "DELETE FROM usergroup
WHERE uid='%%{uid}'";
/***********************************************************************/
/* Additional SQL statements to modify users with the user manager */
/***********************************************************************/
/* This statements should modify a user entry in the database. The
* statements UpdateLogin, UpdatePass, UpdateEmail and UpdateName will be
* added to updateUser on demand. Only changed parameters will be used.
*
* Following patterns will be replaced:
* %%{user} user's login name
* %%{pass} password (encrypted or clear text, depends on 'encryptPass')
* %%{email} email address
* %%{name} user's full name
* %%{uid} user id that should be updated
*/
$conf['auth']['mysql']['updateUser'] = "UPDATE users SET";
$conf['auth']['mysql']['UpdateLogin'] = "login='%%{user}'";
$conf['auth']['mysql']['UpdatePass'] = "pass='%%{pass}'";
$conf['auth']['mysql']['UpdateEmail'] = "email='%%{email}'";
$conf['auth']['mysql']['UpdateName'] = "firstname=SUBSTRING_INDEX('%%{name}',' ', 1),
lastname=SUBSTRING_INDEX('%%{name}',' ', -1)";
$conf['auth']['mysql']['UpdateTarget']= "WHERE uid=%%{uid}";
/* This statement should remove a single connection from a user to a
* group (a user quits membership of that group).
*
* Following patterns will be replaced:
* %%{user} user's login name
* %%{uid} id of a user dataset
* %%{group} group name
* %%{gid} id of a group dataset
*/
$conf['auth']['mysql']['delUserGroup']= "DELETE FROM usergroup
WHERE uid='%%{uid}'
AND gid='%%{gid}'";
/* This statement should return the database index of a given group name.
* The module will access the index with the name 'id' so a alias might
* be necessary.
*
* Following patters will be replaced:
* %%{group} group name
*/
$conf['auth']['mysql']['getGroupID'] = "SELECT gid AS id
FROM groups
WHERE name='%%{group}'";
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
../../stack/lamp/buildout.cfg
[application]
recipe = hexagonit.recipe.download
url = http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2011-05-25a.tgz
md5sum = 6452eff54afa35e031e15fec9a737dd1
url = http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2012-10-13.tgz
md5sum = a910ebb2fcca13c0337ed672304c4ad4
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/mysql.conf.php.in
md5sum = 11c6793aa8c5bf7151886d1670796a22
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[application-configuration]
location = conf/mysql.conf.php
\ No newline at end of file
......@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -40,7 +40,7 @@ environment = environment
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib
PYTHONPATH = ${python-setuptools:location}
LD_LIBRARY_PATH = ${libxslt:location}/lib
LD_LIBRARY_PATH = ${libxslt:location}/lib:${libxml2:location}/lib:${zlib:location}/lib
[sh-environment]
# Section exposes testing default environment as sh file. It is thus easy
......
......@@ -45,7 +45,7 @@ branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 0cdfaa1df03885bd6004755d285e69b5
md5sum = 6b919dd280d6972afe0f50d389ba5fe6
output = ${buildout:directory}/template.cfg
mode = 640
......@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.65
......
......@@ -232,7 +232,7 @@ PyXML = 0.8.5
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.38
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
?>
<h1 class="pageTitle"><span>Step <?php echo $current_step->getStepNumber() ?>:</span> System settings</h1>
<table class="formBlock">
<tr>
<th colspan="2">Database connection</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseType">Database type:</label></td>
<td>
<select name="config_form[database_type]" id="configFormDatabaseType">
<option value="mysql">MySQL</option>
<option value="pdo_mysql">PDO MySQL</option>
</select>
</td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseHost">Host name:</label></td>
<td><input type="text" name="config_form[database_host]" id="configFormDatabaseHost" value="%(mysql_ip)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseUser">Username:</label></td>
<td><input type="text" name="config_form[database_user]" id="configFormDatabaseUser" value="%(mysql_user)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePass">Password:</label></td>
<td><input type="password" name="config_form[database_pass]" id="configFormDatabasePass" value="%(mysql_password)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseName">Database name:</label></td>
<td><input type="text" name="config_form[database_name]" id="configFormDatabaseName" value="%(mysql_database)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePrefix">Table prefix:</label></td>
<td><input type="text" name="config_form[database_prefix]" id="configFormDatabasePrefix" value="<?php echo array_var($config_form_data, 'database_prefix', 'fo_') ?>" /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseEngine">Database engine:</label></td>
<td>
<select name="config_form[database_engine]" id="configFormDatabaseEngine">
<option value="InnoDB">InnoDB</option>
<option value="MyISAM">MyISAM</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<b>Note:</b> InnoDB engine is highly recommended. Use MyISAM only as a last resort, and at your own risk, if your database doesn't support InnoDB.<br /><br />
<b>Note:</b> If the database doesn't exist Feng Office will try to create it. However, if the database user you supply doesn't have permissions to create databases, you will have to manually create the database before you can continue.
</td>
</tr>
</table>
<table class="formBlock">
<tr>
<th colspan="2">Other settings</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormAbsoluteUrl">Absolute script URL:</label></td>
<td><input type="text" name="config_form[absolute_url]" id="configFormAbsoluteUrl" value="<?php echo array_var($config_form_data, 'absolute_url', $installation_url) ?>" /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormPlugins">Plugins to install:</label></td>
<td class="pluginOptions">
<?php include_once 'plugins.php' ;?>
</td>
</tr>
</table>
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
[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
url = http://freefr.dl.sourceforge.net/project/opengoo/fengoffice/fengoffice_2.0.0/fengoffice_2.0.0.zip
md5sum = 2f673962ac377da7942ba8a09429ddbf
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
url = http://freefr.dl.sourceforge.net/project/opengoo/fengoffice/fengoffice_2.2.3.1/fengoffice_2.2.3.1.zip
md5sum = f3b15616e1111f0114b084cdaa0dc3cd
strip-top-level-dir = false
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/config-form.php.in
md5sum = a32f1c8b14b8de2ecae40e71f710f384
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
\ No newline at end of file
[application-configuration]
location = public/install/installation/templates/system_config_form.php
\ No newline at end of file
#############################
#
# Deploy hello-world instance
#
#############################
[buildout]
parts =
directory
hello-world
publish-connection-parameter
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
# Always the same.
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance-parameter]
# Fetch arbitrary parameters defined by the user in SlapOS Master for his instance.
# We use the slapconfiguration recipe with a few parameters (partition id,
# computer id, certificate, etc).
# It will then authenticate to SlapOS Master and fetch the instance parameters.
# The parameters are accessible from $${instance-parameter:configuration.name-of-parameter}
# Always the same. Just copy/paste.
# See docstring of slapos.cookbook:slapconfiguration for more informations.
recipe = slapos.cookbook:slapconfiguration
computer = $${slap_connection:computer_id}
partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file}
# Define default parameter(s) that will be used later, in case user didn't
# specify it.
# All possible parameters should have a default.
# In our use case, we are expecting from the user to specify one (optional) parameter: "name". We put the default value here if he doesn't specify it, so that it doesn't crash.
configuration.name = John Doe
# If our use case requires that the user can specify a mail address so that his instance can mail to him (for example), we can do:
# configuration.mail-address =
# If the user doesn't specify it, it won't break and the recipe can handle it (i.e don't send any mail for example).
# Create all needed directories, depending on your needs
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
# Executables put here will be started but not monitored (for startup scripts)
script = $${:etc}/run/
# Executables put here will be started and monitored (for daemons)
service = $${:etc}/service
# Executables put here will be launched after buildout has completed to see
# if instance is running
promise = $${:etc}/promise/
# Create a simple shell script that will only output your name if you
# specified it as instance parameter.
# Usually, of course, we use more useful commands, like web servers.
[hello-world]
# This recipe will try to "exec" the command-line after separating parameters.
recipe = slapos.cookbook:wrapper
# Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile.
command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}!"; sleep 100000;'
# Put this shell script in the "etc/service" directory. Every executable of this
# repository will be started and monitored by supervisord
wrapper-path = $${directory:service}/hello-world
# Publish all the parameters needed for the user to connect to the instance.
# It can be anything: URL(s), password(s), or arbitrary parameters.
# Here we'll just echo back the entered name as instance parameter
[publish-connection-parameter]
recipe = slapos.cookbook:publish
name = Hello $${instance-parameter:configuration.name}!
[buildout]
extends =
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# Releases
../../stack/slapos.cfg
# Extend here component profiles, like openssl, apache, mariadb, curl...
# Or/and extend a stack (lamp, tomcat) that does most of the work for you
# In this example we only need the dash binary to run a simple "hello world"
# shell script.
../../component/dash/buildout.cfg
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# in 99,9% of Slapos Software Releases)
slapos-cookbook
# Call creation of instance.cfg file that will be called for deployment of
# instance
template
# Download instance.cfg.in (buildout profile used to deployment of instance),
# replace all ${foo:bar} parameters by real values, and change $${foo:bar} to
# ${foo:bar}
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = 1fc461c00e86485bee77a942f39e3c43
mode = 0644
[buildout]
extends =
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/nginx/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/slapos.cfg
parts =
slapos-cookbook
watermarkingadmin
eggs
instance-profile
develop =
${buildout:directory}/parts/watermarkingadmin
[watermarkingadmin]
recipe = hexagonit.recipe.download
url = http://easicloud-p.cdn.hexaglobe.net/api10.tar.gz
#md5sum =
[eggs]
recipe = zc.recipe.egg
eggs =
watermarkingadmin
slapos.toolbox
[watermarkadmin.ini.in]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/${:_buildout_section_name_}
md5sum = 2edc2acd102a465a0f21d8cd982ba4bf
download-only = true
#filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[nginx.conf.in]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/${:_buildout_section_name_}
md5sum = 7e41dfcb633ce52be42457ffd5b123d8
download-only = true
#filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
#md5sum = 650cd2527158734fd6ccd9ec374b5e69
mode = 0644
[watermarking-instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-watermarking.cfg.in
output = ${buildout:directory}/instance-watermarking.cfg
#md5sum = 76c88bfc59bc9c2d05fa13cc960349c7
mode = 0644
[edge-instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-edge.cfg.in
output = ${buildout:directory}/instance-edge.cfg
#md5sum = 650cd2527158734fd6ccd9ec374b5e69
mode = 0644
[buildout]
extends =
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
check-recipe
develop +=
${:parts-directory}/slapos.cookbook-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = hexaglobe-watermarking
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
# This instance will request other instances of lamp-generic depending on a
# list of countries.
[buildout]
parts =
request-edge
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[request-edge]
<= slap-connection
recipe = slapos.cookbook:request.edge
# This magic parameter triggers several requests, one request per country.
name = watermark
country-list = $${slap-parameter:country-list}
software-url = $${slap-connection:software-release-url}
software-type = default
return = url admin-url admin-url-ipv6
[publish-connection-parameter]
recipe = slapos.cookbook:publishsection
section-list = request-edge
[buildout]
parts =
directory
nginx
watermarkadmin
logrotate
logrotate-entry-nginx
cron
cron-entry-logrotate
watermarkadmin-promise
publish-connection-parameter
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# Fetch parameters defined in SlapOS Master for this instance
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
# Set default parameters
http-port = 8080
administration-port = 5000
# Create needed directories
[directory]
recipe = slapos.cookbook:mkdirectory
home = $${buildout:directory}
bin = $${:home}/bin
etc = $${:home}/etc
srv = $${:home}/srv
service = $${:etc}/service
promise = $${:etc}/promise
var = $${:home}/var
backup = $${:srv}/backup
log = $${:var}/log
run = $${:var}/run
nginx-configuration = $${:etc}/nginx
nginx-vhost-configuration = $${:nginx-configuration}/vhost
nginx-log = $${:home}/logs
nginx-cache = $${:var}/cache
nginx-temp-path = $${:srv}/nginx-proxy
cron-entries = $${:etc}/cron.d
crontabs = $${:etc}/crontabs
cronstamps = $${:etc}/cronstamps
logrotate-entries = $${:etc}/logrotate.d
logrotate-backup = $${:backup}/logrotate
# Deploy nginx
[nginx-configuration]
recipe = slapos.cookbook:configurationfile
configuration-template-path = ${nginx.conf.in:location}/nginx.conf.in
configuration-file-path = $${directory:nginx-configuration}/nginx.conf
vhost-configuration-directory-location = $${directory:nginx-vhost-configuration}
nginx-prefix = ${nginx-enable-sub:location}
nginx-temp-path = $${directory:nginx-temp-path}
pid-file = $${directory:run}/nginx.pid
home-directory = $${directory:home}
[nginx]
recipe = slapos.cookbook:wrapper
nginx-executable = $${:nginx-prefix}/sbin/nginx
nginx-prefix = ${nginx-enable-sub:location}
command-line = $${:nginx-executable} -c $${nginx-configuration:configuration-file-path} -p $${directory:home}
wrapper-path = $${directory:service}/nginx
# Deploy administration API server
[watermarkadmin-configuration]
recipe = slapos.cookbook:configurationfile
configuration-template-path = ${watermarkadmin.ini.in:location}/watermarkadmin.ini.in
configuration-file-path = $${directory:etc}/watermarkadmin.ini
flask-database-location = $${directory:srv}/flask.db
nginx-prefix = $${directory:home}
nginx-port = $${instance-parameter:http-port}
nginx-configuration-file-location = $${nginx-configuration:configuration-file-path}
nginx-executable-location = $${nginx:nginx-executable}
nginx-pidfile-location = $${nginx-configuration:pid-file}
nginx-vhost-configuration-directory-location = $${directory:nginx-vhost-configuration}
nginx-log-directory-location = $${directory:nginx-log}
nginx-cache-directory-location = $${directory:nginx-cache}
global-ip = $${instance-parameter:ipv6-random}
[watermarkadmin]
recipe = slapos.cookbook:wrapper
command-line =
${buildout:directory}/bin/api $${watermarkadmin-configuration:configuration-file-path}
wrapper-path = $${directory:service}/watermarkingadmin
# Deploy logrotate
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${directory:bin}/logrotate
conf = $${directory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${directory:srv}/logrotate.status
[logrotate-entry-nginx]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = nginx
log = $${watermarkadmin-configuration:nginx-log-directory-location}/*.log
frequency = daily
rotate-num = 30
post = ${buildout:bin-directory}/killpidfromfile $${nginx-configuration:pid-file} SIGUSR1
sharedscripts = true
notifempty = true
create = true
# Deploy cron and configure it
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${directory:bin}/cron_simplelogger
log = $${directory:log}/crond.log
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${directory:service}/crond
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
# Request frontend
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Frontend for $${slap-connection:computer-id} $${slap-connection:partition-id}
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url
config-url = http://[$${instance-parameter:ipv6-random}]:5000
return = site_url
# Check promises
[watermarkadmin-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/watermarkadmin-promise
hostname = $${instance-parameter:ipv6-random}
port = $${instance-parameter:administration-port}
[watermarkadmin-promise-frontend]
recipe = slapos.cookbook:check_page_content
path = $${directory:promises}/watermarkadmin-frontend-promise
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
match = If you entered the URL manually please check your spelling and try again.
# Publish instance connection parameters
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = http://[$${instance-parameter:ipv6-random}]:$${instance-parameter:http-port}
# XXX-Cedric: hardcoded
admin-url-ipv6 = http://[$${instance-parameter:ipv6-random}]:5000
admin-url = $${request-frontend:connection-site_url}
[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 = ${watermarking-instance-profile:output}
watermarking = ${watermarking-instance-profile:output}
edge = ${edge-instance-profile:output}
daemon off;
worker_processes 1;
pid %(pid-file)s;
events {
worker_connections 1024;
}
http {
log_format up_log '$remote_addr - $remote_user [$time_local] $request '
'upstream_response_time $upstream_response_time '
'msec $msec request_time $request_time'
'cache_status $upstream_cache_status';
log_format sysl '"$time_local", "$http_referer", "$host", "$request", '
'"$status", "$http_user_agent", "$remote_addr", '
'"$bytes_sent", "$request_time"';
proxy_temp_path %(nginx-temp-path)s;
include %(nginx-prefix)s/conf/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include %(vhost-configuration-directory-location)s/*.conf;
}
[nginx]
vhosts = %(nginx-vhost-configuration-directory-location)s
log = %(nginx-log-directory-location)s
data = %(nginx-cache-directory-location)s
max_size = 1024m
inactive = 120m
port = %(nginx-port)s
pidfile = %(nginx-pidfile-location)s
nginx_bin = %(nginx-executable-location)s
conf = %(nginx-configuration-file-location)s
prefix = %(nginx-prefix)s
[flask]
DATABASE = %(flask-database-location)s
MAX_CONTENT_LENGTH = 4096
[api]
user = admin
pass = 276eeed9056ac2486f9c0237bb0be227
ip = %(global-ip)s
......@@ -158,7 +158,7 @@ zope.interface = 4.0.1
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
[networkcache]
# signature certificates of the following uploaders.
......
#############################
#
# Deploy jio instance
#
#############################
[buildout]
parts =
test-runner
phantomjs-wrapper
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# Create all needed directories, depending on your needs
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
script = $${:etc}/run/
service = $${:etc}/service
promise = $${:etc}/promise/
bin = $${buildout:directory}/bin/
[download-source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
# Local development
[jio]
<= download-source
repository = ${jio-repository:location}
[test-runner]
recipe = slapos.cookbook:egg_test
run-test-suite = $${directory:bin}/runTestSuite
run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
test-list =
$${jio:location}
prepend-path = ${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin:${buildout:bin-directory}
environment = environment
[environment]
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib -L${fontconfig:location}/lib -L${libexpat:location}/lib -L${freetype:location}/lib
PYTHONPATH = ${python-setuptools:location}
LD_LIBRARY_PATH = ${libxslt:location}/lib:${libxml2:location}/lib:${zlib:location}/lib:${fontconfig:location}/lib:${libexpat:location}/lib:${freetype:location}/lib
[phantomjs-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${phantomjs:location}/bin/phantomjs
wrapper-path = $${directory:bin}/phantomjs
parameters_extra = true
\ No newline at end of file
[buildout]
extends =
../../stack/slapos.cfg
../../component/git/buildout.cfg
../../component/phantomjs/buildout.cfg
../../component/git/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/python-setuptools/buildout.cfg
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
slapos.cookbook-repository
slapos-cookbook
template
phantomjs
eggs
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
erp5.util
collective.recipe.template
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
scripts =
runTestSuite
# Local development until new egg is published (extra parameters to slapos.cookbook:wrapper
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/slapos.git
branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development, but must be filled for production
md5sum = 1ef1bc6a3fb81300ce7139c512af96d7
mode = 0644
[jio-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/jio.git
branch = master
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
collective.recipe.template = 1.10
erp5.util = 0.4.34
hexagonit.recipe.cmmi = 2.0
lxml = 3.1.1
meld3 = 0.6.10
plone.recipe.command = 1.1
psutil = 0.6.1
slapos.cookbook = 0.76.0
slapos.recipe.build = 0.11.6
slapos.recipe.template = 2.4.2
# Required by:
# slapos.core==0.35.1
Flask = 0.9
# Required by:
# slapos.cookbook==0.76.0
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.76.0
netaddr = 0.7.10
# Required by:
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# slapos.core==0.35.1
pyflakes = 0.6.1
# Required by:
# slapos.cookbook==0.76.0
pytz = 2013b
# Required by:
# collective.recipe.template==1.10
# erp5.util==0.4.33
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.76.0
# slapos.core==0.35.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.76.0
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.76.0
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
......@@ -89,7 +89,7 @@ signature-certificate-list =
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.71.1
......
......@@ -12,43 +12,25 @@ For extensive parameters definition, please look at parameter-input-schema.json.
Examples
--------
The following examples listhow to request different possible instances of KVM
The following examples list how to request different possible instances of KVM
Software Release from slap console or command line.
KVM instance (1GB of RAM, 10GB of SSD, one core)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that the KVM instance will request a frontend slave instance in order
Note that the KVM instance will try to request a frontend slave instance in order
to be accessible from IPv4.
KVM instance needs a NBD to fetch disk image at first boot. Working NBD IP/port
has to be specified.
::
myawesomekvm = request(
software_release=kvm,
partition_reference="myawesomekvm",
partition_reference="My awesome KVM",
partition_parameter_kw={
"ndb_ip":"2a01:e35:2e27:460:e2cb:4eff:fed9:48dc",
"ndb_port": 1024
"nbd-host":"ubuntu-1204.nbd.vifib.net",
}
)
KVM+ instance (2GB of RAM, 20GB of SSD, two cores)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
myevenmoreawesomekvm = request(
software_release=kvm,
partition_reference="myevenmoreawesomekvm",
partition_parameter_kw={
"ndb_ip":"2a01:e35:2e27:460:e2cb:4eff:fed9:48dc",
"ndb_port": 1024
},
software_type="kvm+",
)
See the instance-kvm-input-schema.json file for more instance parameters (cpu-count, ram-size, disk-size, etc).
NBD instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
[buildout]
extends =
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/qemu-kvm/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/noVNC/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/nodejs.cfg
../../stack/slapos.cfg
parts =
template
eggs
#XXX-Cedric : Currently, one can only access to KVM using noVNC.
# Ideally one should be able to access KVM by using either NoVNC or VNC.
# Problem is : no native crypto support in web browsers. So we have to disable ssl
# In qemu builtin vnc server, and make it available only for localhost
# so that only novnc can listen to it.
#XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see
# When qemu has builtin support for websockets in vnc server to get rid of
# Websockify (socket <-> websocket proxy server) when it is ready.
# May solve previous XXX depending on the implementation.
#XXX-Cedric : add list of keyboard layouts (azerty/us querty/...) parameter to qemu
[eggs]
recipe = z3c.recipe.scripts
eggs =
${lxml-python:egg}
websockify
slapos.cookbook
slapos.toolbox
[http-proxy]
# https://github.com/nodejitsu/node-http-proxy
recipe = slapos.recipe.build:download-unpacked
#XXX-Cedric : use upstream when merged
url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/20120621
md5sum = 20204d0b29c2cef26e1c91e99eedca6b
[proxy-by-url]
# https://github.com/dominictarr/proxy-by-url
recipe = slapos.recipe.build:download-unpacked
#XXX-Cedric : use upstream when merged
url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/20120621
md5sum = c2609948aa708581f93b981b23880314
[npm-modules]
recipe = plone.recipe.command
destination = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command =
export HOME=${:location};
rm -fr ${:destination} &&
mkdir -p ${:destination} &&
cd ${:destination} &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install colors@0.6.0-1 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io@0.8.7 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io-client@0.8.7 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install optimist@0.3.1 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install pkginfo@0.2.3
[template-kvm]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg.in
md5sum = 87197471aa93863c310204e8865b5ac1
output = ${buildout:directory}/template-kvm.cfg
mode = 0644
[template-nbd]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-nbd.cfg.in
md5sum = f634a5249b773658b7a7bc9fa9bb0368
output = ${buildout:directory}/template-nbd.cfg
mode = 0644
[template-frontend]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-frontend.cfg.in
md5sum = cdb690495e9eb007d2b7d2f8e12f5c59
output = ${buildout:directory}/template-frontend.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 0a98e34aaec7097a84066c0665e3a49a
output = ${buildout:directory}/template.cfg
mode = 0644
[buildout]
extends =
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = kvm
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
......@@ -11,7 +11,8 @@ parts =
cron-entry-logrotate
ca-frontend
certificate-authority
frontend-promise
frontend-promise-ipv6
frontend-promise-ipv4
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -47,7 +48,8 @@ logrotate-entries = $${rootdirectory:etc}/logrotate.d
recipe = slapos.cookbook:kvm.frontend
domain = $${ca-frontend:name}
# port = $${slap-parameter:port}
ip = $${slap-network-information:local-ipv4}
ipv6 = $${slap-network-information:global-ipv6}
ipv4 = $${slap-network-information:local-ipv4}
port = $${slap-parameter:port}
http-redirection = $${slap-parameter:http-redirection}
ssl-key-path = $${ca-frontend:key-file}
......@@ -60,10 +62,16 @@ node-binary = ${nodejs:location}/bin/node
node-env = ${buildout:parts-directory}:${npm-modules:location}/node_modules
shell-path = ${dash:location}/bin/dash
[frontend-promise]
[frontend-promise-ipv6]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/frontend_promise
hostname = $${frontend-instance:ip}
hostname = $${frontend-instance:ipv6}
port = $${frontend-instance:port}
[frontend-promise-ipv4]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/frontend_promise
hostname = $${frontend-instance:ipv4}
port = $${frontend-instance:port}
[certificate-authority]
......@@ -133,6 +141,7 @@ state-file = $${rootdirectory:srv}/logrotate.status
# Default value if no port is specified
port = 4443
http-redirection = 0
slave_instance_list =
# [logrotate-entry-frontend]
# <= logrotate
......
......@@ -55,7 +55,7 @@
"title": "Second NBD hostname",
"description": "hostname (or IP) of the second NBD server (containing drivers for example).",
"type": "string",
"format": ["host-name", "ip-address", "ipv6"],
"format": ["host-name", "ip-address", "ipv6"]
},
"nbd2-port": {
"title": "Second NBD port",
......
......@@ -6,8 +6,7 @@
[buildout]
parts =
certificate-authority
publish-kvm-backend-connection-information
publish-kvm-frontend-connection-information
publish-kvm-connection-information
kvm-promise
websockify-sighandler
novnc-promise
......@@ -37,7 +36,7 @@ storage-path = $${directory:srv}/mac
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${directory:srv}/passwd
bytes = 4
bytes = 8
[kvm-instance]
# XXX-Cedric: change "KVM" recipe to simple "create wrappers". No need for this
......@@ -136,7 +135,7 @@ key-file = $${slap-connection:key-file}
cert-file = $${slap-connection:cert-file}
computer-id = $${slap-connection:computer-id}
partition-id = $${slap-connection:partition-id}
name = SlaveFrontend
name = VNC Frontend
software-type = $${slap-parameter:frontend-software-type}
slave = true
config = host port
......@@ -146,25 +145,23 @@ return = url resource port domainname
sla = instance_guid
sla-instance_guid = $${slap-parameter:frontend-instance-guid}
[publish-kvm-backend-connection-information]
[publish-kvm-connection-information]
recipe = slapos.cookbook:publish
backend-url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1
password = $${kvm-instance:passwd}
[publish-kvm-frontend-connection-information]
<= publish-kvm-backend-connection-information
url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${directory:promises}/frontend_promise
url = $${publish-kvm-frontend-connection-information:url}
url = $${publish-kvm-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
......@@ -177,4 +174,4 @@ ram-size = 1024
disk-size = 10
disk-type = virtio
cpu-count = 1
\ No newline at end of file
cpu-count = 1
#############################
#
# Instanciate kvm+
#
#############################
# Deprecated. Just specify amount of RAM / disk you want in instance parameter.
[buildout]
extends = ${template-kvm:output}
[slap-parameter]
ram-size = 2048
disk-size = 20
\ No newline at end of file
......@@ -22,6 +22,7 @@ log = $${buildout:directory}/log
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
watched-services = $${rootdirectory:etc}/service
promises = $${rootdirectory:etc}/promise
[nbd-instance]
......@@ -53,7 +54,7 @@ image-path = $${rootdirectory:srv}/cdrom.iso
log-path = $${rootdirectory:log}/onetimeupload.log
shell-path = ${dash:location}/bin/dash
onetimeupload-path = ${buildout:bin-directory}/onetimeupload
path = $${basedirectory:services}/onetimeupload
path = $${basedirectory:watched-services}/onetimeupload
key = $${gen-passwd:passwd}
[onetimeupload-promise]
......
......@@ -10,7 +10,6 @@ offline = true
recipe = slapos.cookbook:softwaretype
default = ${template-kvm:output}
kvm = ${template-kvm:output}
kvm+ = ${template-kvmplus:output}
nbd = ${template-nbd:output}
frontend = ${template-frontend:output}
......
[buildout]
extends =
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/git/buildout.cfg
../../component/gnutls/buildout.cfg
../../component/gzip/buildout.cfg
../../component/libpng/buildout.cfg
../../component/libuuid/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/noVNC/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/nodejs.cfg
../../stack/slapos.cfg
develop =
${:parts-directory}/websockify
parts =
template
eggs
check-local-eggs
#XXX-Cedric : Currently, one can only access to KVM using noVNC.
# Ideally one should be able to access KVM by using either NoVNC or VNC.
# Problem is : no native crypto support in web browsers. So we have to disable ssl
# In qemu builtin vnc server, and make it available only for localhost
# so that only novnc can listen to it.
#XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see
# When qemu has builtin support for websockets in vnc server to get rid of
# Websockify (socket <-> websocket proxy server) when it is ready.
# May solve previous XXX depending on the implementation.
#XXX-Cedric : add list of keyboard layouts (azerty/us querty/...) parameter to qemu
[kvm]
recipe = hexagonit.recipe.cmmi
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
--enable-vnc-tls
--disable-vnc-sasl
--disable-curses
--disable-curl
--enable-kvm
--disable-docs
--enable-vnc-png
--disable-vnc-jpeg
--extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include"
--extra-ldflags="-Wl,-rpath -Wl,${glib:location}/lib -L${glib:location}/lib -Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -Wl,-rpath -Wl,${gpg-error:location}/lib -L${gpg-error:location}/lib -L${gettext:location}/lib -Wl,-rpath -Wl,${gettext:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls"
--disable-werror
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig
[websockify]
# XXX-Cedric : use official egg from pypi when it is released
recipe = plone.recipe.command
stop-on-error = true
commit = 301f3ae580557da47fa5ea2050aa671ce9c5a1a0
repository = https://github.com/SlapOS/websockify.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
git-binary = ${git:location}/bin/git
command = export GIT_SSL_NO_VERIFY=true; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit}) || (rm -fr ${:location}; exit 1)
update-command =
[check-local-eggs]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/websockify.egg-link
depends = ${eggs:dummy}
[eggs]
recipe = z3c.recipe.scripts
dummy =
${websockify:location}
eggs =
${lxml-python:egg}
websockify
slapos.cookbook
slapos.toolbox
[http-proxy]
# https://github.com/nodejitsu/node-http-proxy
recipe = slapos.recipe.build:download-unpacked
#XXX-Cedric : use upstream when merged
url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/20120621
md5sum = 20204d0b29c2cef26e1c91e99eedca6b
[proxy-by-url]
# https://github.com/dominictarr/proxy-by-url
recipe = slapos.recipe.build:download-unpacked
#XXX-Cedric : use upstream when merged
url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/20120621
md5sum = c2609948aa708581f93b981b23880314
[npm-modules]
recipe = plone.recipe.command
destination = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command =
rm -fr ${:destination} &&
mkdir -p ${:destination} &&
cd ${:destination} &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install colors@0.6.0-1 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io@0.8.7 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io-client@0.8.7 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install optimist@0.3.1 &&
${nodejs:location}/bin/node ${nodejs:location}/bin/npm install pkginfo@0.2.3
[template-kvm]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg.in
md5sum = 5607cb6b6af58694d55b87411880d368
output = ${buildout:directory}/template-kvm.cfg
mode = 0644
[template-kvmplus]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvmplus.cfg.in
md5sum = c8e92237eeda93caca1132b5202c3a02
output = ${buildout:directory}/template-kvmplus.cfg
mode = 0644
[template-nbd]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-nbd.cfg.in
md5sum = c030e7be231aba25ee0f51703e60ce67
output = ${buildout:directory}/template-nbd.cfg
mode = 0644
[template-frontend]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-frontend.cfg.in
md5sum = 73359b52013b1b65f75005e8698ed180
output = ${buildout:directory}/template-frontend.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 68788763d23f70f24b9e575871c903a8
output = ${buildout:directory}/template.cfg
mode = 0644
extends = common.cfg
[networkcache]
# signature certificates of the following uploaders.
......@@ -199,101 +49,98 @@ signature-certificate-list =
[versions]
lxml = 2.3.6
numpy = 1.6.2
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.11.3
apache-libcloud = 0.12.1
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
meld3 = 0.6.9
lxml = 3.1.0
meld3 = 0.6.10
plone.recipe.command = 1.1
pycrypto = 2.6
slapos.cookbook = 0.70
slapos.recipe.build = 0.11.5
slapos.cookbook = 0.73.1
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.31.1
slapos.toolbox = 0.33.1
smmap = 0.8.2
websockify = 0.3.0
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.32.2
# slapos.toolbox==0.31.1
# slapos.core==0.35.1
# slapos.toolbox==0.33.1
Flask = 0.9
# Required by:
# slapos.toolbox==0.31.1
# slapos.toolbox==0.33.1
GitPython = 0.3.2.RC1
# Required by:
# slapos.cookbook==0.70
PyXML = 0.8.4
# Required by:
# slapos.toolbox==0.31.1
# slapos.toolbox==0.33.1
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.31.1
feedparser = 5.1.2
# slapos.toolbox==0.33.1
feedparser = 5.1.3
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.70
# slapos.cookbook==0.73.1
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.70
# slapos.cookbook==0.73.1
netaddr = 0.7.10
# Required by:
# slapos.core==0.32.2
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# websockify==0.1-dev
numpy = 1.6.2
# slapos.toolbox==0.33.1
paramiko = 1.10.0
# Required by:
# slapos.toolbox==0.31.1
paramiko = 1.8.0
# slapos.toolbox==0.33.1
psutil = 0.6.1
# Required by:
# slapos.toolbox==0.31.1
psutil = 0.6.1
# slapos.core==0.35.1
pyflakes = 0.6.1
# Required by:
# slapos.cookbook==0.70
pytz = 2012f
# slapos.cookbook==0.73.1
pytz = 2012j
# Required by:
# slapos.cookbook==0.70
# slapos.core==0.32.2
# slapos.toolbox==0.31.1
# slapos.cookbook==0.73.1
# slapos.core==0.35.1
# slapos.toolbox==0.33.1
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.70
# slapos.toolbox==0.31.1
slapos.core = 0.32.2
# slapos.cookbook==0.73.1
# slapos.toolbox==0.33.1
slapos.core = 0.35.1
# Required by:
# slapos.core==0.32.2
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.cookbook==0.70
# slapos.toolbox==0.31.1
xml-marshaller = 0.9.7
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.70
zc.recipe.egg = 1.3.2
# slapos.cookbook==0.73.1
# slapos.toolbox==0.33.1
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.32.2
zope.interface = 4.0.1
# slapos.core==0.35.1
zope.interface = 4.0.5
This Software Release represents a generic LAMP service.
The PHP application is given to the instance by parameter as URL of application archive.
XXX-Cedric: what about application configuration?
\ No newline at end of file
# Exactly the same as software.cfg, but fetch the slapos.cookbook and
# slapos.toolbox from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
# You'll need to run buildout twice for this profile.
[buildout]
extends =
../../component/git/buildout.cfg
software.cfg
parts +=
# Development parts
slapos.cookbook-repository
slapos.core-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.core-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = lamp-edge
git-executable = ${git:location}/bin/git
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[versions]
slapos.cookbook =
slapos.toolbox =
slapos.core =
[buildout]
parts =
urls
apache-proxy
logrotate
logrotate-entry-apache
cron
cron-entry-logrotate
sshkeys-authority
sshkeys-dropbear
dropbear-server
dropbear-server-pbs-authorized-key
promise
frontend-promise
publish-connection-informations
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
newest = false
#----------------
......@@ -39,15 +36,27 @@ promises = $${rootdirectory:etc}/promise
[directory]
recipe = slapos.cookbook:mkdirectory
htdocs = $${rootdirectory:srv}/www
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
ssh = $${rootdirectory:etc}/ssh
sshkeys = $${rootdirectory:srv}/sshkeys
cronstamps = $${rootdirectory:etc}/cronstamps
ca-dir = $${rootdirectory:srv}/ssl
httpd-log = $${basedirectory:log}/apache
php-ini-dir = $${rootdirectory:etc}/php
tmp-php = $${rootdirectory:tmp}/php
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
report = $${rootdirectory:etc}/report
stunnel-conf = $${rootdirectory:etc}/stunnel
xml-report = $${rootdirectory:var}/xml_report
www = $${rootdirectory:srv}/www/
[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
#----------------
......@@ -96,88 +105,34 @@ state-file = $${rootdirectory:srv}/logrotate.status
#----------------
#--
#-- sshkeys
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests
keys = $${directory:sshkeys}/keys
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${basedirectory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-server:wrapper}
public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd
#----------------
#--
#-- Dropbear.
#-- Deploy Apache + PHP application.
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = $${rdiff-backup-server:wrapper}
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[apache-php]
recipe = slapos.cookbook:lamp.generic
url = $${slap-parameter:application-location}
strip-top-level-dir = true
# md5sum =
# XXX-Cedric: add some "template" configuration
[dropbear-server-pbs-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
#----------------
#--
#-- rdiff
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
client = false
path = $${directory:htdocs}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
#----------------
#--
#-- Apache Proxy.
[apache-proxy]
recipe = slapos.cookbook:apacheproxy
url = $${slap-parameter:proxy-url}
htdocs = $${directory:www}
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php}
httpd-conf = $${rootdirectory:etc}/apache.conf
wrapper = $${basedirectory:services}/apache
promise = $${basedirectory:promises}/apache
httpd-binary = ${apache:location}/bin/httpd
[logrotate-entry-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${apache-proxy:error-log} $${apache-proxy:access-log}
log = $${apache-php:error-log} $${apache-php:access-log}
frequency = daily
rotate-num = 30
sharedscripts = true
......@@ -185,13 +140,57 @@ notifempty = true
create = true
#----------------
#--
#-- Request frontend.
[request-frontend]
<= slap-connection
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
slave = true
config = url custom_domain
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
return = site_url
config-custom_domain = $${slap-parameter:domain}
#----------------
#--
#-- Publish instance parameters.
[urls]
[publish-connection-informations]
recipe = slapos.cookbook:publish
url = http://[$${apache-proxy:ip}]:$${apache-proxy:port}/
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
backend-url = http://[$${apache-php:ip}]:$${apache-php:port}/
url = $${request-frontend:connection-site_url}
#----------------
#--
#-- Deploy promises scripts.
[promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache
hostname = $${apache-php:ip}
port = $${apache-php:port}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[slap-parameter]
# Default value if no domain is specified
domain =
# Default value if no ssh parameter is specified
logbox-ip =
logbox-port =
logbox-user =
logbox-passwd =
# This instance will request other instances of lamp-generic depending on a
# list of countries.
[buildout]
parts =
request-edge
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[request-edge]
<= slap-connection
recipe = slapos.cookbook:request.edge
# This magic parameter triggers several requests, one request per country.
name = lamp
return = url backend-url
country-list = $${slap-parameter:country-list}
software-url = $${slap-connection:software-release-url}
software-type = default
config = application-location
config-application-location = $${slap-parameter:application-location}
return = backend-url
[publish-connection-parameter]
recipe = slapos.cookbook:publishsection
section-list = request-edge
[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-apache-php:output}
edge = ${instance-edge:output}
[buildout]
extends =
../../stack/lamp/buildout.cfg
parts +=
instance-edge
# XXX: switch to ngnix
[instance]
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 26ac6629a83869140189a85e581e822f
[instance-apache-php]
url = ${:_profile_base_location_}/instance-apache-php.cfg.in
md5sum = fdc849c9f49b9d2fb043bf229d24076b
[instance-edge]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-edge.cfg.in
output = ${buildout:directory}/instance-edge.cfg
#md5sum = 6b7a6caf44e3a94bed7f89c04003a171
mode = 0644
......@@ -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.1
hexagonit.recipe.download = 1.6nxd002
meld3 = 0.6.8
plone.recipe.command = 1.1
slapos.recipe.template = 2.2
......
......@@ -35,7 +35,7 @@ git-executable = ${git:location}/bin/git
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = lapp-resilient3
branch = master
git-executable = ${git:location}/bin/git
[slapos.core-repository]
......
......@@ -3,17 +3,22 @@
[maarch-configuration]
recipe = slapos.recipe.maarch:default
htdocs = $${apache-php:htdocs}
db_host = $${postgres-urlparse:host}
db_port = $${postgres-urlparse:port}
db_dbname = $${postgres-urlparse:path}
db_username = $${postgres-urlparse:username}
db_password = $${postgres-urlparse:password}
db-host = $${postgres-urlparse:host}
db-port = $${postgres-urlparse:port}
db-dbname = $${postgres-urlparse:path}
db-username = $${postgres-urlparse:username}
db-password = $${postgres-urlparse:password}
language = en
php_ini = $${directory:php-ini-dir}/php.ini
root_docservers = $${buildout:directory}/srv/docservers
php-ini = $${directory:php-ini-dir}/php.ini
root-docservers = $${buildout:directory}/srv/docservers
dependency = $${apache-php:recipe}
maarch-sql-data-file = $${slap-parameter:maarch-sql-data-file}
[publish-connection-informations]
# XXX login should not be hardcoded
login = superadmin
password = $${maarch-configuration:db_password}
password = $${maarch-configuration:db-password}
[slap-parameter]
maarch-sql-data-file =
**************************************************************************
This howto is for private networks only, in case the customer is migrating
from a previously installed Maarch.
**************************************************************************
Hot to install Maarch with SlapOS
=================================
1) Require the right Software Release ({insert SR number/URL here})
2) Request an instance of that Software Release.
Since we need to provide a parameter (type=resilient) that is not available through
the SlapOS web site, it must be done at command line.
If you are migrating data from an existing Maarch installation:
2.1) copy a 'data only' SQL dump - no schema - to the server that contains
the instance. Let's say it is /tmp/data.sql
The file must be readable by world, because we don't know yet the number
of the partition that will need to access it.
Remember to remove it afterwards.
The command line to request a partition is:
slapos request /etc/opt/slapos/slapos-client.cfg maarch-instance-name \
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.159:/software/maarch/software.cfg \
--type=resilient --configuration maarch-sql-data-file=/tmp/data.sql
If you are not migrating data, don't provide the maarch-sql-data-file parameter.
A minimal working database will be created.
3) deploy the instance.
You should be able to connect to both Maarch (user 'superadmin')
and Postgres (user 'postgres') with the (very long)
passport reported in the connection parameters of the partition 'apache0'.
NB: even if you copied the SQL data from a previous installation, the 'superadmin' password
is set from the published connection parameter. If there are other admin accounts,
their password is not changed.
4) Again, only if you are migrating:
connect to the server, inside the partition of type apache-export
copy the docservers data inside the folders:
srv/docservers/ai
srv/docservers/manual
srv/docservers/OAIS_main
srv/docservers/OAIS_safe
srv/docservers/offline
srv/docservers/templates
also, change the owner and group of the copied files to the user that owns the partition.
......@@ -5,11 +5,6 @@ extends =
../../stack/lapp/buildout.cfg
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.recipe.maarch-repository
# += since we need rdiff-backup and friends
parts +=
apache-php-postgres
......@@ -17,18 +12,22 @@ parts +=
eggs
instance
instance-apache-php
slapos.recipe.maarch-repository
slapos-recipe-maarch-egg
slapos.cookbook-repository
check-recipe
[versions]
slapos.recipe.maarch =
develop =
${:parts-directory}/slapos.cookbook-repository
extensions = buildout-versions
[slapos.recipe.maarch-repository]
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.recipe.maarch.git
branch = master
repository = http://git.erp5.org/repos/slapos.git
revision = 7285bc913e6ea46a36ad2a887af6e9fab010ca74
git-executable = ${git:location}/bin/git
......@@ -37,7 +36,18 @@ recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.recipe.maarch.egg-link
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
#----------------
#--
#-- Explicitly provide the configuration egg,
#-- otherwise instance.cfg won't be able to use it.
#--
[slapos-recipe-maarch-egg]
recipe = zc.recipe.egg
eggs =
slapos.recipe.maarch
#----------------
......@@ -63,7 +73,7 @@ part-list = maarch-configuration
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-custom.cfg.in
output = ${buildout:directory}/instance-custom.cfg
md5sum = d1b02a8c571886a225f2f1c8da06286c
md5sum = f86b311d443156e327a1b5f5acfb22b1
mode = 0644
......@@ -83,3 +93,6 @@ install_cmd =
#----------------
[versions]
slapos.recipe.maarch = 0.4
......@@ -62,7 +62,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -88,7 +88,7 @@ Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.6
hexagonit.recipe.download = 1.6
hexagonit.recipe.download = 1.6nxd002
meld3 = 0.6.10
slapos.cookbook = 0.72.0
slapos.recipe.build = 0.11.5
......
......@@ -45,7 +45,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
plone.recipe.command = 1.1
Jinja2 = 2.6
......
......@@ -50,6 +50,35 @@ eggs =
slapos.cookbook
cns.recipe.symlink
# override perl here to keep using 5.14.x.
[perl]
recipe = hexagonit.recipe.cmmi
depends =
${gdbm:version}
version = 5.14.2
url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2
md5sum = 04a4c5d3c1f9f19d77daff8e8cd19a26
siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_}
patch-options = -p1
patches =
${perl-keep-linker-flags-in-ldflags.patch:location}/${perl-keep-linker-flags-in-ldflags.patch:filename}
# Viktor has adapted the following commands for AMD64 compilation
# TODO: find out how we can write a generic code that suits all architectures
configure-command =
sh Configure -des \
-A ccflags=-fPIC \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
-Dsiteprefix=${:siteprefix} \
-Dcflags=-I${gdbm:location}/include \
-Dldflags="-L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib" \
-Ui_db \
-Dnoextensions=ODBM_File \
-Dusethreads
environment =
PATH=${patch:location}/bin:%(PATH)s
CFLAGS='-m64 -mtune=nocona'
post-make-hook = ${perl-postmakehook-download:location}/${perl-postmakehook-download:filename}:post_make_hook
[cpan-simple-modules]
recipe = slapos.recipe.build:cpan
modules =
......
......@@ -52,7 +52,7 @@ Jinja2 = 2.6
Werkzeug = 0.8.2
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
meld3 = 0.6.8
rdiff-backup = 1.0.5
slapos.recipe.template = 2.2
......
Software types
==============
Which software type is an entry point and can be used for root software
instance.
Parameters are expected to be passed as of *.serialised recipes expect them.
Minimal parameters::
```
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="_">{
"cluster": "dummy",
}</parameter>
</instance>
```
For each available key in the outmost dict are described below.
default (default)
-----------------
Deploy a NEO cluster.
'cluster' (str, mandatory)
~~~~~~~~~~~~~~~~~~~~~~~~~~
Cluster unique identifier. Your last line of defense against mixing up neo
clusters and corrupting your data. Choose a unique value for each of your
cluster.
'partitions' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Number of partitions. You cannot change this value once you created a cluster.
Defautls to 12.
'replicas' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~
Number of replicates.
Defaults to 0 (no resilience).
'verbose' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~
Non-zero to increase verbosity.
Defaults to 0.
'mysql-storage-count' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Number of MySQL-based storage nodes to deploy. One master node is deployed
along with each storage.
Defaults to 1.
'admin-count' (int, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Number of admin nodes to deploy.
Defaults to 1.
{% if slap_software_type not in (
mysql_storage_software_type,
admin_software_type,
) -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set part_list = [] -%}
{% set master_list = [] -%}
{% set admin_list = [] -%}
[request-common]
recipe = slapos.cookbook:request
software-url = ${slap-connection:software-release-url}
sla = computer_guid
sla-computer_guid = ${slap-connection:computer-id}
server-url = ${slap-connection:server-url}
key-file = ${slap-connection:key-file}
cert-file = ${slap-connection:cert-file}
computer-id = ${slap-connection:computer-id}
partition-id = ${slap-connection:partition-id}
config-cluster = {{ slapparameter_dict['cluster'] }}
config-partitions = {{ slapparameter_dict.get('partitions', 12) }}
config-replicas = {{ slapparameter_dict.get('replicas', 0) }}
config-verbose = {{ dumps(slapparameter_dict.get('verbose', 0)) }}
[request-config]
base = cluster verbose
master = partitions replicas
node = masters
[node-base]
< = request-common
config = ${request-config:base} ${request-config:node}
config-masters = ${all-masters:addresses}
[mysql-storage-base]
< = request-common
config = ${request-config:base} ${request-config:master}
software-type = {{ mysql_storage_software_type }}
[mysql-storage-request-base]
< = mysql-storage-base
return = master
[admin-base]
< = node-base
return = admin
software-type = {{ admin_software_type }}
[publish]
recipe = slapos.cookbook:publish
masters = ${all-masters:addresses}
admins = ${all-admins:addresses}
{% for node_number in range(slapparameter_dict.get('mysql-storage-count', 1)) -%}
{% set section_id = 'storage-%i' % (node_number, ) -%}
{% set final_section_id = 'final-' ~ section_id -%}
{% do master_list.append(section_id) -%}
[{{ section_id }}]
< = mysql-storage-request-base
name = {{ section_id }}
[{{ section(final_section_id) }}]
< = mysql-storage-base
node-base
name = {{ section_id }}
config = ${request-config:base} ${request-config:master} ${request-config:node}
{% endfor -%}
{% for node_number in range(slapparameter_dict.get('admin-count', 1)) -%}
{% set section_id = 'admin-%i' % (node_number, ) -%}
{% do admin_list.append(section_id)%}
[{{ section(section_id) }}]
< = admin-base
name = {{ section_id }}
{% endfor -%}
[buildout]
parts =
{{ part_list | join('\n\t') }}
publish
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[all-masters]
addresses = {% for master in master_list -%}
{{ '${' + master + ':connection-master}' -}}
{% if not loop.last %} {% endif -%}
{% endfor %}
[all-admins]
addresses = {% for admin in admin_list -%}
{{ '${' + admin + ':connection-admin}' -}}
{% if not loop.last %} {% endif -%}
{% endfor %}
{% endif -%}
[buildout]
parts =
neo-admin-run-wrapper
neo-admin-promise
eggs-directory = {{eggs_directory}}
develop-eggs-directory = {{develop_eggs_directory}}
offline = true
[neo-admin]
recipe = slapos.cookbook:neoppod.admin
binary = {{bin_directory}}/neoadmin
wrapper = ${directory:bin}/neoadmin
logfile = ${directory:log}/neoadmin.log
ip = ${publish:ip}
port = ${publish:port}
cluster = ${slap-parameter:cluster}
masters = ${slap-parameter:masters}
verbose = ${slap-parameter:verbose}
[publish]
recipe = slapos.cookbook:publish
# TODO: make port a partition parameter
# TODO: stop using slap-network-information
ip = [${slap-network-information:global-ipv6}]
port = 10002
admin = ${:ip}:${:port}
[neo-admin-run-wrapper]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:run}
link-binary = ${neo-admin:wrapper}
[directory]
recipe = slapos.cookbook:mkdirectory
run = ${buildout:directory}/etc/run
log = ${buildout:directory}/var/log
bin = ${buildout:directory}/bin
[neo-admin-promise]
recipe = slapos.cookbook:check_port_listening
hostname = ${neo-admin:ip}
port = ${neo-admin:port}
path = ${directory:promises}/neo-admin-promise
[buildout]
parts =
neo-master-run-wrapper
neo-master-promise
eggs-directory = {{eggs_directory}}
develop-eggs-directory = {{develop_eggs_directory}}
offline = true
[neo-master]
recipe = slapos.cookbook:neoppod.master
binary = {{bin_directory}}/neomaster
wrapper = ${directory:bin}/neomaster
logfile = ${directory:log}/neomaster.log
ip = ${publish:ip}
port = ${publish:port}
cluster = ${slap-parameter:cluster}
partitions = ${slap-parameter:partitions}
replicas = ${slap-parameter:replicas}
masters = ${slap-parameter:masters}
verbose = ${slap-parameter:verbose}
[publish]
recipe = slapos.cookbook:publish
# TODO: make port a partition parameter
# TODO: stop using slap-network-information
ip = [${slap-network-information:global-ipv6}]
port = 10000
master = ${:ip}:${:port}
[neo-master-run-wrapper]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:run}
link-binary = ${neo-master:wrapper}
[directory]
recipe = slapos.cookbook:mkdirectory
run = ${buildout:directory}/etc/run
log = ${buildout:directory}/var/log
bin = ${buildout:directory}/bin
[neo-master-promise]
recipe = slapos.cookbook:check_port_listening
hostname = ${neo-master:ip}
port = ${neo-master:port}
path = ${directory:promises}/neo-master-promise
[slap-parameter]
# "masters" parameter is not provided when just requesting a partition.
# No actuall installation takes place at that time
# (slapos.cookbook:neoppod.master raises), but cfg expansion must succeed. So
# this default value is required.
masters =
[buildout]
extends = {{ master_cfg }}
parts += neo-storage-run-wrapper
[mariadb-instance]
recipe = slapos.cookbook:generic.mysql
user = user
database = neo
conf-file = ${directory:etc}/mariadb.cnf
# No networking (ip & port options)
data-directory = ${directory:srv_mariadb}
pid-file = ${directory:var_run}/mariadb.pid
socket = ${directory:var_run}/mariadb.sock
error-log = ${directory:log}/mariadb_error.log
slow-query-log = ${directory:log}/mariadb_slowquery.log
wrapper = ${directory:etc_run}/mariadb
update-wrapper = ${directory:etc_run}/mariadb_update
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
mroonga =
[neo-storage]
recipe = slapos.cookbook:neoppod.storage
binary = {{ bin_directory }}/neostorage
wrapper = ${directory:bin}/neostorage
logfile = ${directory:log}/neostorage.log
ip = [${slap-network-information:global-ipv6}]
cluster = ${slap-parameter:cluster}
masters = ${slap-parameter:masters}
verbose = ${slap-parameter:verbose}
database-adapter = MySQL
database-parameters = ${mariadb-instance:user}:${mariadb-instance:password}@${mariadb-instance:database}${mariadb-instance:socket}
wait-database = 60
[neo-storage-run-wrapper]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:etc_run}
link-binary = ${neo-storage:wrapper}
[directory]
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
etc_run = ${:etc}/run
var_run = ${:var}/run
srv_mariadb = ${buildout:directory}/srv/mariadb
{% set admin_software_type = 'neo-admin' -%}
{% set mysql_storage_software_type = 'neo-storage-mysql' -%}
[buildout]
parts = switch-softwaretype
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-connection]
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}
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[neo-cluster]
recipe = slapos.recipe.template:jinja2
template = {{ cluster }}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/cluster.cfg
extensions = jinja2.ext.do
context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slap_software_type slap-configuration:slap-software-type
key slapparameter_dict slap-configuration:configuration
raw admin_software_type {{ admin_software_type }}
raw mysql_storage_software_type {{ mysql_storage_software_type }}
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${neo-cluster:rendered}
{{ admin_software_type }} = {{ neo_admin }}
{{ mysql_storage_software_type }} = {{ neo_storage_mysql }}
# Note on COOKBOOK/END COOKBOOK: the areas delimited by those tags should be
# dropped when a cookbook version containing neoppod recipe is released as an
# egg on pypi.
# Note on LXML/END LXML: they delimit areas where lxml magic is needed. lxml is
# a slapos.cookbook dependency, so it should be fetched automatically. But when
# automatically fetched, it gets built against system headers/libs, which is
# forbidden in slapos. So we need to fetch lxml explicitly so it is properly
# built.
[buildout]
extends =
../../stack/slapos.cfg
#COOKBOOK
../../component/git/buildout.cfg
#END COOKBOOK
#LXML
../../component/lxml-python/buildout.cfg
#END LXML
../../component/python-2.7/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/mysql-python/buildout.cfg
develop =
#COOKBOOK
# Note: as we develop a path we fetch, first buildout execution will fail as
# develop couldn't find the clone. Second (and later) runs will succeed.
${:parts-directory}/slapos.cookbook-repository
#END COOKBOOK
parts =
#COOKBOOK
slapos.cookbook-repository
check-recipe
#END COOKBOOK
slapos-deps-eggs
# NEO & dependencies
python2.7
mariadb
mysql-python
neoppod
# NEO instanciation
template-instance
[slapos-deps-eggs]
recipe = zc.recipe.egg
eggs =
#LXML
${lxml-python:egg}
#END LXML
#COOKBOOK
slapos.cookbook
#END COOKBOOK
#LXML
[lxml-python]
python = python2.7
#END LXML
#COOKBOOK
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = neoppod
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = test -e ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
#END COOKBOOK
[base-template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do
extra-context =
context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key bin_directory buildout:bin-directory
${:extra-context}
[template-neo-master]
< = base-template
filename = instance-neo-master.cfg
md5sum = b48e9446fb8fdce24d954d7d4f4c7460
[template-neo-storage-mysql]
< = base-template
filename = instance-neo-storage-mysql.cfg
md5sum = e767c66e7de58232de30bdf26188efe1
extra-context =
key mariadb_location mariadb:location
key master_cfg template-neo-master:rendered
[template-neo-admin]
< = base-template
filename = instance-neo-admin.cfg
md5sum = fcf1a5c937a609a934c8ccd7c1326726
[template-cluster]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/cluster.cfg.in
md5sum = fe37b2ff36fee65b44945393f63e51c3
[template-instance]
< = base-template
template = ${:_profile_base_location_}/instance.cfg.in
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
md5sum = 17e761b371487b55b39da1c39ebb1bb6
extra-context =
key neo_master template-neo-master:rendered
key neo_storage_mysql template-neo-storage-mysql:rendered
key neo_admin template-neo-admin:rendered
key cluster template-cluster:target
[neoppod]
recipe = zc.recipe.egg
eggs = neoppod[admin, master, storage-mysqldb]
......@@ -87,7 +87,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
<h1 class="pageTitle"><span>Step <?php echo $current_step->getStepNumber() ?>:</span> System settings</h1>
<table class="formBlock">
<tr>
<th colspan="2">Database connection</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseType">Database type:</label></td>
<td>
<select name="config_form[database_type]" id="configFormDatabaseType">
<option value="mysql">MySQL</option>
<option value="pdo_mysql">PDO MySQL</option>
</select>
</td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseHost">Host name:</label></td>
<td><input type="text" name="config_form[database_host]" id="configFormDatabaseHost" value="%(mysql_ip)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseUser">Username:</label></td>
<td><input type="text" name="config_form[database_user]" id="configFormDatabaseUser" value="%(mysql_user)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePass">Password:</label></td>
<td><input type="password" name="config_form[database_pass]" id="configFormDatabasePass" value="%(mysql_password)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseName">Database name:</label></td>
<td><input type="text" name="config_form[database_name]" id="configFormDatabaseName" value="%(mysql_database)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePrefix">Table prefix:</label></td>
<td><input type="text" name="config_form[database_prefix]" id="configFormDatabasePrefix" value="<?php echo array_var($config_form_data, 'database_prefix', 'og_') ?>" /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseEngine">Database engine:</label></td>
<td>
<select name="config_form[database_engine]" id="configFormDatabaseEngine">
<option value="InnoDB">InnoDB</option>
<option value="MyISAM">MyISAM</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<b>Note:</b> InnoDB engine is highly recommended. Use MyISAM only as a last resort, and at your own risk, if your database doesn't support InnoDB.<br /><br />
<b>Note:</b> If the database doesn't exist OpenGoo will try to create it. However, if the database user you supply doesn't have permissions to create databases, you will have to manually create the database before you can continue.
</td>
</tr>
</table>
<table class="formBlock">
<tr>
<th colspan="2">Other settings</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormAbsoluteUrl">Absolute script URL:</label></td>
<td><input type="text" name="config_form[absolute_url]" id="configFormAbsoluteUrl" value="<?php echo array_var($config_form_data, 'absolute_url', $installation_url) ?>" /></td>
</tr>
</table>
\ No newline at end of file
[buildout]
extends =
../../stack/lamp/buildout.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://heanet.dl.sourceforge.net/project/opengoo/opengoo/opengoo_1.6/opengoo_1.6.zip
md5sum = 79ddfc24f01bc843a8275463e63e96b0
strip-top-level-dir = true
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/config-form.php.in
md5sum = 5d6ee1a23e1a5e762412a4867095b9e1
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = public/install/installation/templates/system_config_form.php
\ No newline at end of file
......@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -66,7 +66,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -75,7 +75,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -75,7 +75,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -65,7 +65,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -20,6 +20,122 @@ output = ${buildout:directory}/instance.cfg
md5sum = d8b833a2054b82b6031a9420008b58fd
mode = 0644
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV
BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw
DgYDVQQDDAd0c3hkZXYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrPbh+
YGmo6mWmhVb1vTqX0BbeU0jCTB8TK3i6ep3tzSw2rkUGSx3niXn9LNTFNcIn3MZN
XHqbb4AS2Zxyk/2tr3939qqOrS4YRCtXBwTCuFY6r+a7pZsjiTNddPsEhuj4lEnR
L8Ax5mmzoi9nE+hiPSwqjRwWRU1+182rzXmN4QIDAQABo1AwTjAdBgNVHQ4EFgQU
/4XXREzqBbBNJvX5gU8tLWxZaeQwHwYDVR0jBBgwFoAU/4XXREzqBbBNJvX5gU8t
LWxZaeQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQA07q/rKoE7fAda
FED57/SR00OvY9wLlFEF2QJ5OLu+O33YUXDDbGpfUSF9R8l0g9dix1JbWK9nQ6Yd
R/KCo6D0sw0ZgeQv1aUXbl/xJ9k4jlTxmWbPeiiPZEqU1W9wN5lkGuLxV4CEGTKU
hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
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
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+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-----
[versions]
Jinja2 = 2.6
......@@ -31,7 +147,7 @@ lxml = 3.1beta1
meld3 = 0.6.10
netaddr = 0.7.10
pytz = 2012j
slapos.cookbook = 0.71.2
slapos.cookbook = 0.73.1
slapos.core = 0.34
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
......@@ -42,7 +158,7 @@ Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.core==0.34
......@@ -53,7 +169,7 @@ netifaces = 0.8
pyflakes = 0.6.0
# Required by:
# slapos.cookbook==0.71.2
# slapos.cookbook==0.73.1
# slapos.core==0.34
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
......
......@@ -66,7 +66,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -138,7 +138,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88795
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
......
......@@ -74,7 +74,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
[buildout]
# XXX-Cedric: cahnge name to reverse-proxy-nginx
extends =
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/nginx/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/slapos.cfg
parts =
slapos-cookbook
eggs
instance-profile
[eggs]
recipe = zc.recipe.egg
eggs =
slapos.toolbox
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
#md5sum = 650cd2527158734fd6ccd9ec374b5e69
mode = 0644
[buildout]
extends =
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = slaprunner
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[buildout]
parts =
directory
reverse-proxy
certificate-authority
ca-nginx
logrotate
logrotate-entry-nginx
cron
cron-entry-logrotate
smtp-port-promise
publish-connection-parameter
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# Fetch parameters defined in SlapOS Master for this instance
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
# Set default parameters
configuration.slave-instance-list =
configuration.domain = un-hardcode-me
#configuration.http-port = 80
#configuration.https-port = 443
configuration.smtp-port = 25
configuration.public-ipv4 =
# Create needed directories
[directory]
recipe = slapos.cookbook:mkdirectory
home = $${buildout:directory}
bin = $${:home}/bin
etc = $${:home}/etc
srv = $${:home}/srv
var = $${:home}/var
service = $${:etc}/service
promise = $${:etc}/promise
backup = $${:srv}/backup
log = $${:var}/log
run = $${:var}/run
ca-dir = $${:srv}/ssl
ca-requests = $${:ca-dir}/requests
ca-private = $${:ca-dir}/private
ca-certs = $${:ca-dir}/certs
ca-newcerts = $${:ca-dir}/newcerts
ca-crl = $${:ca-dir}/crl
nginx-configuration = $${:etc}/nginx
nginx-ssl = $${:ca-dir}/nginx
nginx-log = $${:home}/logs
nginx-htdocs = $${:srv}/www
cron-entries = $${:etc}/cron.d
crontabs = $${:etc}/crontabs
cronstamps = $${:etc}/cronstamps
logrotate-entries = $${:etc}/logrotate.d
logrotate-backup = $${:backup}/logrotate
# Deploy nginx and publish connection parameters inside of the recipe
[reverse-proxy]
recipe = slapos.cookbook:reverseproxy.nginx
nginx-executable = ${nginx-unstable:location}/sbin/nginx
wrapper = $${directory:bin}/nginx
configuration-file = $${directory:nginx-configuration}/nginx.conf
ipv6 = $${instance-parameter:ipv6-random}
ipv4 = $${instance-parameter:ipv4-random}
slave-instance-list = $${instance-parameter:slave-instance-list}
#http-port = $${instance-parameter:http-port}
#https-port = $${instance-parameter:https-port}
smtp-port = $${instance-parameter:configuration.smtp-port}
domain = $${instance-parameter:configuration.domain}
access-log = $${directory:nginx-log}/access.log
error-log = $${directory:nginx-log}/error.log
key-file = $${directory:nginx-configuration}/nginx.key
cert-file = $${directory:nginx-configuration}/nginx.crt
pid-file = $${directory:run}/nginx
htdocs = $${directory:nginx-htdocs}
home-directory = $${directory:home}
# Set the public IPs (if possible) as slave connection parameter so that user knows what IP
# to bind to its domain name
public-ipv4 = $${instance-parameter:configuration.public-ipv4}
# Create and handle certificate related stuffs, including encapsulating run of nginx executable
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${directory:ca-requests}
wrapper = $${directory:service}/ca
ca-private = $${directory:ca-private}
ca-certs = $${directory:ca-certs}
ca-newcerts = $${directory:ca-newcerts}
ca-crl = $${directory:ca-crl}
[ca-nginx]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${reverse-proxy:wrapper}
wrapper = $${directory:service}/nginx
key-file = $${reverse-proxy:key-file}
cert-file = $${reverse-proxy:cert-file}
# Deploy logrotate
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${directory:bin}/logrotate
conf = $${directory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${directory:srv}/logrotate.status
[logrotate-entry-nginx]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = nginx
log = $${reverse-proxy:access-log} $${reverse-proxy:error-log}
frequency = daily
rotate-num = 30
post = ${buildout:bin-directory}/killpidfromfile $${reverse-proxy:pid-file} SIGUSR1
sharedscripts = true
notifempty = true
create = true
# Deploy cron and configure it
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${directory:bin}/cron_simplelogger
log = $${directory:log}/crond.log
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${directory:service}/crond
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
# Check promises
[smtp-port-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/smtp-port-promise
hostname = $${instance-parameter:ipv6-random}
port = $${instance-parameter:configuration.smtp-port}
# Publish instance connection parameters
# Note: Parameters of slaves are published in the reverse-proxy recipe
[publish-connection-parameter]
recipe = slapos.cookbook:publish
ipv4 = $${instance-parameter:ipv4-random}
ipv6 = $${instance-parameter:ipv6-random}
......@@ -81,7 +81,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.42
......
......@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -49,6 +49,7 @@ environment = environment
[environment]
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${python2.7:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${libxslt:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH = ${python2.7:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libxslt:location}/lib:${zlib:location}/lib
PYTHONPATH = ${python-setuptools:location}
[sh-environment]
......
......@@ -61,7 +61,7 @@ branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 47f5a8cf4d134a35b7f36a7442e5798a
md5sum = 1dba62d737ef76dfac50febd61357041
output = ${buildout:directory}/template.cfg
mode = 640
......@@ -122,7 +122,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.65
......
slaprunner
==========
Introduction
------------
This software release is used to deploy Slaprunner instances.
Slaprunner is an all-in-one IDE used to develop and test profiles and recipes for SlapOS.
Parameters
----------
authorized-key
~~~~~~~~~~~~~~
You need to specify your SSH public key in order to connect to the SSH server of this instance.
Example of parameter XML::
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="authorized-key">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdNp7qZMVAzNc07opHshiIFDmJpYXQpetfcSgUj39a409d42PpsJElp7WsAE/x0nN6gUIoWIl7UiAlMzf6bKEJGJVSOZEPTmiJVlgK1Gp+kE0x9yNcncYg7p38Jny0daVA/NkkpAFyRsAm5kLGzyLtaCcktSvy0cJuy7WSSHU05pd1f8Y8thofE9g5t+/JA2VZvipxPkRfkFAG3aOAGLULlTImTSDFSDFGSDFG5F6mMnl7yvY2d6vEHVBu+K+aKmAwZVfCUwtSpa/tq3i2Lppjrw3UfrxbQSFHZCkzefr+u+l4YYe+tJrX7rYJYXD7LIfZfdSeFTlHFaN/yI1 user@host.local</parameter>
</instance>
instance-amount
~~~~~~~~~~~~~~~
Optional parameter.
Default: 10
[buildout]
extends =
../../component/dash/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg
../../component/lxml-python/buildout.cfg
../../stack/flask.cfg
../../stack/shacache-client.cfg
../../stack/slapos.cfg
parts =
template
slapos-cookbook
eggs
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 5307e4200f044ae57b504ad68444491c
[template-runner]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
md5sum = 4861be4a581686feef9f9edea865d7ee
mode = 0644
[eggs]
recipe = z3c.recipe.scripts
eggs =
${lxml-python:egg}
slapos.libnetworkcache
slapos.toolbox[flask_auth]
slapos.core
cns.recipe.symlink
# Development profile of slaprunner.
# Exactly the same as software.cfg, but fetch the slapos.cookbook and
# slapos.toolbox from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
# You'll need to run buildout twice for this profile.
[buildout]
extends = common.cfg
parts +=
slapos.cookbook-repository
slapos.core-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.core-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = slaprunner
git-executable = ${git:location}/bin/git
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = slaprunner
git-executable = ${git:location}/bin/git
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[buildout]
parts =
slaprunner
test-runner
sshkeys-dropbear
dropbear-server-add-authorized-key
sshkeys-authority
publish-connection-informations
slaprunner-promise
slaprunner-frontend-promise
dropbear-promise
symlinks
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# Create all needed directories
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
sshkeys = $${:srv}/sshkeys
services = $${:etc}/service/
scripts = $${:etc}/run/
ssh = $${:etc}/ssh/
log = $${:var}/log/
run = $${:var}/run/
backup = $${:srv}/backup/
promises = $${:etc}/promise/
test = $${:etc}/test/
[runnerdirectory]
recipe = slapos.cookbook:mkdirectory
home = $${directory:srv}/runner/
test = $${directory:srv}/test/
project = $${:home}/project
software-root = $${:home}/software
instance-root = $${:home}/instance
project-test = $${:test}/project
software-test = $${:test}/software
instance-test = $${:test}/instance
sessions = $${buildout:directory}/.sessions
#Create password recovery code for slaprunner
[recovery-code]
recipe = slapos.cookbook:generate.password
storage-path = $${directory:etc}/.rcode
bytes = 4
[slaprunner]
recipe = slapos.cookbook:slaprunner
slaprunner = ${buildout:directory}/bin/slaprunner
slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr
slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp
slapproxy = ${buildout:directory}/bin/slapproxy
supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl
git-binary = ${git:location}/bin/git
slapos.cfg = $${directory:etc}/slapos.cfg
working-directory = $${runnerdirectory:home}
project-directory = $${runnerdirectory:project}
software-directory = $${runnerdirectory:software-root}
instance-directory = $${runnerdirectory:instance-root}
etc_dir = $${directory:etc}
log_dir = $${directory:log}
run_dir = $${directory:run}
ssh_client = $${sshkeys-dropbear:wrapper}
public_key = $${sshkeys-dropbear:public-key}
private_key = $${sshkeys-dropbear:private-key}
ipv4 = $${slap-network-information:local-ipv4}
ipv6 = $${slap-network-information:global-ipv6}
proxy_port = 50000
runner_port = 50000
partition-amount = $${slap-parameter:instance-amount}
wrapper = $${directory:services}/slaprunner
debug = $${slap-parameter:debug}
# Backward compatiblity
cloud9-url =
[test-runner]
<= slaprunner
recipe = slapos.cookbook:slaprunner.test
slaprunnertest = ${buildout:directory}/bin/slaprunnertest
slapos.cfg = $${directory:etc}/slapos-test.cfg
working-directory = $${runnerdirectory:test}
project-directory = $${runnerdirectory:project-test}
software-directory = $${runnerdirectory:software-test}
instance-directory = $${runnerdirectory:instance-test}
proxy_port = 8602
wrapper = $${directory:bin}/runTestSuite
etc_dir = $${directory:test}
# Deploy dropbear (minimalist SSH server)
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${directory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${directory:bin}/raw_sshd
shell = /bin/bash
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-server:wrapper}
public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${directory:services}/sshd
[dropbear-server-add-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
# Request frontend
[request-frontend]
<= slap-connection
recipe = slapos.cookbook: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
slave = true
config = url
config-url = $${slaprunner:access-url}
return = site_url
# Send informations to SlapOS Master
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = $${slaprunner:access-url}
url = $${request-frontend:connection-site_url}
ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port}
password_recovery_code = $${recovery-code:passwd}
# Deploy promises scripts
[slaprunner-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/slaprunner
hostname = $${slaprunner:ipv6}
port = $${slaprunner:runner_port}
[slaprunner-frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${directory:promises}/slaprunner_frontend
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[dropbear-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/dropbear
hostname = $${dropbear-server:host}
port = $${dropbear-server:port}
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${directory:bin}
symlink_base = ${buildout:directory}/bin
[slap-parameter]
# Default value if no ssh key is specified
authorized-key =
# Default value of instances number in slaprunner
instance-amount = 10
debug = false
[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-runner:output}
\ No newline at end of file
# Production profile of slaprunner.
# Exactly the same as common.cfg, but:
# 1/ Use a defined set of Python eggs instead of using the latest available
# ones from Pypi, to ensure stability;
# 2/ Define list of trusted certificates for the cache.
[buildout]
extends = common.cfg
[networkcache]
# signature certificates of the following uploaders.
# Cedric de Saint Martin
# Test Agent
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions]
Flask-Auth = 0.85
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.11.4
async = 0.6.1
buildout-versions = 1.7
cns.recipe.symlink = 0.2.3
gitdb = 0.5.4
slapos.recipe.cmmi = 0.1.1
inotifyx = 0.2.0
lxml = 3.0.1
meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pycrypto = 2.6
pytz = 2012j
slapos.cookbook = 0.71.1
slapos.core = 0.34
slapos.libnetworkcache = 0.13.3
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.34.0
smmap = 0.8.2
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.34
# slapos.toolbox==0.34.0
Flask = 0.9
# Required by:
# slapos.toolbox==0.34.0
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.34.0
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.34.0
feedparser = 5.1.3
# Required by:
# slapos.recipe.cmmi==0.1.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.core==0.34
netifaces = 0.8
# Required by:
# slapos.toolbox==0.34.0
paramiko = 1.9.0
# Required by:
# slapos.toolbox==0.34.0
psutil = 0.6.1
# Required by:
# slapos.core==0.34
pyflakes = 0.5.0
# Required by:
# cns.recipe.symlink==0.2.3
# slapos.cookbook==0.71.1
# slapos.core==0.34
# slapos.libnetworkcache==0.13.3
# slapos.toolbox==0.34.0
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.34
supervisor = 3.0b1
# Required by:
# slapos.core==0.34
unittest2 = 0.5.1
# Required by:
# slapos.core==0.34
zope.interface = 4.0.3
kvm
===
slaprunner
==========
Introduction
------------
......
......@@ -61,42 +61,42 @@ slapos.core = 0.34
slapos.libnetworkcache = 0.13.3
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33.1
slapos.toolbox = 0.34.0
smmap = 0.8.2
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.34
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
Flask = 0.9
# Required by:
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
feedparser = 5.1.3
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.core==0.34
netifaces = 0.8
# Required by:
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
paramiko = 1.9.0
# Required by:
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
psutil = 0.6.1
# Required by:
......@@ -108,7 +108,7 @@ pyflakes = 0.5.0
# slapos.cookbook==0.71.1
# slapos.core==0.34
# slapos.libnetworkcache==0.13.3
# slapos.toolbox==0.33.1
# slapos.toolbox==0.34.0
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -63,7 +63,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
# Exactly the same as software.cfg, but fetch the slapos.cookbook and
# slapos.toolbox from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
# You'll need to run buildout twice for this profile.
[buildout]
extends =
../../component/git/buildout.cfg
software.cfg
parts +=
# Development parts
slapos.cookbook-repository
slapos.core-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.core-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = tt-rss
git-executable = ${git:location}/bin/git
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[versions]
slapos.cookbook =
slapos.toolbox =
slapos.core =
[buildout]
# Run a SQL script to populate DB at first run
[tt-rss-init]
recipe = slapos.cookbook:apachephpconfigure
table_name = db.ttrss_users
#constraint = `pn_id`>0
lampconfigure = ${buildout:bin-directory}/lampconfigure
htdocs = $${apache-php:htdocs}
mysql-username = $${apache-php:mysql-username}
mysql-password = $${apache-php:mysql-password}
mysql-database = $${apache-php:mysql-database}
mysql-host = $${apache-php:mysql-host}
mysql-port = $${apache-php:mysql-port}
configureinstall-location = $${basedirectory:scripts}/configureInstall
sql-script = ${sql-script:location}/${sql-script:filename}
# Give the correct information to apache recipe to put the hostname in the
# tt-rss config file
[apache-php]
application-url = $${request-frontend:connection-site_url}
SET NAMES utf8;
SET CHARACTER SET utf8;
begin;
create table ttrss_users (id integer primary key not null auto_increment,
login varchar(120) not null unique,
pwd_hash varchar(250) not null,
last_login datetime default null,
access_level integer not null default 0,
theme_id integer default null,
email varchar(250) not null default '',
full_name varchar(250) not null default '',
email_digest bool not null default false,
last_digest_sent datetime default null,
salt varchar(250) not null default '',
created datetime default null,
twitter_oauth longtext default null,
otp_enabled boolean not null default false,
index (theme_id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10);
create table ttrss_feed_categories(id integer not null primary key auto_increment,
owner_uid integer not null,
title varchar(200) not null,
collapsed bool not null default false,
order_id integer not null default 0,
parent_cat integer,
index(parent_cat),
foreign key (parent_cat) references ttrss_feed_categories(id) ON DELETE SET NULL,
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_archived_feeds (id integer not null primary key,
owner_uid integer not null,
title varchar(200) not null,
feed_url text not null,
site_url varchar(250) not null default '',
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_counters_cache (
feed_id integer not null,
owner_uid integer not null,
value integer not null default 0,
updated datetime not null,
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
);
create index ttrss_counters_cache_feed_id_idx on ttrss_counters_cache(feed_id);
create index ttrss_counters_cache_owner_uid_idx on ttrss_counters_cache(owner_uid);
create index ttrss_counters_cache_value_idx on ttrss_counters_cache(value);
create table ttrss_cat_counters_cache (
feed_id integer not null,
owner_uid integer not null,
value integer not null default 0,
updated datetime not null,
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
);
create index ttrss_cat_counters_cache_owner_uid_idx on ttrss_cat_counters_cache(owner_uid);
create table ttrss_feeds (id integer not null auto_increment primary key,
owner_uid integer not null,
title varchar(200) not null,
cat_id integer default null,
feed_url text not null,
icon_url varchar(250) not null default '',
update_interval integer not null default 0,
purge_interval integer not null default 0,
last_updated datetime default 0,
last_error varchar(250) not null default '',
site_url varchar(250) not null default '',
auth_login varchar(250) not null default '',
auth_pass varchar(250) not null default '',
parent_feed integer default null,
private bool not null default false,
rtl_content bool not null default false,
hidden bool not null default false,
include_in_digest boolean not null default true,
cache_images boolean not null default false,
hide_images boolean not null default false,
cache_content boolean not null default false,
auth_pass_encrypted boolean not null default false,
last_viewed datetime default null,
last_update_started datetime default null,
always_display_enclosures boolean not null default false,
update_method integer not null default 0,
order_id integer not null default 0,
mark_unread_on_update boolean not null default false,
update_on_checksum_change boolean not null default false,
strip_images boolean not null default false,
pubsub_state integer not null default 0,
favicon_last_checked datetime default null,
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
index(cat_id),
foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE SET NULL,
index(parent_feed),
foreign key (parent_feed) references ttrss_feeds(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
create index ttrss_feeds_cat_id_idx on ttrss_feeds(cat_id);
insert into ttrss_feeds (owner_uid, title, feed_url) values
(1, 'Tiny Tiny RSS: New Releases', 'http://tt-rss.org/releases.rss');
insert into ttrss_feeds (owner_uid, title, feed_url) values
(1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php');
create table ttrss_entries (id integer not null primary key auto_increment,
title text not null,
guid varchar(255) not null unique,
link text not null,
updated datetime not null,
content longtext not null,
content_hash varchar(250) not null,
cached_content longtext,
no_orig_date bool not null default 0,
date_entered datetime not null,
date_updated datetime not null,
num_comments integer not null default 0,
plugin_data longtext,
comments varchar(250) not null default '',
author varchar(250) not null default '') ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_entries_date_entered_index on ttrss_entries(date_entered);
create index ttrss_entries_guid_index on ttrss_entries(guid);
create index ttrss_entries_updated_idx on ttrss_entries(updated);
create table ttrss_user_entries (
int_id integer not null primary key auto_increment,
ref_id integer not null,
uuid varchar(200) not null,
feed_id int,
orig_feed_id int,
owner_uid integer not null,
marked bool not null default 0,
published bool not null default 0,
tag_cache text not null,
label_cache text not null,
last_read datetime,
score int not null default 0,
note longtext,
last_marked datetime,
last_published datetime,
unread bool not null default 1,
index (ref_id),
foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
index (feed_id),
foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE,
index (orig_feed_id),
foreign key (orig_feed_id) references ttrss_archived_feeds(id) ON DELETE SET NULL,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_user_entries_owner_uid_index on ttrss_user_entries(owner_uid);
create index ttrss_user_entries_ref_id_index on ttrss_user_entries(ref_id);
create index ttrss_user_entries_feed_id on ttrss_user_entries(feed_id);
create index ttrss_user_entries_unread_idx on ttrss_user_entries(unread);
create table ttrss_entry_comments (id integer not null primary key,
ref_id integer not null,
owner_uid integer not null,
private bool not null default 0,
date_entered datetime not null,
index (ref_id),
foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_filter_types (id integer primary key,
name varchar(120) unique not null,
description varchar(250) not null unique) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title');
insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content');
insert into ttrss_filter_types (id,name,description) values (3, 'both',
'Title or Content');
insert into ttrss_filter_types (id,name,description) values (4, 'link',
'Link');
insert into ttrss_filter_types (id,name,description) values (5, 'date',
'Article Date');
insert into ttrss_filter_types (id,name,description) values (6, 'author', 'Author');
insert into ttrss_filter_types (id,name,description) values (7, 'tag', 'Article Tags');
create table ttrss_filter_actions (id integer not null primary key,
name varchar(120) unique not null,
description varchar(250) not null unique) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_filter_actions (id,name,description) values (1, 'filter',
'Delete article');
insert into ttrss_filter_actions (id,name,description) values (2, 'catchup',
'Mark as read');
insert into ttrss_filter_actions (id,name,description) values (3, 'mark',
'Set starred');
insert into ttrss_filter_actions (id,name,description) values (4, 'tag',
'Assign tags');
insert into ttrss_filter_actions (id,name,description) values (5, 'publish',
'Publish article');
insert into ttrss_filter_actions (id,name,description) values (6, 'score',
'Modify score');
insert into ttrss_filter_actions (id,name,description) values (7, 'label',
'Assign label');
create table ttrss_filters (id integer not null primary key auto_increment,
owner_uid integer not null,
feed_id integer default null,
filter_type integer not null,
reg_exp varchar(250) not null,
filter_param varchar(250) not null default '',
inverse bool not null default false,
enabled bool not null default true,
cat_filter bool not null default false,
cat_id integer default null,
action_id integer not null default 1,
action_param varchar(250) not null default '',
index (filter_type),
foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
index (feed_id),
foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE,
index (cat_id),
foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE CASCADE,
index (action_id),
foreign key (action_id) references ttrss_filter_actions(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_filters2(id integer primary key auto_increment,
owner_uid integer not null,
match_any_rule boolean not null default false,
enabled boolean not null default true,
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_filters2_rules(id integer primary key auto_increment,
filter_id integer not null references ttrss_filters2(id) on delete cascade,
reg_exp varchar(250) not null,
filter_type integer not null,
feed_id integer default null,
cat_id integer default null,
cat_filter boolean not null default false,
index (filter_id),
foreign key (filter_id) references ttrss_filters2(id) on delete cascade,
index (filter_type),
foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE,
index (feed_id),
foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE,
index (cat_id),
foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_filters2_actions(id integer primary key auto_increment,
filter_id integer not null,
action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade,
action_param varchar(250) not null default '',
index (filter_id),
foreign key (filter_id) references ttrss_filters2(id) on delete cascade,
index (action_id),
foreign key (action_id) references ttrss_filter_actions(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_tags (id integer primary key auto_increment,
owner_uid integer not null,
tag_name varchar(250) not null,
post_int_id integer not null,
index (post_int_id),
foreign key (post_int_id) references ttrss_user_entries(int_id) ON DELETE CASCADE,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_version values (106);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
content_type varchar(250) not null,
post_id integer not null,
title text not null,
duration text not null,
index (post_id),
foreign key (post_id) references ttrss_entries(id) ON DELETE cascade) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_enclosures_post_id_idx on ttrss_enclosures(post_id);
create table ttrss_settings_profiles(id integer primary key auto_increment,
title varchar(250) not null,
owner_uid integer not null,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_prefs_types (id integer not null primary key,
type_name varchar(100) not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_prefs_types (id, type_name) values (1, 'bool');
insert into ttrss_prefs_types (id, type_name) values (2, 'string');
insert into ttrss_prefs_types (id, type_name) values (3, 'integer');
create table ttrss_prefs_sections (id integer not null primary key,
order_id integer not null,
section_name varchar(100) not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_prefs_sections (id, section_name, order_id) values (1, 'General', 0);
insert into ttrss_prefs_sections (id, section_name, order_id) values (2, 'Interface', 1);
insert into ttrss_prefs_sections (id, section_name, order_id) values (3, 'Advanced', 3);
insert into ttrss_prefs_sections (id, section_name, order_id) values (4, 'Digest', 2);
create table ttrss_prefs (pref_name varchar(250) not null primary key,
type_id integer not null,
section_id integer not null default 1,
short_desc text not null,
help_text varchar(250) not null default '',
access_level integer not null default 0,
def_value text not null,
index(type_id),
foreign key (type_id) references ttrss_prefs_types(id),
index(section_id),
foreign key (section_id) references ttrss_prefs_sections(id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_prefs_pref_name_idx on ttrss_prefs(pref_name);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge articles after this number of days (0 - disables)',1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 'Default interval between feed updates',1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_ARTICLE_LIMIT', 3, '30', 'Amount of articles to display at once',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ALLOW_DUPLICATE_POSTS', 1, 'true', 'Allow duplicate posts',1, 'This option is useful when you are reading several planet-type aggregators with partially colliding userbase. When disabled, it forces same posts from different feeds to appear only once.');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_CATS', 1, 'true', 'Enable feed categories',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SHOW_CONTENT_PREVIEW', 1, 'true', 'Show content preview in headlines list',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SHORT_DATE_FORMAT', 2, 'M d, G:i', 'Short date format',3);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('LONG_DATE_FORMAT', 2, 'D, M d Y - G:i', 'Long date format',3);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2, 'Display expanded list of feed articles, instead of separate displays for headlines and article content');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ON_CATCHUP_SHOW_NEXT_FEED', 1, 'false', 'On catchup show next feed',2, 'Automatically open next feed with unread articles after marking one as read');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('FEEDS_SORT_BY_UNREAD', 1, 'false', 'Sort feeds by unread articles count',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DIGEST_ENABLE', 1, 'false', 'Enable e-mail digest',4, 'This option enables sending daily digest of new (and unread) headlines on your configured e-mail address');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('CONFIRM_FEED_CATCHUP', 1, 'true', 'Confirm marking feed as read',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('CDM_AUTO_CATCHUP', 1, 'false', 'Automatically mark articles as read',2, 'This option enables marking articles as read automatically while you scroll article list.');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_MODE', 2, 'adaptive', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 2, '', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('STRIP_UNSAFE_TAGS', 1, 'true', 'Strip unsafe tags from articles', 3, 'Strip all but most common HTML tags when reading articles.');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('BLACKLISTED_TAGS', 2, 'main, generic, misc, uncategorized, blog, blogroll, general, news', 'Blacklisted tags', 3, 'When auto-detecting tags in articles these tags will not be applied (comma-separated list).');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('FRESH_ARTICLE_MAX_AGE', 3, '24', 'Maximum age of fresh articles (in hours)',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DIGEST_CATCHUP', 1, 'false', 'Mark articles in e-mail digest as read',4);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('CDM_EXPANDED', 1, 'true', 'Automatically expand articles in combined mode',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_UNREAD_ARTICLES', 1, 'true', 'Purge unread articles',3);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_SHOWS_SPECIAL', 1, 'true', 'Show special feeds when hiding read feeds',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('VFEED_GROUP_BY_FEED', 1, 'false', 'Group headlines in virtual feeds',2, 'When this option is enabled, headlines in Special feeds and Labels are grouped by feeds');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Do not embed images in articles', 2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_ORDER_BY', 2, 'default', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_API_ACCESS', 1, 'false', 'Enable external API', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_SPECIAL', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_LABELS', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_UNCAT', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_FEEDLIST', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_ENABLE_CATS', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_SHOW_IMAGES', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_HIDE_READ', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_SORT_FEEDS_UNREAD', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_THEME_ID', 2, '0', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USER_TIMEZONE', 2, 'UTC', 'User timezone', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('USER_STYLESHEET', 2, '', 'Customize stylesheet', 2, 'Customize CSS stylesheet to your liking');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('SORT_HEADLINES_BY_FEED_DATE', 1, 'true', 'Sort headlines by feed date',2, 'Use feed-specified date to sort headlines instead of local import date.');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_BROWSE_CATS', 1, 'true', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('SSL_CERT_SERIAL', 2, '', 'Login with an SSL certificate',3, 'Click to register your SSL client certificate with tt-rss');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DIGEST_PREFERRED_TIME', 2, '00:00', 'Try to send digests around specified time', 4, 'Uses UTC timezone');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_SHOW_EMPTY_CATS', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('AUTO_ASSIGN_LABELS', 1, 'true', 'Assign articles to labels automatically', 3);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_ENABLED_PLUGINS', 2, '', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED',
'SORT_HEADLINES_BY_FEED_DATE',
'VFEED_GROUP_BY_FEED',
'FRESH_ARTICLE_MAX_AGE',
'CDM_EXPANDED',
'SHOW_CONTENT_PREVIEW',
'AUTO_ASSIGN_LABELS',
'HIDE_READ_SHOWS_SPECIAL');
create table ttrss_user_prefs (
owner_uid integer not null,
pref_name varchar(250),
value longtext not null,
profile integer,
index (profile),
foreign key (profile) references ttrss_settings_profiles(id) ON DELETE CASCADE,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
index (pref_name),
foreign key (pref_name) references ttrss_prefs(pref_name) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid);
create index ttrss_user_prefs_pref_name_idx on ttrss_user_prefs(pref_name);
create table ttrss_sessions (id varchar(250) unique not null primary key,
data text,
expire integer not null,
index (id),
index (expire)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_feedbrowser_cache (
feed_url text not null,
site_url text not null,
title text not null,
subscribers integer not null) DEFAULT CHARSET=UTF8;
create table ttrss_labels2 (id integer not null primary key auto_increment,
owner_uid integer not null,
caption varchar(250) not null,
fg_color varchar(15) not null default '',
bg_color varchar(15) not null default '',
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_user_labels2 (label_id integer not null,
article_id integer not null,
foreign key (label_id) references ttrss_labels2(id) ON DELETE CASCADE,
foreign key (article_id) references ttrss_entries(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_access_keys (id integer not null primary key auto_increment,
access_key varchar(250) not null,
feed_id varchar(250) not null,
is_cat bool not null default false,
owner_uid integer not null,
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_linked_instances (id integer not null primary key auto_increment,
last_connected datetime not null,
last_status_in integer not null,
last_status_out integer not null,
access_key varchar(250) not null unique,
access_url text not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_linked_feeds (
feed_url text not null,
site_url text not null,
title text not null,
created datetime not null,
updated datetime not null,
instance_id integer not null,
subscribers integer not null,
foreign key (instance_id) references ttrss_linked_instances(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_plugin_storage (
id integer not null auto_increment primary key,
name varchar(100) not null,
owner_uid integer not null,
content longtext not null,
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
commit;
[buildout]
extends =
../../stack/lamp/buildout.cfg
[versions]
slapos.cookbook =
[application]
recipe = slapos.recipe.build:download-unpacked
url = https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.7.8.tar.gz
md5sum = efd7eec1629db379896fb7e74bba400e
strip-top-level-dir = true
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/config.php.in
#md5sum = Student may put here md5sum of this file, this is good idea
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = config.php
[sql-script]
recipe = slapos.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/script/tt-rss.sql
#md5sum = c4d5f87d8f02cad3f20e679160195f48
filename = tt-rss.sql
mode = 0744
# XXX Should disappear and be integrated into apachephpconfigure
[configure-script]
recipe = slapos.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-tt-rss.py
#md5sum = c4d5f87d8f02cad3f20e679160195f48
filename = configure-tt-rss.py
mode = 0744
[custom-application-deployment-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-custom.cfg.in
output = ${buildout:directory}/instance-custom.cfg
#md5sum = 283cb53ff8cd34635703e771062db919
mode = 0644
[custom-application-deployment]
path = ${custom-application-deployment-template:output}
part-list = tt-rss-init
<?php
// *******************************************
// *** Database configuration (important!) ***
// *******************************************
define('DB_TYPE', "mysql"); // or mysql
define('DB_HOST', "%(mysql_host)s");
define('DB_USER', "%(mysql_user)s");
define('DB_NAME', "%(mysql_database)s");
define('DB_PASS', "%(mysql_password)s");
define('MYSQL_CHARSET', 'UTF8');
// Connection charset for MySQL. If you have a legacy database and/or experience
// garbage unicode characters with this option, try setting it to a blank string.
// ***********************************
// *** Basic settings (important!) ***
// ***********************************
define('SELF_URL_PATH', '%(url)s');
// Full URL of your tt-rss installation. This should be set to the
// location of tt-rss directory, e.g. http://yourserver/tt-rss/
// You need to set this option correctly otherwise several features
// including PUSH, bookmarklets and browser integration will not work properly.
define('SINGLE_USER_MODE', true);
// Operate in single user mode, disables all functionality related to
// multiple users.
define('SIMPLE_UPDATE_MODE', false);
// Enables fallback update mode where tt-rss tries to update feeds in
// background while tt-rss is open in your browser.
// If you don't have a lot of feeds and don't want to or can't run
// background processes while not running tt-rss, this method is generally
// viable to keep your feeds up to date.
// Still, there are more robust (and recommended) updating methods
// available, you can read about them here: http://tt-rss.org/wiki/UpdatingFeeds
// *****************************
// *** Files and directories ***
// *****************************
//FIXME
define('PHP_EXECUTABLE', '/usr/bin/php');
// Path to PHP executable, used for various command-line tt-rss programs
define('LOCK_DIRECTORY', 'lock');
// Directory for lockfiles, must be writable to the user you run
// daemon process or cronjobs under.
define('CACHE_DIR', 'cache');
// Local cache directory for RSS feed content.
define('ICONS_DIR', "feed-icons");
define('ICONS_URL', "feed-icons");
// Local and URL path to the directory, where feed favicons are stored.
// Unless you really know what you're doing, please keep those relative
// to tt-rss main directory.
// **********************
// *** Authentication ***
// **********************
// Please see PLUGINS below to configure various authentication modules.
define('AUTH_AUTO_CREATE', true);
// Allow authentication modules to auto-create users in tt-rss internal
// database when authenticated successfully.
define('AUTH_AUTO_LOGIN', true);
// Automatically login user on remote or other kind of externally supplied
// authentication, otherwise redirect to login form as normal.
// If set to true, users won't be able to set application language
// and settings profile.
// *********************
// *** Feed settings ***
// *********************
define('FORCE_ARTICLE_PURGE', 0);
// When this option is not 0, users ability to control feed purging
// intervals is disabled and all articles (which are not starred)
// older than this amount of days are purged.
// *** PubSubHubbub settings ***
define('PUBSUBHUBBUB_HUB', '');
// URL to a PubSubHubbub-compatible hub server. If defined, "Published
// articles" generated feed would automatically become PUSH-enabled.
define('PUBSUBHUBBUB_ENABLED', false);
// Enable client PubSubHubbub support in tt-rss. When disabled, tt-rss
// won't try to subscribe to PUSH feed updates.
// *********************
// *** Sphinx search ***
// *********************
define('SPHINX_ENABLED', false);
// Enable fulltext search using Sphinx (http://www.sphinxsearch.com)
// Please see http://tt-rss.org/wiki/SphinxSearch for more information.
define('SPHINX_INDEX', 'ttrss');
// Index name in Sphinx configuration. You can specify multiple indexes
// as a comma-separated string.
// ***********************************
// *** Self-registrations by users ***
// ***********************************
define('ENABLE_REGISTRATION', false);
// Allow users to register themselves. Please be vary that allowing
// random people to access your tt-rss installation is a security risk
// and potentially might lead to data loss or server exploit. Disabled
// by default.
define('REG_NOTIFY_ADDRESS', 'user@your.domain.dom');
// Email address to send new user notifications to.
define('REG_MAX_USERS', 10);
// Maximum amount of users which will be allowed to register on this
// system. 0 - no limit.
// **********************************
// *** Cookies and login sessions ***
// **********************************
define('SESSION_COOKIE_LIFETIME', 86400*30);
// Default lifetime of a session (e.g. login) cookie. In seconds,
// 0 means cookie will be deleted when browser closes.
// Setting this to zero will affect several user preferences
// like widescreen mode not saving.
define('SESSION_EXPIRE_TIME', 86400*30);
// Hard expiration limit for sessions. Should be
// greater or equal to SESSION_COOKIE_LIFETIME
define('SESSION_CHECK_ADDRESS', 1);
// Check client IP address when validating session:
// 0 - disable checking
// 1 - check first 3 octets of an address (recommended)
// 2 - check first 2 octets of an address
// 3 - check entire address
// *********************************
// *** Email and digest settings ***
// *********************************
define('SMTP_FROM_NAME', 'Tiny Tiny RSS');
define('SMTP_FROM_ADDRESS', 'noreply@your.domain.dom');
// Name, address and subject for sending outgoing mail. This applies
// to password reset notifications, digest emails and any other mail.
define('DIGEST_SUBJECT', '[tt-rss] New headlines for last 24 hours');
// Subject line for email digests
define('SMTP_HOST', '');
// SMTP Host to send outgoing mail. Blank - use system MTA.
define('SMTP_PORT','');
// SMTP port to sent outgoing mail. Default is 25.
define('SMTP_LOGIN', '');
define('SMTP_PASSWORD', '');
// These two options enable SMTP authentication when sending
// outgoing mail. Only used with SMTP_HOST
// ***************************************
// *** Other settings (less important) ***
// ***************************************
define('CHECK_FOR_NEW_VERSION', false);
// Check for new versions of tt-rss automatically.
define('ENABLE_GZIP_OUTPUT', false);
// Selectively gzip output to improve wire performance. This requires
// PHP Zlib extension on the server.
// Enabling this can break tt-rss in several httpd/php configurations,
// if you experience weird errors and tt-rss failing to start, blank pages
// after login, or content encoding errors, disable it.
define('PLUGINS', 'auth_remote, auth_internal, note');
// Comma-separated list of plugins to load automatically for all users.
// System plugins have to be specified here. Please enable at least one
// authentication plugin here (auth_*).
// Users may enable other user plugins from Preferences/Plugins but may not
// disable plugins specified in this list.
define('CONFIG_VERSION', 26);
// Expected config version. Please update this option in config.php
// if necessary (after migrating all new options from this file).
// vim:ft=php
?>
......@@ -3,8 +3,8 @@ extends =
../../stack/lamp/buildout.cfg
[application]
url = http://wordpress.org/wordpress-3.5.tar.gz
md5sum = 105b5baff67344528bb5d8b71c050b0d
url = http://wordpress.org/wordpress-3.5.1.tar.gz
md5sum = 409889c98b13cbdbb9fd121df859ae3e
[application-template]
recipe = slapos.recipe.download
......
......@@ -64,7 +64,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
......@@ -69,7 +69,7 @@ xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88846
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
plone.recipe.command = 1.1
# Use SlapOS patched zc.buildout
......
......@@ -68,7 +68,7 @@ Flask = 0.9
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.59
......
......@@ -76,7 +76,7 @@ PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.1
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.34
......
zimbra-kvm
==========
Introduction
------------
Zimbra single-machine deployment inside of a virtual machine.
Internals
---------
The following ports are reachable from the outside world:
22 -> 2222
443 -> 4443
Others?
For each port, KVM does a NAT redirection from the VM to the local ipv4. Then, 6tunnel is called to redirect it to the outside world using ipv6.
Deployment
----------
To deploy a new Zimbra service, you just need to request a new instance of it,
then connect the the machine using ssh with root:zimbra credentials, reconfigure
Zimbra to use another domain name, and change root password.
Disk Image content
------------------
Ubuntu 12.04, Zimbra install from official packages, 8.0.3
admin password: Cedric de Saint Martin has it.
bind9: http://wiki.zimbra.com/index.php?title=Split_dns
resolv.conf: http://askubuntu.com/questions/30942/why-does-my-resolv-conf-file-get-regenerated-every-time
Todo
----
* SMTP master/slave design implemented
* Reverse proxy for web works
* Automatically download the proper boot disk image.
* Have two virtual disks: one for system/zimbra, one for data.
* Unify smtp frontend and web frontend
[buildout]
extends =
../../component/6tunnel/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/qemu-kvm/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/noVNC/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/slapos.cfg
parts =
template
eggs
[eggs]
recipe = z3c.recipe.scripts
eggs =
${lxml-python:egg}
websockify
slapos.cookbook
slapos.toolbox
[template-kvm]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg.in
#md5sum = d4f7203365bacd70ad62f6b6de9f74d4
output = ${buildout:directory}/template-kvm.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
#md5sum = 68788763d23f70f24b9e575871c903a8
output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
# Numpy 1.7.0 doesn't install well
numpy = 1.6.2
[buildout]
extends =
../../component/git/buildout.cfg
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = zimbra-kvm
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
#############################
#
# Instanciate kvm
#
#############################
[buildout]
parts =
certificate-authority
request-web-frontend
kvm-promise
tunnel-ipv6-kvm-https
tunnel-ipv6-kvm-ssh
tunnel-ipv6-kvm-zimbra-admin
tunnel-ipv6-kvm-smtp
tunnel-ipv6-kvm-smtp-submission
websockify-sighandler
novnc-promise
publish-kvm-connection-information
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
scripts = $${:etc}/run
services = $${:etc}/service
promises = $${:etc}/promise
novnc-conf = $${:etc}/novnc
run = $${:var}/run
ca-dir = $${:srv}/ssl
[create-mac]
recipe = slapos.cookbook:generate.mac
storage-path = $${directory:srv}/mac
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${directory:srv}/passwd
bytes = 4
[kvm-instance]
# XXX-Cedric: change "KVM" recipe to simple "create wrappers". No need for this
# Specific code
recipe = slapos.cookbook:zimbra.kvm
vnc-ip = $${slap-network-information:local-ipv4}
vnc-port = 5901
boot-disk-path = $${directory:srv}/boot.qcow2
data-disk-path = $${directory:srv}/virtual.qcow2
data-disk-size = $${slap-parameter:disk-size}
data-disk-type = $${slap-parameter:disk-type}
socket-path = $${directory:var}/qmp_socket
pid-path = $${directory:run}/pid_file
smp-count = $${slap-parameter:cpu-count}
ram-size = $${slap-parameter:ram-size}
disk-type = virtio
mac-address = $${create-mac:mac-address}
runner-path = $${directory:services}/kvm
controller-path = $${directory:scripts}/kvm_controller
shell-path = ${dash:location}/bin/dash
qemu-path = ${kvm:location}/bin/qemu-system-x86_64
qemu-img-path = ${kvm:location}/bin/qemu-img
passwd = $${gen-passwd:passwd}
[kvm-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/vnc_promise
hostname = $${kvm-instance:vnc-ip}
port = $${kvm-instance:vnc-port}
# 6tunnel
# Refers to http://wiki.zimbra.com/wiki/Ports#External_Access
[tunnel-ipv6-kvm-https]
recipe = slapos.cookbook:ipv6toipv4
ipv6 = $${slap-network-information:global-ipv6}
ipv6-port = 443
ipv4 = $${slap-network-information:local-ipv4}
ipv4-port = 443
shell-path = ${dash:location}/bin/dash
6tunnel-path = ${6tunnel:location}/bin/6tunnel
runner-path = $${directory:services}/6tunnel-https
[tunnel-ipv6-kvm-zimbra-admin]
recipe = slapos.cookbook:ipv6toipv4
ipv6 = $${slap-network-information:global-ipv6}
ipv6-port = 7071
ipv4 = $${slap-network-information:local-ipv4}
ipv4-port = 7071
shell-path = ${dash:location}/bin/dash
6tunnel-path = ${6tunnel:location}/bin/6tunnel
runner-path = $${directory:services}/6tunnel-zimbra_admin
[tunnel-ipv6-kvm-ssh]
recipe = slapos.cookbook:ipv6toipv4
ipv6 = $${slap-network-information:global-ipv6}
ipv6-port = 2222
ipv4 = $${slap-network-information:local-ipv4}
ipv4-port = 2222
shell-path = ${dash:location}/bin/dash
6tunnel-path = ${6tunnel:location}/bin/6tunnel
runner-path = $${directory:services}/6tunnel-ssh
[tunnel-ipv6-kvm-smtp]
recipe = slapos.cookbook:ipv6toipv4
ipv6 = $${slap-network-information:global-ipv6}
ipv6-port = 25
ipv4 = $${slap-network-information:local-ipv4}
ipv4-port = 25
shell-path = ${dash:location}/bin/dash
6tunnel-path = ${6tunnel:location}/bin/6tunnel
runner-path = $${directory:services}/6tunnel-smtp
[tunnel-ipv6-kvm-smtp-submission]
recipe = slapos.cookbook:ipv6toipv4
ipv6 = $${slap-network-information:global-ipv6}
ipv6-port = 587
ipv4 = $${slap-network-information:local-ipv4}
ipv4-port = 587
shell-path = ${dash:location}/bin/dash
6tunnel-path = ${6tunnel:location}/bin/6tunnel
runner-path = $${directory:services}/6tunnel-smtp-submission
[novnc-instance]
recipe = slapos.cookbook:novnc
path = $${ca-novnc:executable}
ip = $${slap-network-information:global-ipv6}
port = 6080
vnc-ip = $${kvm-instance:vnc-ip}
vnc-port = $${kvm-instance:vnc-port}
novnc-location = ${noVNC:location}
websockify-path = ${buildout:directory}/bin/websockify
ssl-key-path = $${ca-novnc:key-file}
ssl-cert-path = $${ca-novnc:cert-file}
[websockify-sighandler]
recipe = slapos.cookbook:signalwrapper
wrapper-path = $${directory:services}/websockify
wrapped-path = $${novnc-instance:path}
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${directory:services}/certificate_authority
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}
[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/
[ca-novnc]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
key-file = $${directory:novnc-conf}/novnc.key
cert-file = $${directory:novnc-conf}/novnc.crt
executable = $${directory:bin}/novnc
wrapper = $${directory:bin}/websockify
[novnc-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/novnc_promise
hostname = $${novnc-instance:ip}
port = $${novnc-instance:port}
[kvm-monitor]
recipe = slapos.cookbook:generic.slapmonitor
db-path = $${directory:srv}/slapmonitor_database
[request-slave-frontend]
recipe = slapos.cookbook:requestoptional
software-url = $${slap-parameter:frontend-software-url}
server-url = $${slap-connection:server-url}
key-file = $${slap-connection:key-file}
cert-file = $${slap-connection:cert-file}
computer-id = $${slap-connection:computer-id}
partition-id = $${slap-connection:partition-id}
name = VNC Frontend
software-type = $${slap-parameter:frontend-software-type}
slave = true
config = host port
config-host = $${novnc-instance:ip}
config-port = $${novnc-instance:port}
return = url resource port domainname
sla = instance_guid
sla-instance_guid = $${slap-parameter:frontend-instance-guid}
[request-web-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Web Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url custom_domain
config-url = https://[$${tunnel-ipv6-kvm-https:ipv6}]:$${tunnel-ipv6-kvm-https:ipv6-port}/
return = site_url
config-custom_domain = $${slap-parameter:domain}
[request-smtp-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = SMTP Frontend
# XXX We have hardcoded SR URL here.
#software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/zimbra-kvm:/software/reverse-proxy-nginx/development.cfg
software-url = /opt/slapdev/software/reverse-proxy-nginx/development.cfg
slave = true
config = smtp-upstream-host smtp-upstream-port
config-smtp-upstream-host = $${tunnel-ipv6-kvm-smtp:ipv6}
config-smtp-upstream-port = $${tunnel-ipv6-kvm-smtp:port}
return = listening-ipv4
[publish-kvm-connection-information]
recipe = slapos.cookbook:publish
web-backend-url = https://[$${tunnel-ipv6-kvm-https:ipv6}]:$${tunnel-ipv6-kvm-https:ipv6-port}/
web-url = $${request-web-frontend:connection-site_url}
vnc-backend-url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1
vnc-password = $${kvm-instance:passwd}
vnc-url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource}
ssh = ssh root@$${tunnel-ipv6-kvm-ssh:ipv6} -p $${tunnel-ipv6-kvm-ssh:ipv6-port}
smtp-listening-ipv4 = $${request-smtp-frontend:connection-listening-ipv4}
[slap-parameter]
# Default values if not specified
frontend-instance-guid =
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
ram-size = 4096
disk-size = 50
disk-type = virtio
cpu-count = 4
domain =
[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-kvm: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}
[buildout]
extends = common.cfg
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Cedric de Saint Martin
# Test Agent
signature-certificate-list =
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIB9jCCAV+gAwIBAgIJAKRvzcy7OH0UMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
BAMMCENPTVAtNzcyMCAXDTEyMDgxMDE1NDI1MVoYDzIxMTIwNzE3MTU0MjUxWjAT
MREwDwYDVQQDDAhDT01QLTc3MjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
o7aipd6MbnuGDeR1UJUjuMLQUariAyQ2l2ZDS6TfOwjHiPw/mhzkielgk73kqN7A
sUREx41eTcYCXzTq3WP3xCLE4LxLg1eIhd4nwNHj8H18xR9aP0AGjo4UFl5BOMa1
mwoyBt3VtfGtUmb8whpeJgHhqrPPxLoON+i6fIbXDaUCAwEAAaNQME4wHQYDVR0O
BBYEFEfjy3OopT2lOksKmKBNHTJE2hFlMB8GA1UdIwQYMBaAFEfjy3OopT2lOksK
mKBNHTJE2hFlMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAaNRx6YN2
M/p3R8/xS6zvH1EqJ3FFD7XeAQ52WuQnKSREzuw0dsw12ClxjcHiQEFioyTiTtjs
5pW18Ry5Ie7iFK4cQMerZwWPxBodEbAteYlRsI6kePV7Gf735Y1RpuN8qZ2sYL6e
x2IMeSwJ82BpdEI5niXxB+iT0HxhmR+XaMI=
-----END CERTIFICATE-----
[versions]
numpy = 1.6.2
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.12.1
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
lxml = 3.1.0
meld3 = 0.6.10
plone.recipe.command = 1.1
pycrypto = 2.6
slapos.cookbook = 0.73.1
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33.1
smmap = 0.8.2
websockify = 0.3.0
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.35.1
# slapos.toolbox==0.33.1
Flask = 0.9
# Required by:
# slapos.toolbox==0.33.1
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.33.1
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.33.1
feedparser = 5.1.3
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6nxd002
# Required by:
# slapos.cookbook==0.73.1
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.73.1
netaddr = 0.7.10
# Required by:
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# slapos.toolbox==0.33.1
paramiko = 1.10.0
# Required by:
# slapos.toolbox==0.33.1
psutil = 0.6.1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.6.1
# Required by:
# slapos.cookbook==0.73.1
pytz = 2012j
# Required by:
# slapos.cookbook==0.73.1
# slapos.core==0.35.1
# slapos.toolbox==0.33.1
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.73.1
# slapos.toolbox==0.33.1
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.73.1
# slapos.toolbox==0.33.1
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
\ No newline at end of file
......@@ -43,7 +43,6 @@ extends =
../component/git/buildout.cfg
../component/poppler/buildout.cfg
../component/imagemagick/buildout.cfg
../component/pdftk/buildout.cfg
../component/ffmpeg/buildout.cfg
../component/file/buildout.cfg
../component/stunnel/buildout.cfg
......@@ -76,7 +75,6 @@ parts =
imagemagick
file
poppler
pdftk
ffmpeg
bootstrap2.6
......@@ -93,7 +91,3 @@ python = python2.6
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-006
# Use patched hexagonit.recipe.download from
# https://github.com/SlapOS/hexagonit.recipe.download
hexagonit.recipe.download = 1.5.1-dev-slapos-001
......@@ -15,9 +15,11 @@ find-links =
http://www.nexedi.org/static/packages/source/
http://www.owlfish.com/software/wsgiutils/download.html
allow-hosts += pybrary.net
extends =
# Exact version of Zope
http://svn.zope.org/repos/main/Zope/tags/2.12.25/versions.cfg
http://svn.zope.org/repos/main/Zope/tags/2.12.26/versions.cfg
../../stack/slapos.cfg
../../component/logrotate/buildout.cfg
../../component/dcron/buildout.cfg
......@@ -38,9 +40,7 @@ extends =
../../component/lxml-python/buildout.cfg
../../component/percona-toolkit/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/memcached/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/pdftk/buildout.cfg
../../component/pil-python/buildout.cfg
../../component/pycrypto-python/buildout.cfg
../../component/pysvn-python/buildout.cfg
......@@ -48,7 +48,6 @@ extends =
../../component/python-2.7/buildout.cfg
../../component/python-ldap-python/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/subversion/buildout.cfg
../../component/tesseract/buildout.cfg
../../component/varnish/buildout.cfg
......@@ -65,6 +64,7 @@ extends =
../../component/wget/buildout.cfg
../../component/aspell/buildout.cfg
../../component/cloudooo/buildout.cfg
../../component/jsl/buildout.cfg
parts =
rdiff-backup
......@@ -74,10 +74,9 @@ parts =
apache-antiloris
file
graphviz
memcached
haproxy
jsl
varnish-3.0
stunnel
w3m
poppler
libpng
......@@ -97,7 +96,6 @@ parts =
perl-DBI
percona-toolkit
zabbix-agent
pdftk
dcron
dash
wget
......@@ -131,6 +129,7 @@ parts =
fix-products-paths
# some additional utils
slapos-toolbox
zodbanalyze
# Local development
slapos.cookbook-repository
......@@ -142,13 +141,10 @@ parts =
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
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
update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --quiet --hard @{upstream} ; fi
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
......@@ -161,7 +157,7 @@ recipe = zc.recipe.egg
eggs = slapos.cookbook
scripts =
python = python2.6
ugly-depend-on = ${slapos.cookbook-repository:command} ${slapos.cookbook-repository:update-command}
ugly-depend-on = ${slapos.cookbook-repository:repository} ${slapos.cookbook-repository:branch}
[slapos.recipe.template-python2.6]
recipe = zc.recipe.egg
......@@ -185,7 +181,7 @@ context =
[template-mariadb]
< = template-jinja2-base
filename = instance-mariadb.cfg
md5sum = 867bd8e3c4f56db2aab2fcad59f2efd8
md5sum = 49ae6f1bf97d3755978fe08b8e29fb5a
extra-context =
key coreutils_location coreutils:location
key dcron_location dcron:location
......@@ -202,13 +198,13 @@ extra-context =
[template-zope]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-zope.cfg.in
md5sum = de2918c8ca604f452a69108f6e31e78d
md5sum = 69556ddc9773fb95896b7762e998bb9b
mode = 640
[template-kumofs]
< = template-jinja2-base
filename = instance-kumofs.cfg
md5sum = 7e13d689de7163dcab64e8df4711cdd7
md5sum = 90a321be12ee977800d590bf941021ef
extra-context =
key dash_location dash:location
key dcron_location dcron:location
......@@ -219,7 +215,7 @@ extra-context =
[template-tidstorage]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-tidstorage.cfg.in
md5sum = 1f3e7cfc719d3c2eee4860678f6a67df
md5sum = bd5872108f812c6823a8915670e51c4c
mode = 640
[template-cloudooo]
......@@ -239,7 +235,7 @@ mode = 640
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 700b8729a4d9a8423ab2a99de486cc31
md5sum = fbb7ea50d7ea6d4e25725801cc3fd5f9
extra-context =
key apache_location apache:location
key aspell_location aspell:location
......@@ -260,6 +256,7 @@ extra-context =
key gzip_location gzip:location
key haproxy_location haproxy:location
key imagemagick_location imagemagick:location
key jsl_location jsl:location
key libICE_location libICE:location
key libSM_location libSM:location
key libX11_location libX11:location
......@@ -275,12 +272,11 @@ extra-context =
key logrotate_location logrotate:location
key mariadb_location mariadb:location
key openssl_location openssl:location
key pdftk_location pdftk:location
key poppler_location poppler:location
key sed_location sed:location
key template_cloudooo template-cloudooo:target
key template_erp5_single template-erp5-single:target
key template_erp5_cluster template-erp5-cluster:rendered
key template_erp5_cluster template-erp5-cluster:target
key template_kumofs template-kumofs:rendered
key template_mariadb template-mariadb:rendered
key template_memcached template-memcached:rendered
......@@ -297,10 +293,13 @@ extra-context =
[template-memcached]
< = template-jinja2-base
filename = instance-memcached.cfg
md5sum = 44c507e9eec1003beb99f9063b5e09be
md5sum = 346c864c1f119360eddb5e163f16d4f3
extra-context =
key dash_location dash:location
key memcached_location memcached:location
key dcron_location dcron:location
key gzip_location gzip:location
key kumo_location kumo:location
key logrotate_location logrotate:location
[template-erp5-single]
recipe = slapos.recipe.build:download
......@@ -309,11 +308,10 @@ md5sum = 2a4312202a3160f874c4fa3ee9155a1d
mode = 640
[template-erp5-cluster]
< = template-jinja2-base
filename = instance-erp5-cluster.cfg
md5sum = b4a9688ca7983fac5dd573e66c6e4263
extra-context =
key local_bt5_repository local-bt5-repository:list
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-erp5-cluster.cfg.in
md5sum = eecde68b9a266d8883042540ac077839
mode = 640
[template-varnish]
recipe = slapos.recipe.build:download
......@@ -349,24 +347,17 @@ python = python2.6
repository_id_list = erp5
[erp5]
# Recipe zerokspot.recipe.git is disabled, as is not possible to change its
# environment to use localy delivered git.
# plone.recipe.command can do same job, but it is controllable which binary
# will be used
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/erp5.git
branch = master
revision =
command = "${git:location}/bin/git" clone --quiet --branch "${:branch}" "${:repository}" "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi
update-command = cd "${:location}" && "${git:location}/bin/git" fetch && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --hard @{upstream} ; fi
git-executable = ${git:location}/bin/git
[fix-products-paths]
recipe = plone.recipe.command
stop-on-error = true
dir = ${erp5:location}
command =
for DIR in "${erp5:location}"; do cd "$DIR"; rm -f Products ; ln -s product Products; touch product/__init__.py; done
rm -f "${:dir}/Products" && ln -s product "${:dir}/Products" && touch "${:dir}/product/__init__.py"
update-command = ${:command}
[testrunner]
......@@ -401,6 +392,11 @@ initialization =
sys.path[:0] = sum((
glob.glob(os.path.join(x, 'Products', '*', 'tests'))
for x in extra_path_list), [])
sys.path[:0] = sum((
glob.glob(os.path.join(x, 'Products', '*', 'tests'))
for x in os.getenv('INSERT_PRODUCTS_PATH', '').split(os.pathsep)), [])
os.environ['PATH'] = '${jsl:location}/bin:%s' % os.environ['PATH']
os.environ['CGI_PATH'] = '${w3-validator:location}/httpd/cgi-bin'
[test_suite_runner]
# XXX: Workaround for fact ERP5Type is not an distribution and does not
......@@ -447,6 +443,8 @@ eggs =
ordereddict
paramiko
ply
pyflakes
pyPdf # should be replaced by PyPDF2, but it is not installable
python-magic
python-memcached
pytz
......@@ -463,6 +461,7 @@ eggs =
erp5.util
huBarcode
qrcode
spyne
# Zope
ZODB3
......@@ -515,9 +514,19 @@ scripts =
extra-paths =
${erp5:location}
[zodbanalyze]
recipe = zc.recipe.egg
python = python2.6
eggs =
ZODB3
erp5.util
entry-points =
zodbanalyze=erp5.util.zodbanalyze:main
scripts = zodbanalyze
[cloudooo-repository]
branch = master
revision = 4cdfffb3f81a0fdbb7b372d92de664e716f12d4b
revision = 168786a4c747d4dc4578a6428d39b3b2b3e1eb10
[mysql-python]
python = python2.6
......@@ -552,18 +561,42 @@ scripts =
Acquisition = 2.13.7nxd001
Products.DCWorkflow = 2.2.3nxd002
# specify dev version to be sure that an old released version is not used
cloudooo = 1.2.5-dev
# use newer version than specified in ZTK
lxml = 2.3.6
# Known version with works
numpy = 1.6.2
# test_UserManagerInterfaces in testERP5Security fails with 1.10.0.
Products.PluggableAuthService = 1.9.0
# official pysvn egg does not supports --include-dirs and
# --library-dirs, so we use our modified version
pysvn = 1.7.4nxd006
# modified version to support ipv6
python-memcached = 1.47-ipv6-1
# use newest version of pytz
pytz =
# Patched version which support python 2.6
PyXML = 0.8.4nxd001
# modified version that works fine for buildout installation
SOAPpy = 0.12.0nxd001
# we are still using this old stable version.
rdiff-backup = 1.0.5
# official pysvn egg does not supports --include-dirs and
# --library-dirs, so we use our modified version
pysvn = 1.7.4nxd006
# use dev version
setuptools = 0.6c12dev-r88846
# use newest version of slapos.cookbook
slapos.cookbook =
# modified version that works fine for buildout installation
SOAPpy = 0.12.0nxd001
# CMF 2.3 requries Zope 2.13.
Products.CMFCalendar = 2.2.2
......@@ -572,12 +605,14 @@ Products.CMFDefault = 2.2.2
Products.CMFTopic = 2.2.1
Products.CMFUid = 2.2.1
slapos.cookbook =
# Pinned versions
Flask = 0.9
GitPython = 0.3.2.RC1
Jinja2 = 2.6
MySQL-python = 1.2.4
PIL = 1.1.7
Paste = 1.7.5.1
PasteDeploy = 1.5.0
PasteScript = 1.7.5
Products.CMFActionIcons = 2.1.3
Products.DCWorkflowGraph = 0.4.1
......@@ -585,72 +620,66 @@ Products.ExternalEditor = 1.1.0
Products.GenericSetup = 1.7.3
Products.LongRequestLogger = 1.1.0
Products.MimetypesRegistry = 2.0.4
Products.PluggableAuthService = 1.9.0
Products.PluginRegistry = 1.3
Products.TIDStorage = 5.4.8
Pygments = 1.6
StructuredText = 2.11.1
WSGIUtils = 0.7
WebOb = 1.2.3
Werkzeug = 0.8.3
apache-libcloud = 0.11.4
apache-libcloud = 0.12.1
argparse = 1.2.1
async = 0.6.1
buildout-versions = 1.7
atomize = 0.1.1
cElementTree = 1.0.5-20051216
chardet = 2.1.1
coverage = 3.6
csp-eventlet = 0.7.0
elementtree = 1.2.7-20070827-preview
erp5.recipe.cmmiforcei686 = 0.1.3
erp5.util = 0.4.22
erp5.util = 0.4.33
erp5diff = 0.8.1.5
eventlet = 0.12.1
feedparser = 5.1.3
five.localsitemanager = 2.0.5
fpconst = 0.7.2
gitdb = 0.5.4
greenlet = 0.4.0
hexagonit.recipe.cmmi = 1.6
http-parser = 0.7.12
http-parser = 0.8.1
huBarcode = 0.63
inotifyx = 0.2.0
ipdb = 0.7
ipython = 0.13.1
meld3 = 0.6.10
mr.developer = 1.25
netaddr = 0.7.10
netifaces = 0.8
ordereddict = 1.1
paramiko = 1.10.0
plone.recipe.command = 1.1
ply = 3.4
polib = 1.0.2
polib = 1.0.3
psutil = 0.6.1
pyPdf = 1.13
pyflakes = 0.6.1
python-ldap = 2.4.10
python-magic = 0.4.3
python-memcached = 1.47-ipv6-1
qrcode = 2.4.2
qrcode = 2.5.1
requests = 1.1.0
restkit = 4.2.0
restkit = 4.2.1
rtjp-eventlet = 0.3.2
slapos.recipe.build = 0.11.5
slapos.core = 0.35.1
slapos.recipe.build = 0.11.6
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33
slapos.toolbox = 0.33.1
smmap = 0.8.2
socketpool = 0.5.2
spyne = 2.9.4
supervisor = 3.0b1
threadframe = 0.2
timerserver = 2.0.2
urlnorm = 1.1.2
uuid = 1.30
validictory = 0.9.0
xupdate-processor = 0.4
Flask = 0.9
GitPython = 0.3.2.RC1
PasteDeploy = 1.5.0
argparse = 1.2.1
atomize = 0.1.1
feedparser = 5.1.3
fpconst = 0.7.2
hexagonit.recipe.download = 1.6
inotifyx = 0.2.0
netaddr = 0.7.10
netifaces = 0.8
nose = 1.2.1
paramiko = 1.9.0
psutil = 0.6.1
pyflakes = 0.6.1
slapos.core = 0.34
supervisor = 3.0b1
xml-marshaller = 0.9.7
setuptools = 0.6c12dev-r88846
xupdate-processor = 0.4
{% if slap_software_type == software_type -%}
#############################
#
# Request erp5 production environnment
......@@ -104,3 +105,4 @@ smtp-url = smtp://localhost:25/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc/run
{% endif %}
......@@ -118,22 +118,25 @@ command = ${logrotate:wrapper}
# Deploy zope promises scripts
[promise-template]
recipe = slapos.cookbook:check_port_listening
path = ${basedirectory:promise}/kumofs
hostname = ${kumofs-instance:ip}
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-server]
<= promise-template
path = ${basedirectory:promise}/kumofs-server
port = ${kumofs-instance:server-port}
[promise-kumofs-server-listen]
<= promise-template
path = ${basedirectory:promise}/kumofs-server-listen
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-gateway]
<= promise-template
path = ${basedirectory:promise}/kumofs-gateway
port = ${kumofs-instance:gateway-port}
[promise-kumofs-manager]
<= promise-template
path = ${basedirectory:promise}/kumofs-manager
port = ${kumofs-instance:manager-port}
......@@ -62,26 +62,38 @@ 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
pt-align-binary = {{ perl_siteprefix }}/bin/pt-align
pt-archiver-binary = {{ perl_siteprefix }}/bin/pt-archiver
pt-collect-binary = {{ perl_siteprefix }}/bin/pt-collect
pt-config-diff-binary = {{ perl_siteprefix }}/bin/pt-config-diff
pt-deadlock-logger-binary = {{ perl_siteprefix }}/bin/pt-deadlock-logger
pt-diskstats-binary = {{ perl_siteprefix }}/bin/pt-diskstats
pt-duplicate-key-checker-binary = {{ perl_siteprefix }}/bin/pt-duplicate-key-checker
pt-fifo-split-binary = {{ perl_siteprefix }}/bin/pt-fifo-split
pt-find-binary = {{ perl_siteprefix }}/bin/pt-find
pt-fingerprint-binary = {{ perl_siteprefix }}/bin/pt-fingerprint
pt-fk-error-logger-binary = {{ perl_siteprefix }}/bin/pt-fk-error-logger
pt-heartbeat-binary = {{ perl_siteprefix }}/bin/pt-heartbeat
pt-index-usage-binary = {{ perl_siteprefix }}/bin/pt-index-usage
pt-ioprofile-binary = {{ perl_siteprefix }}/bin/pt-ioprofile
pt-kill-binary = {{ perl_siteprefix }}/bin/pt-kill
pt-log-player-binary = {{ perl_siteprefix }}/bin/pt-log-player
pt-mext-binary = {{ perl_siteprefix }}/bin/pt-mext
pt-mysql-summary-binary = {{ perl_siteprefix }}/bin/pt-mysql-summary
pt-online-schema-change-binary = {{ perl_siteprefix }}/bin/pt-online-schema-change
pt-pmp-binary = {{ perl_siteprefix }}/bin/pt-pmp
pt-query-advisor-binary = {{ perl_siteprefix }}/bin/pt-query-advisor
pt-query-digest-binary = {{ perl_siteprefix }}/bin/pt-query-digest
pt-show-grants-binary = {{ perl_siteprefix }}/bin/pt-show-grants
pt-sift-binary = {{ perl_siteprefix }}/bin/pt-sift
pt-slave-delay-binary = {{ perl_siteprefix }}/bin/pt-slave-delay
pt-slave-find-binary = {{ perl_siteprefix }}/bin/pt-slave-find
pt-slave-restart-binary = {{ perl_siteprefix }}/bin/pt-slave-restart
pt-stalk-binary = {{ perl_siteprefix }}/bin/pt-stalk
pt-summary-binary = {{ perl_siteprefix }}/bin/pt-summary
pt-table-checksum-binary = {{ perl_siteprefix }}/bin/pt-table-checksum
pt-table-sync-binary = {{ perl_siteprefix }}/bin/pt-table-sync
pt-table-usage-binary = {{ perl_siteprefix }}/bin/pt-table-usage
pt-tcp-model-binary = {{ perl_siteprefix }}/bin/pt-tcp-model
pt-trend-binary = {{ perl_siteprefix }}/bin/pt-trend
pt-upgrade-binary = {{ perl_siteprefix }}/bin/pt-upgrade
......
#############################
#
# Instanciate memcached
#
# No slapos parameter needed
#
#############################
# memcached-compatible volatile cache using kumofs
# that has no limitation for key length and data size
[buildout]
parts =
memcached-instance
publish-memcached-connection-information
promise
publish-kumofs-connection-information
kumofs-instance
logrotate
logrotate-entry-kumofs
cron
cron-entry-logrotate
promise-kumofs-server
promise-kumofs-server-listen
promise-kumofs-gateway
promise-kumofs-manager
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-kumofs-connection-information]
recipe = slapos.cookbook:publishurl
url = memcached://${kumofs-instance:ip}:${kumofs-instance:gateway-port}/
[kumofs-instance]
recipe = slapos.cookbook:generic.kumofs
# Network options
ip = ${slap-network-information:local-ipv4}
manager-port = 13401
server-port = 13501
server-listen-port = 13502
# previous memcached configuration
gateway-port = 11000
# previous memcached configuration
storage-size = 64m
# Paths: Running wrappers
gateway-wrapper = ${basedirectory:services}/volatile_kumofs_gateway
manager-wrapper = ${basedirectory:services}/volatile_kumofs_manager
server-wrapper = ${basedirectory:services}/volatile_kumofs_server
# Paths: Data
data-path = *#capsiz=${:storage-size}
# Paths: Logs
kumo-gateway-log = ${basedirectory:log}/kumo-gateway.log
kumo-manager-log = ${basedirectory:log}/kumo-manager.log
kumo-server-log = ${basedirectory:log}/kumo-server.log
# Binary information
kumo-gateway-binary = {{ kumo_location }}/bin/kumo-gateway
kumo-manager-binary = {{ kumo_location }}/bin/kumo-manager
kumo-server-binary = {{ kumo_location }}/bin/kumo-server
shell-path = {{ dash_location }}/bin/dash
[logrotate-entry-kumofs]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = kumofs
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log}
${kumofs-instance:kumo-server-log}
# rest of parts are candidates for some generic stuff
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
gzip-binary = {{ gzip_location }}/bin/gzip
gunzip-binary = {{ gzip_location }}/bin/gunzip
# Directories
wrapper = ${rootdirectory:bin}/logrotate
conf = ${rootdirectory:etc}/logrotate.conf
logrotate-entries = ${directory:logrotate-entries}
backup = ${directory:logrotate-backup}
state-file = ${rootdirectory:srv}/logrotate.status
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = ${rootdirectory:var}/log
services = ${rootdirectory:etc}/run
promise = ${rootdirectory:etc}/promise
run = ${rootdirectory:var}/run
backup = ${rootdirectory:srv}/backup
[directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = ${rootdirectory:etc}/cron.d
crontabs = ${rootdirectory:etc}/crontabs
cronstamps = ${rootdirectory:etc}/cronstamps
logrotate-backup = ${basedirectory:backup}/logrotate
logrotate-entries = ${rootdirectory:etc}/logrotate.d
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
srv = ${buildout:directory}/srv
bin = ${buildout:directory}/bin
service = ${:etc}/run
promise = ${:etc}/promise
[memcached-instance]
recipe = slapos.cookbook:generic.memcached
wrapper_path = ${directory:service}/memcached
binary_path = {{ memcached_location }}/bin/memcached
shell-path = {{ dash_location }}/bin/dash
ip = ${slap-network-information:local-ipv4}
port = 11000
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = {{ dcron_location }}/sbin/crond
cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps}
catcher = ${cron-simplelogger:wrapper}
binary = ${basedirectory:services}/crond
[publish-memcached-connection-information]
recipe = slapos.cookbook:publishurl
url = memcached://${memcached-instance:ip}:${memcached-instance:port}/
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${rootdirectory:bin}/cron_simplelogger
log = ${basedirectory:log}/cron.log
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
# Deploy zope promises scripts
[promise]
[promise-template]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/memcache
hostname = ${memcached-instance:ip}
port = ${memcached-instance:port}
hostname = ${kumofs-instance:ip}
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-server]
<= promise-template
path = ${basedirectory:promise}/kumofs-server
port = ${kumofs-instance:server-port}
[promise-kumofs-server-listen]
<= promise-template
path = ${basedirectory:promise}/kumofs-server-listen
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-gateway]
<= promise-template
path = ${basedirectory:promise}/kumofs-gateway
port = ${kumofs-instance:gateway-port}
[promise-kumofs-manager]
<= promise-template
path = ${basedirectory:promise}/kumofs-manager
port = ${kumofs-instance:manager-port}
......@@ -134,10 +134,10 @@ link-binary =
{{ parameter_dict['imagemagick'] }}/bin/identify
{{ parameter_dict['mariadb'] }}/bin/mysql
{{ parameter_dict['mariadb'] }}/bin/mysqldump
{{ parameter_dict['pdftk'] }}/bin/pdftk
{{ parameter_dict['sed'] }}/bin/sed
{{ parameter_dict['tesseract'] }}/bin/tesseract
{{ parameter_dict['w3m'] }}/bin/w3m
{{ parameter_dict['openssl'] }}/bin/openssl
{{ parameter_dict['poppler'] }}/bin/pdfinfo
{{ parameter_dict['poppler'] }}/bin/pdfseparate
{{ parameter_dict['poppler'] }}/bin/pdftotext
......
......@@ -196,10 +196,10 @@ link-binary =
{{ librsvg_location }}/bin/rsvg-convert
{{ mariadb_location }}/bin/mysql
{{ mariadb_location }}/bin/mysqldump
{{ pdftk_location }}/bin/pdftk
{{ sed_location }}/bin/sed
{{ tesseract_location }}/bin/tesseract
{{ w3m_location }}/bin/w3m
{{ openssl_location }}/bin/openssl
{{ poppler_location }}/bin/pdfinfo
{{ poppler_location }}/bin/pdfseparate
{{ poppler_location }}/bin/pdftotext
......@@ -207,6 +207,7 @@ link-binary =
{{ poppler_location }}/bin/pdfunite
{{ dmtx_utils_location }}/bin/dmtxwrite
{{ aspell_location }}/bin/aspell
{{ jsl_location }}/bin/jsl
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = {{ openssl_location }}/bin/openssl
......
......@@ -39,7 +39,6 @@ grep = {{ grep_location }}
imagemagick = {{ imagemagick_location }}
librsvg = {{ librsvg_location }}
mariadb = {{ mariadb_location }}
pdftk = {{ pdftk_location }}
sed = {{ sed_location }}
tesseract = {{ tesseract_location }}
w3m = {{ w3m_location }}
......@@ -48,6 +47,7 @@ poppler = {{ poppler_location }}
dmtx-utils = {{ dmtx_utils_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
zope-conf-template = {{ template_zope_conf }}
jsl = {{ jsl_location }}
[dynamic-template-tidstorage]
< = jinja2-template-base
......@@ -129,11 +129,11 @@ librsvg = {{ librsvg_location }}
logrotate = {{ logrotate_location }}
mariadb = {{ mariadb_location }}
openssl = {{ openssl_location }}
pdftk = {{ pdftk_location }}
poppler = {{ poppler_location }}
sed = {{ sed_location }}
tesseract = {{ tesseract_location }}
w3m = {{ w3m_location }}
jsl = {{ jsl_location }}
[dynamic-template-zope]
< = jinja2-template-base
......@@ -159,11 +159,11 @@ extra-context =
key logrotate_location dynamic-template-zope-parameters:logrotate
key mariadb_location dynamic-template-zope-parameters:mariadb
key openssl_location dynamic-template-zope-parameters:openssl
key pdftk_location dynamic-template-zope-parameters:pdftk
key poppler_location dynamic-template-zope-parameters:poppler
key sed_location dynamic-template-zope-parameters:sed
key tesseract_location dynamic-template-zope-parameters:tesseract
key w3m_location dynamic-template-zope-parameters:w3m
key jsl_location dynamic-template-zope-parameters:jsl
[template-erp5-single-parameters]
bin-directory = {{ bin_directory }}
......@@ -187,11 +187,30 @@ extra-context =
key template_zope dynamic-template-zope:rendered
key local_bt5_repository template-erp5-single-parameters:local_bt5_repository
[dynamic-template-cluster-parameters]
local-bt5-repository = {{ local_bt5_repository }}
[dynamic-template-cluster]
< = jinja2-template-base
template = {{ template_erp5_cluster }}
filename = instance-erp5-cluster.cfg
extra-context =
key local_bt5_repository dynamic-template-cluster-parameters:local-bt5-repository
# Must match the key id in [switch-softwaretype] which uses this section.
# XXX: it is dangerous to use buildout-style expansion in jinja context declaration
raw software_type ${:software-type}
software-type = cluster
# BBB: use "cluster" software type instead
[dynamic-template-production]
< = dynamic-template-cluster
software-type = production
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-erp5-single:rendered}
production = {{ template_erp5_cluster }}
cluster = {{ template_erp5_cluster }}
production = ${dynamic-template-production:rendered}
cluster = ${dynamic-template-cluster:rendered}
kumofs = {{ template_kumofs }}
memcached = {{ template_memcached }}
cloudooo = ${dynamic-template-cloudooo:rendered}
......
# This file is responsible of two things:
# This file is responsible of three things:
# 1/ Act as "Apache exporter"
# 2/ Act as "Mariadb backup infrastructure requester"
# 3/ Act as "Apache" instance
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
......@@ -9,27 +10,49 @@
extends = {{templateapache}}
{{templatepbsreadyexport}}
parts +=
{{ parts.replicate("mariadb", "3") }}
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
# Repeating parts from instance-apache-php.
# XXX-Cedric: how to simplify this?
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
promise
frontend-promise
content-promise
publish-connection-informations
{{ replicated.replicate("mariadb", "3", "mariadb-export", "mariadb-import") }}
# Nothing to do for the exporter. Just dummy part that does nothing.
# For httpd instance, PBS will directly pull data from srv/www.
# Nothing to do for the exporter. This wrapper is intended
# to produce the "dump" files that have to be backed up.
# So, in case of binary DB data, we would back up the ASCII dump
# files, or a similar data format that can be restored on any machine
# (i.e. postgres 'custom')
# In the case of an httpd instance, the src/www directory can be directly
# pulled from the PBS, we don't need to prepare anything.
[exporter]
wrapper = /usr/bin/true
wrapper = /bin/true
# State that we want to backup srv/www directory, not srv/backup.
# XXX-Cedric: works well, but doesn't work with big data.
[rdiff-backup-server]
path = ${directory:www}
# XXX-Cedric: resilient uses "urls" part to publish, but apache doesn't.
[urls]
<= publish-connection-informations
# Add "exporter" parameters to list of published connection parameters
[publish-connection-informations]
# XXX-Cedric: Long term goal: could be a recipe that requests an instance and
# bubbles ALL
# parameters of the requested instance. Requirement: aggregated publish.
<= resilient-publish-connection-parameter
# XXX-Cedric: resilient overwrites what's returned from request-mariadb
# XXX-Cedric: change the request method to return everything from
# getConnectionParameterDict()
[request-mariadb]
return = ssh-public-key ssh-url notification-id ip url
......@@ -3,29 +3,17 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# XXX-Cedric: is instance-apache-php needed?
#extends = ${instance-apache-php:output}
# ${pbsready-import:output}
extends = ${pbsready-import:output}
parts +=
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[directory]
srv = $${buildout:directory}/srv
www = $${:srv}/www/
# Nothing to do for the import. Just dummy part that does nothing.
# For httpd instance, PBS will directly push data to srv/www.
# XXX-Cedric: is it safe?
[exporter]
wrapper = /usr/bin/true
# XXX-Cedric: resilient uses "urls" part to publish, but apache doesn't.
[urls]
recipe = slapos.cookbook:publish
# XXX-Cedric: write a real backup system.
[importer]
wrapper = /bin/true
# State that we want to push to srv/www directory, not srv/backup.
[rdiff-backup-server]
......
[buildout]
extends = ${custom-application-deployment:path}
parts =
certificate-authority
......@@ -9,12 +10,12 @@ parts =
cron
cron-entry-logrotate
promise
slapmonitor
slapmonitor-xml
frontend-promise
content-promise
publish-connection-informations
${custom-application-deployment:part-list}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -37,6 +38,7 @@ tmp = $${buildout:directory}/tmp
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/service
scripts = $${rootdirectory:etc}/run
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise
......@@ -121,7 +123,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 = 33060
local-port = 3306
log-file = $${basedirectory:log}/stunnel.log
config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
......@@ -185,6 +187,15 @@ recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url}
#----------------
#--
#-- Common network parameters
[apache-network-configuration]
listening-ip = $${slap-network-information:global-ipv6}
listening-port = 8080
#----------------
#--
#-- Deploy Apache + PHP application.
......@@ -198,8 +209,8 @@ configuration = ${application-configuration:location}
htdocs = $${directory:www}
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
ip = $${apache-network-configuration:listening-ip}
port = $${apache-network-configuration:listening-port}
url = http://[$${:ip}]:$${:port}/
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
......@@ -240,7 +251,7 @@ name = Frontend
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url custom_domain
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
config-url = http://[$${apache-network-configuration:listening-ip}]:$${apache-network-configuration:listening-port}/
return = site_url
config-custom_domain = $${slap-parameter:domain}
......@@ -249,18 +260,18 @@ config-custom_domain = $${slap-parameter:domain}
#--
#-- Deploy slapmonitor.
[slapmonitor]
recipe = slapos.cookbook:slapmonitor
pid-file = $${basedirectory:run}/apache.pid
database-path = $${basedirectory:log}/slapmonitor.db
slapmonitor-path = ${buildout:bin-directory}/slapmonitor
path = $${basedirectory:services}/slapmonitor
[slapmonitor-xml]
recipe = slapos.cookbook:slapmonitor-xml
database-path = $${basedirectory:log}/slapmonitor.db
slapmonitor-xml-path = ${buildout:bin-directory}/slapmonitor-xml
path = $${directory:report}/slapmonitor-xml
#[slapmonitor]
#recipe = slapos.cookbook:slapmonitor
#pid-file = $${basedirectory:run}/apache.pid
#database-path = $${basedirectory:log}/slapmonitor.db
#slapmonitor-path = ${buildout:bin-directory}/slapmonitor
#path = $${basedirectory:services}/slapmonitor
#
#[slapmonitor-xml]
#recipe = slapos.cookbook:slapmonitor-xml
#database-path = $${basedirectory:log}/slapmonitor.db
#slapmonitor-xml-path = ${buildout:bin-directory}/slapmonitor-xml
#path = $${directory:report}/slapmonitor-xml
#----------------
......
......@@ -26,28 +26,29 @@ parts =
extends =
../resilient/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg
../../component/apache/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg
../../component/glib/buildout.cfg
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/perl/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/zlib/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/gzip/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/mydumper/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/perl/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/zlib/buildout.cfg
../resilient/buildout.cfg
../slapos.cfg
../../component/dash/buildout.cfg
../../component/curl/buildout.cfg
[mariadb]
# Compile dir is for plugins, there's no plugin in LAMP
......@@ -73,14 +74,14 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
output = ${buildout:directory}/instance-apache-php.cfg
md5sum = 0538b05d27d8a64e89f898c09eb57716
md5sum = 3e2d71d3684aac3e52d2f55794df96bf
mode = 0644
[instance-apache-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-import.cfg.in
output = ${buildout:directory}/instance-apache-import.cfg
md5sum = 7c5bb18f1dccb38ad043c33e224798e6
md5sum = f1dc2a71d362b5d2d36481ffefdd2293
mode = 0644
[instance-apache-export]
......@@ -94,7 +95,7 @@ context = key templateapache instance-apache-php:output
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = 6e544e4d6f8093fee1724b231e1e8f34
md5sum = 24c5d0db063e5343a3cb0db9d5fbc738
mode = 0644
[instance-resilient]
......@@ -109,31 +110,44 @@ context = key buildout buildout:bin-directory
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = efcf17ce8e1544738a64cc4f7025cec3
md5sum = f6dc9290194ad1fbe1ced553f5668922
mode = 0644
[instance-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/instance-mariadb.cfg
md5sum = b214f56ede1a9d10f243c245c804d3a5
md5sum = c328d11f76373f8c5928afedf2178afd
mode = 0644
[instance-mariadb-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg
md5sum = 8009627bb669d1fee0df030daa8d3bdc
md5sum = faf5826f4b27e362f34ad17db54b8c9a
mode = 0644
[instance-mariadb-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg
md5sum = 0513bf25fbb20cccd57f285c40d96498
md5sum = 0352896921ca1766b64f0b54f0f8c27e
mode = 0644
#----------------
#--
#-- Optional part allowing applications using this stack to run a custom
#-- instance.cfg at the end of Apache/PHP instance deployment.
#-- To use it in your application, just override those two parameters, like:
[custom-application-deployment]
# path = /path/to/instance-custom.cfg
# part-list = part1 part2
# See software/maarch/software.cfg for an example.
path =
part-list =
#----------------
#-- Dummy parts in case no application configuration file is needed
......@@ -144,13 +158,25 @@ location =
[application-configuration]
location =
#----------------
[custom-application-deployment]
# Optional part allowing applications using this stack to run a custom
# instance.cfg at the end of Apache/PHP instance deployment.
# To use it in your application, just override those two parameters, like:
# path = /path/to/instance-custom.cfg
# part-list =
# part1
# part2
# See software/tt-rss/software.cfg for an example.
path =
part-list =
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.toolbox
slapos.toolbox[lampconfigure]
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
......@@ -284,103 +310,89 @@ signature-certificate-list =
n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR
-----END CERTIFICATE-----
[versions]
# Fetch stable version of lxml, not beta
lxml = 3.0.2
Jinja2 = 2.6
MySQL-python = 1.2.4
Werkzeug = 0.8.3
apache-libcloud = 0.11.4
apache-libcloud = 0.12.3
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
lxml = 3.1.1
meld3 = 0.6.10
netaddr = 0.7.10
pycrypto = 2.6
pytz = 2012j
pytz = 2013b
rdiff-backup = 1.0.5
slapos.cookbook = 0.72.0
slapos.recipe.build = 0.11.5
slapos.cookbook = 0.78.0
slapos.recipe.build = 0.11.6
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33
slapos.toolbox = 0.34.0
smmap = 0.8.2
# Required by:
# slapos.core==0.35
# slapos.toolbox==0.33
# slapos.core==0.35.1
# slapos.toolbox==0.34.0
Flask = 0.9
# Required by:
# slapos.toolbox==0.33
# slapos.toolbox==0.34.0
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.33
# slapos.toolbox==0.34.0
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.33
# slapos.toolbox==0.34.0
feedparser = 5.1.3
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# Required by:
# slapos.core==0.35
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# slapos.toolbox==0.33
paramiko = 1.9.0
# slapos.toolbox==0.34.0
paramiko = 1.10.0
# Required by:
# slapos.toolbox==0.33
# slapos.toolbox==0.34.0
psutil = 0.6.1
# Required by:
# slapos.core==0.35
# slapos.core==0.35.1
pyflakes = 0.6.1
# Required by:
# slapos.cookbook==0.72.0
# slapos.core==0.35
# slapos.toolbox==0.33
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.0
# slapos.core==0.35.1
# slapos.toolbox==0.34.0
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.toolbox==0.33
slapos.core = 0.35
# slapos.toolbox==0.34.0
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.toolbox==0.33
# slapos.toolbox==0.34.0
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35
zope.interface = 4.0.3
# slapos.core==0.35.1
zope.interface = 4.0.5
cp.recipe.cmd = 0.4
# Required by:
# zope.testing==4.1.1
zope.exceptions = 4.0.5
# Required by:
# cp.recipe.cmd==0.4
zope.testing = 4.1.1
......@@ -18,9 +18,30 @@ parts +=
# Bubble up the parameters
[request-apache]
return = url ssh-public-key ssh-url notification-id ip url backend_url
# XXX: hardcoded values
config = domain number authorized-key notify ip-list namebase mariadb1-computer-guid pbs-mariadb1-computer-guid mariadb2-computer-guid pbs-mariadb2-computer-guid mariadb3-computer-guid pbs-mariadb3-computer-guid
config-mariadb1-computer-guid = ${slap-parameter:mariadb1-computer-guid}
config-pbs-mariadb1-computer-guid = ${slap-parameter:pbs-mariadb1-computer-guid}
config-mariadb2-computer-guid = ${slap-parameter:mariadb2-computer-guid}
config-pbs-mariadb2-computer-guid = ${slap-parameter:pbs-mariadb2-computer-guid}
config-mariadb3-computer-guid = ${slap-parameter:mariadb3-computer-guid}
config-pbs-mariadb3-computer-guid = ${slap-parameter:pbs-mariadb3-computer-guid}
config-domain = ${slap-parameter:domain}
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = ${request-apache:connection-backend_url}
url = ${request-apache:connection-url}
[slap-parameter]
# Default parameters for distributed deployment
# I.e state "backup1 of maria should go there, ..."
# XXX-Cedric: Hardcoded number of backups. Should be dynamically generated.
mariadb1-computer-guid =
pbs-mariadb1-computer-guid =
mariadb2-computer-guid =
pbs-mariadb2-computer-guid =
mariadb3-computer-guid =
pbs-mariadb3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
domain =
......@@ -2,14 +2,23 @@
extends = ${instance-mariadb:output}
${pbsready-export:output}
# Repeating parts from instance-mariadb.
parts +=
mariadb
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
urls
mariadb
stunnel
certificate-authority
ca-stunnel
logrotate
logrotate-entry-mariadb
logrotate-entry-stunnel
logrotate-entry-cron
cron
cron-entry-logrotate
slapmonitor
slapmonitor-xml
# Define exporter strategy
[exporter]
recipe = slapos.cookbook:mydumper
wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-exporter
......@@ -19,3 +28,7 @@ user = root
mydumper-binary = ${mydumper:location}/bin/mydumper
database = $${mariadb:database}
import = false
# Extends publish section with resilient parameters
[urls]
<= resilient-publish-connection-parameter
\ No newline at end of file
......@@ -2,13 +2,6 @@
extends = ${instance-mariadb:output}
${pbsready-import:output}
parts +=
mariadb
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer]
recipe = slapos.cookbook:mydumper
wrapper = $${rootdirectory:bin}/myloader
......
......@@ -194,7 +194,8 @@ recipe = slapos.cookbook:mysql
# Options
recovering = false
user = user
port = 3306
password = $${mysql-password:passwd}
port = 33060
ip = $${slap-network-information:local-ipv4}
database = db
......@@ -216,6 +217,11 @@ mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
mysqld-binary = ${mariadb:location}/bin/mysqld
[mysql-password]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.passwd
bytes = 4
#----------------
#--
......
# This file is responsible of three things:
# 1/ Act as "Apache exporter"
# 2/ Act as "Postgres backup infrastructure requester"
# 3/ Act as "Apache" instance
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
extends = {{templateapache}}
{{templatepbsreadyexport}}
parts +=
{{ parts.replicate("postgres", "3") }}
# Repeating parts from instance-apache-php.
# XXX-Cedric: how to simplify this?
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
promise
frontend-promise
content-promise
publish-connection-informations
{{ replicated.replicate("postgres", "3", "postgres-export", "postgres-import") }}
# Nothing to do for the exporter. This wrapper is intended
# to produce the "dump" files that have to be backed up.
# So, in case of binary DB data, we would back up the ASCII dump
# files, or a similar data format that can be restored on any machine
# (i.e. postgres 'custom')
# In the case of an httpd instance, the src/www directory can be directly
# pulled from the PBS, we don't need to prepare anything.
[exporter]
wrapper = /bin/true
# State that we want to backup srv/www directory, not srv/backup.
# XXX-Cedric: works well, but doesn't work with big data.
[rdiff-backup-server]
path = ${directory:www}
# Add "exporter" parameters to list of published connection parameters
[publish-connection-informations]
# XXX-Cedric: Long term goal: could be a recipe that requests an instance and
# bubbles ALL
# parameters of the requested instance. Requirement: aggregated publish.
<= resilient-publish-connection-parameter
# XXX-Cedric: resilient overwrites what's returned from request-postgres
# XXX-Cedric: change the request method to return everything from
# getConnectionParameterDict()
[request-postgres]
return = ssh-public-key ssh-url notification-id ip url
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
extends = ${pbsready-import:output}
[directory]
srv = $${buildout:directory}/srv
www = $${:srv}/www/
# Nothing to do for the import. Just dummy part that does nothing.
# For httpd instance, PBS will directly push data to srv/www.
# XXX-Cedric: write a real backup system.
[importer]
wrapper = /bin/true
# State that we want to push to srv/www directory, not srv/backup.
[rdiff-backup-server]
path = $${directory:www}
......@@ -57,6 +57,7 @@ logrotate-backup = $${basedirectory:backup}/logrotate
report = $${rootdirectory:etc}/report
stunnel-conf = $${rootdirectory:etc}/stunnel
xml-report = $${rootdirectory:var}/xml_report
www = $${rootdirectory:srv}/www/
[cadirectory]
recipe = slapos.cookbook:mkdirectory
......@@ -195,7 +196,7 @@ url = $${request-postgres:connection-url}
recipe = slapos.cookbook:apachephp
source = ${application:location}
htdocs = $${rootdirectory:srv}/www/
htdocs = $${directory:www}
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
......
[buildout]
ignore-existing = true
parts =
slapos-cookbook
apache-php-postgres
......@@ -15,11 +18,14 @@ parts =
instance-postgres-import
instance-postgres-export
#Contains the importer and exporter recipes for apache
instance-apache-import
instance-apache-export
extends =
../resilient/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg
../../component/apache/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
......@@ -29,6 +35,7 @@ extends =
../../component/rdiff-backup/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/dropbear/buildout.cfg
../resilient/buildout.cfg
../slapos.cfg
......@@ -48,21 +55,35 @@ strip-top-level-dir = true
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum = a482fa0e72839b4bd75b169ac1460d64
md5sum = 25d07b5101d5f566398686642ada4cee
mode = 0644
[instance-apache-php]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
output = ${buildout:directory}/instance-apache-php.cfg
md5sum = 72b70452d1c077cfcd0f268181506b8e
md5sum = 823257dda6f3068a38c6b69c771cf307
mode = 0644
[instance-apache-backup]
[instance-apache-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-backup.cfg.in
output = ${buildout:directory}/instance-apache-backup.cfg
md5sum = db879141c0b6a77ef8b3b7e699f5583a
url = ${:_profile_base_location_}/apache/instance-apache-import.cfg.in
output = ${buildout:directory}/instance-apache-import.cfg
md5sum = f1dc2a71d362b5d2d36481ffefdd2293
mode = 0644
[instance-apache-export]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/apache/instance-apache-export.cfg.jinja2
rendered = ${buildout:directory}/instance-apache-export.cfg
context = key templateapache instance-apache-php:output
key templatepbsreadyexport pbsready-export:output
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = bdc7e126567ece6bf93a9bb493e29fac
mode = 0644
[instance-resilient]
......@@ -70,16 +91,15 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg
context = key templateapache instance-apache-php:output
key dropbear dropbear:location
key buildout buildout:bin-directory
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = 46c7d8f691bd37d84e0bd03b83e51d14
md5sum = ef38aa9810ce20960382261f235abfcd
mode = 0644
[instance-postgres]
recipe = slapos.recipe.template
......@@ -99,7 +119,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in
output = ${buildout:directory}/instance-postgres-export.cfg
md5sum = 68080e5d861eb3474442211dd65c668b
md5sum = d95205a5fc2825e9709ed6db295111e2
mode = 0644
......@@ -155,7 +175,6 @@ eggs =
${psycopg2:egg}
slapos.toolbox
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
# + Cedric de Saint Martin signature certificate
......@@ -292,100 +311,115 @@ signature-certificate-list =
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.11.4
apache-libcloud = 0.12.1
async = 0.6.1
buildout-versions = 1.7
cp.recipe.cmd = 0.4
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
lxml = 3.0.2
meld3 = 0.6.10
netaddr = 0.7.10
psycopg2 = 2.4.6
plone.recipe.command = 1.1
pycrypto = 2.6
pytz = 2012h
rdiff-backup = 1.0.5
slapos.cookbook = 0.72.0
slapos.recipe.build = 0.11.6
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33.1
smmap = 0.8.2
# Required by:
# slapos.core==0.33.2-dev
# slapos.toolbox==0.32.1-dev
# slapos.core==0.35.1
# slapos.toolbox==0.33.1
Flask = 0.9
# Required by:
# slapos.toolbox==0.32.1-dev
# slapos.toolbox==0.33.1
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.32.1-dev
# slapos.toolbox==0.33.1
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.32.1-dev
# slapos.toolbox==0.33.1
feedparser = 5.1.3
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.6
# slapos.cookbook==0.74.1-dev
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.74.1-dev
# slapos.core==0.35.1
# xml-marshaller==0.9.7
lxml = 3.1.0
# Required by:
# slapos.core==0.33.2-dev
# slapos.cookbook==0.74.1-dev
netaddr = 0.7.10
# Required by:
# slapos.core==0.35.1
netifaces = 0.8
# Required by:
# slapos.toolbox==0.32.1-dev
paramiko = 1.9.0
# slapos.toolbox==0.33.1
paramiko = 1.10.0
# Required by:
# slapos.toolbox==0.32.1-dev
# slapos.toolbox==0.33.1
psutil = 0.6.1
# Required by:
# slapos.core==0.33.2-dev
pyflakes = 0.5.0
# slapos.recipe.maarch==0.4
psycopg2 = 2.4.6
# Required by:
# slapos.cookbook==0.70.1-dev
# slapos.core==0.33.2-dev
# slapos.toolbox==0.32.1-dev
# slapos.core==0.35.1
pyflakes = 0.6.1
# Required by:
# slapos.cookbook==0.74.1-dev
pytz = 2013b
# Required by:
# slapos.cookbook==0.74.1-dev
# slapos.core==0.35.1
# slapos.recipe.maarch==0.4
# slapos.toolbox==0.33.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.2
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.33.2-dev
supervisor = 3.0b1
# slapos.cookbook==0.74.1-dev
# slapos.toolbox==0.33.1
slapos.core = 0.35.1
# Required by:
# slapos.toolbox==0.32.1-dev
xml-marshaller = 0.9.7
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.33.2-dev
zope.interface = 4.0.2
cp.recipe.cmd = 0.4
plone.recipe.command = 1.1
slapos.recipe.build = 0.11.5
slapos.toolbox = 0.33
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.toolbox==0.33
slapos.core = 0.35
# slapos.cookbook==0.74.1-dev
# slapos.toolbox==0.33.1
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35
unittest2 = 0.5.1
# zope.testing==4.1.2
zope.exceptions = 4.0.6
# Required by:
# zope.testing==4.1.1
zope.exceptions = 4.0.5
# slapos.core==0.35.1
# zope.testing==4.1.2
zope.interface = 4.0.5
# Required by:
# cp.recipe.cmd==0.4
zope.testing = 4.1.1
zope.testing = 4.1.2
......@@ -4,172 +4,47 @@
{% import 'replicated' as replicated %}
[buildout]
extends =
{{templateapache}}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts +=
{{ parts.replicate("postgres","3") }}
request-apache-backup-1
request-apache-backup-2
request-pull-backup-server-apache-1
request-pull-backup-server-apache-backup-1
request-pull-backup-server-apache-2
request-pull-backup-server-apache-backup-2
{{ parts.replicate("apache", "3") }}
publish-connection-informations
apache-php
stunnel
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
dropbear-server
sshkeys-authority
dropbear-server-pbs-authorized-key
request-pull-backup-server
{{ replicated.replicate("postgres", "3", "postgres-export", "postgres-import") }}
[request-pull-backup-server]
<= request-pbs-common
name = PBS (Pull Backup Server)
return = ssh-key notification-url feeds-url
slave = false
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = ${directory:sshkeys}/requests
keys = ${directory:sshkeys}/keys
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = ${sshkeys-directory:requests}
keys-directory = ${sshkeys-directory:keys}
wrapper = ${basedirectory:services}/sshkeys_authority
keygen-binary = {{dropbear}}/bin/dropbearkey
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = ${dropbear-server:wrapper}
public-key = ${dropbear-server:rsa-keyfile}.pub
private-key = ${dropbear-server:rsa-keyfile}
wrapper = ${basedirectory:services}/sshd
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = ${slap-network-information:global-ipv6}
port = 2222
home = ${directory:ssh}
wrapper = ${rootdirectory:bin}/raw_sshd
shell = ${rdiff-backup-server:wrapper}
rsa-keyfile = ${directory:ssh}/server_key.rsa
dropbear-binary = {{dropbear}}/sbin/dropbear
[dropbear-server-pbs-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = ${request-pull-backup-server:connection-ssh-key}
[rdiff-backup-server]
<= apache-php
recipe = slapos.cookbook:pbs
client = false
path = ${apache-php:htdocs}
wrapper = ${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = {{buildout}}/rdiff-backup
[request-apache-backup-1]
<= slap-connection
recipe = slapos.cookbook:request
name = Apache Backup 1
software-url = ${slap-connection:software-release-url}
software-type = apache-backup
return = url ssh-url ssh-public-key
config = authorized-key proxy-url
config-authorized-key = ${request-pull-backup-server:connection-ssh-key}
config-proxy-url = ${publish-connection-informations:url}
[request-apache-backup-2]
<= slap-connection
recipe = slapos.cookbook:request
name = Apache Backup 2
software-url = ${slap-connection:software-release-url}
software-type = apache-backup
return = url ssh-url ssh-public-key
config = authorized-key proxy-url
config-authorized-key = ${request-pull-backup-server:connection-ssh-key}
config-proxy-url = ${publish-connection-informations:url}
[request-pull-backup-server-apache-1]
<= request-pbs-common
name = PBS pulling from Apache 1
config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
config-type = pull
config-server-key = ${sshkeys-dropbear:public-key-value}
config-notify = ${request-pull-backup-server:connection-notification-url}
config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache-pull
config-frequency = 30 * * * *
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[request-pull-backup-server-apache-2]
<= request-pbs-common
name = PBS pulling from Apache 2
config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
config-type = pull
config-server-key = ${sshkeys-dropbear:public-key-value}
config-notify = ${request-pull-backup-server:connection-notification-url}
config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache-pull
config-frequency = 30 * * * *
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[request-pull-backup-server-apache-backup-1]
<= request-pbs-common
name = PBS pushing to ${request-apache-backup-1:name}
config = url name type server-key on-notification
config-url = ${request-apache-backup-1:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-1:config-name}
config-type = push
config-server-key = ${request-apache-backup-1:connection-ssh-public-key}
config-on-notification = ${request-pull-backup-server:connection-feeds-url}${request-pull-backup-server-apache-1:config-notification-id}
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[request-pull-backup-server-apache-backup-2]
<= request-pbs-common
name = PBS pushing to ${request-apache-backup-2:name}
config = url name type server-key on-notification
config-url = ${request-apache-backup-2:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-2:config-name}
config-type = push
config-server-key = ${request-apache-backup-2:connection-ssh-public-key}
config-on-notification = ${request-pull-backup-server:connection-feeds-url}${request-pull-backup-server-apache-2:config-notification-id}
slave = true
sla = instance_guid
sla-instance_guid = ${request-pull-backup-server:instance_guid}
[directory]
ssh = ${rootdirectory:etc}/ssh
sshkeys = ${rootdirectory:srv}/sshkeys
{{ replicated.replicate("apache", "3", "apache-export", "apache-import") }}
# Bubble up the parameters
[request-apache]
return = url ssh-public-key ssh-url notification-id ip url backend_url
# XXX: hardcoded values
config = domain number authorized-key notify ip-list namebase postgres1-computer-guid pbs-postgres1-computer-guid postgres2-computer-guid pbs-postgres2-computer-guid postgres3-computer-guid pbs-postgres3-computer-guid maarch-sql-data-file
config-postgres1-computer-guid = ${slap-parameter:postgres1-computer-guid}
config-pbs-postgres1-computer-guid = ${slap-parameter:pbs-postgres1-computer-guid}
config-postgres2-computer-guid = ${slap-parameter:postgres2-computer-guid}
config-pbs-postgres2-computer-guid = ${slap-parameter:pbs-postgres2-computer-guid}
config-postgres3-computer-guid = ${slap-parameter:postgres3-computer-guid}
config-pbs-postgres3-computer-guid = ${slap-parameter:pbs-postgres3-computer-guid}
config-domain = ${slap-parameter:domain}
config-maarch-sql-data-file = ${slap-parameter:maarch-sql-data-file}
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = ${request-apache:connection-backend_url}
url = ${request-apache:connection-url}
[slap-parameter]
# Default parameters for distributed deployment
# I.e state "backup1 of postgres should go there, ..."
# XXX-Cedric: Hardcoded number of backups. Should be dynamically generated.
postgres1-computer-guid =
pbs-postgres1-computer-guid =
postgres2-computer-guid =
pbs-postgres2-computer-guid =
postgres3-computer-guid =
pbs-postgres3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
domain =
# the following parameters are specific to maarch
maarch-sql-data-file =
......@@ -14,7 +14,8 @@ resilient = ${instance-resilient:rendered}
postgres = ${instance-postgres:output}
postgres-import = ${instance-postgres-import:output}
postgres-export = ${instance-postgres-export:output}
apache-backup = ${instance-apache-backup:output}
apache-import = ${instance-apache-import:output}
apache-export = ${instance-apache-export:rendered}
#frozen creates a syntax error, meaning it can keep its data.
#It's dirty as hell, it needs to be replaced.
......
......@@ -19,3 +19,8 @@ bin = $${postgres-instance:bin}
pgdata-directory = $${postgres-instance:pgdata-directory}
backup-directory = $${postgres-instance:backup-directory}
dbname = $${postgres-instance:dbname}
# Extends publish section with resilient parameters
[urls]
<= resilient-publish-connection-parameter
......@@ -22,7 +22,7 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg
md5sum = d337ecde38c368a17a74c647b2598b29
md5sum = 9f4212a79f10bee8f6d75061943110e2
mode = 0644
[pbsready-import]
......@@ -31,7 +31,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg
md5sum = eda0c1574d8991f4f9e08e3707c2b04b
md5sum = 1b1308fd39476d48b5ca13db48ea6dc9
mode = 0644
[pbsready-export]
......@@ -40,7 +40,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg
md5sum = dd56f9c74e580475a17a9afb1d220390
md5sum = 5d9e20c436fd307e8e4ab224a9a65792
mode = 0644
[template-pull-backup]
......@@ -53,7 +53,7 @@ mode = 0644
[template-replicated]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum = 15ef411b2678fd2a14e0a4ccb6520310
md5sum = 9e20f283bf709c63c9c6692d5e1f8972
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
......
......@@ -2,9 +2,10 @@
extends = ${pbsready:output}
parts += cron-entry-backup
parts +=
cron-entry-backup
[urls]
[resilient-publish-connection-parameter]
notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-exporter:name}
[notifier-exporter]
......
......@@ -2,9 +2,11 @@
extends = ${pbsready:output}
parts += import-on-notification
parts +=
import-on-notification
resilient-publish-connection-parameter
[urls]
[resilient-publish-connection-parameter]
notification-url = http://[$${notifier:host}]:$${notifier:port}/notify
[import-on-notification]
......
[buildout]
parts +=
parts =
resiliency
urls
logrotate
logrotate-entry-cron
logrotate-entry-equeue
......@@ -145,11 +144,6 @@ etc = $${rootdirectory:etc}
#--
#-- Sets up an rdiff-backup server (with a dropbear server for ssh)
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
ip = $${slap-network-information:global-ipv6}
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
client = false
......@@ -179,7 +173,7 @@ callbacks = $${directory:notifier-callbacks}
id-file = $${rootdirectory:etc}/notifier.id
equeue-socket = $${equeue:socket}
host = $${slap-network-information:global-ipv6}
port = 8080
port = 65534
wrapper = $${basedirectory:services}/notifier
server-binary = ${buildout:bin-directory}/pubsubserver
notifier-binary = ${buildout:bin-directory}/pubsubnotifier
......@@ -232,4 +226,12 @@ recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
#----------------
#--
#-- Conncetion informations to re-use.
# XXX-Cedric: when "aggregation" system is done in libslap, directly publish.
[resilient-publish-connection-parameter]
recipe = slapos.cookbook:publish
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
ip = $${slap-network-information:global-ipv6}
......@@ -7,6 +7,9 @@ config-namebase = {{namebase}}
software-url = ${slap-connection:software-release-url}
## Every request is double to provide the 3 IPs.
## First, we request with ip-list parameter hardcoded.
## Then, we request the same thing without this.
## XXX-Cedric: is it useful?
[request-{{namebase}}]
<= resilient
slap-connection
......@@ -21,6 +24,7 @@ config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{na
config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}{% endfor %}
config-ip-list =
{% for id in range(1,nbbackup|int) %}
[request-{{namebase}}-pseudo-replicating-{{id}}]
......@@ -42,49 +46,23 @@ config-authorized-key = ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}
config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${:pbs-notification-id}
config-ip-list =
sla = computer_guid
sla-computer_guid = ${slap-parameter:{{namebase}}{{id}}-computer-guid}
{% endfor %}
[iplist]
config-ip-list = ${request-{{namebase}}:connection-ip}{% for j in range(1,nbbackup|int) %} ${request-{{namebase}}-pseudo-replicating-{{j}}:connection-ip}{% endfor %}
[request-{{namebase}}-2]
<= resilient
slap-connection
<= request-{{namebase}}
iplist
{{heriteLeader}}
recipe = slapos.cookbook:request
name = {{namebase}}0
software-url = ${slap-connection:software-release-url}
software-type = {{typeexport}}
return = ssh-public-key ssh-url notification-id ip
config = number authorized-key notify ip-list namebase
config-number = 0
config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %}
config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}{% endfor %}
{% for id in range(1,nbbackup|int) %}
[request-{{namebase}}-pseudo-replicating-{{id}}-2]
<= slap-connection
resilient
<= request-{{namebase}}-pseudo-replicating-{{id}}
iplist
{{heriteBackup}}
recipe = slapos.cookbook:request
name = {{namebase}}{{id}}
software-url = ${slap-connection:software-release-url}
software-type = {{typeimport}}
return = ssh-public-key ssh-url notification-url
pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-push
config = number authorized-key on-notification ip-list namebase
config-number = {{id}}
config-authorized-key = ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}
config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${:pbs-notification-id}
{% endfor %}
......@@ -112,6 +90,8 @@ software-type = pull-backup
name = PBS ({{namebase}} / {{id}})
return = ssh-key notification-url feeds-url
slave = false
sla = computer_guid
sla-computer_guid = ${slap-parameter:pbs-{{namebase}}{{id}}-computer-guid}
[request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-common
......@@ -146,4 +126,12 @@ sla = instance_guid
sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid}
{% endfor %}
[slap-parameter]
# Default parameters for distributed deployment
# I.e state "backup1 of maria should go there, ..."
{% for id in range(1,nbbackup|int) %}
{{namebase}}{{id}}-computer-guid =
pbs-{{namebase}}{{id}}-computer-guid =
{% endfor %}
{% endmacro %}
......@@ -3,7 +3,7 @@
[buildout]
# Developers need to add explicitely this part in their software profile
parts = slapos-cookbook
# parts = slapos-cookbook
# Generate list of automatically chosen eggs version
extensions +=
......@@ -22,6 +22,7 @@ exec-sitecustomize = false
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/
# Use only quite well working sites.
allow-hosts +=
......@@ -59,6 +60,7 @@ recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
hexagonit.recipe.download
inotifyx
netaddr
slapos.core
......@@ -68,9 +70,12 @@ eggs =
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-010
# zc.recipe.egg 2.0.0a is buggy
# Use xz-friendly hexagonit.recipe.download
hexagonit.recipe.download = 1.6nxd002
# zc.recipe.egg 2.x is for Buildout 2
zc.recipe.egg = 1.3.2
# Use own version of h.r.download to be able to open xz-like archives
hexagonit.recipe.download = 1.6nxd002
[networkcache]
download-cache-url = http://www.shacache.org/shacache
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment