Commit b57ae17a authored by Mayoro Diagne's avatar Mayoro Diagne

Merge branch 'master' into slappromise

parents 523efa17 f5b9bbc7
Changes Changes
======= =======
0.53 (Unreleased) 0.60 (Unreleased)
----------------- -----------------
* No change yet.
0.59 (2012-07-12)
-----------------
* Zabbix: add temperature monitoring using custom commands.
0.58 (2012-07-06)
-----------------
* Agent rewrite. [Vincent Pelletier]
0.57 (2012-06-22)
-----------------
* Do not use system curl. [Romain Courteaud]
0.56 (2012-06-18)
-----------------
* Add signalwrapper, generate.mac, generate.password recipes. [Romain
Courteaud]
0.55 (2012-06-18)
-----------------
* Add slapmonitor and slapreport recipes. [Mohamadou Mbengue]
0.54.1 (2012-06-18)
-----------------
* Fix 0.54 release containing wrong code in request.py.
0.54 (2012-06-18)
-----------------
* Apache frontend: won't block sending slave informations to SlapOS Master
in case of problem from one slave instance.[Cedric de Saint Martin]
* Apache frontend will send IP informations for slaves in case slave is about
custom domain. [Cedric de Saint Martin]
* Ability to use LAMP applications without configuration. [Cedric de Saint
Martin]
* Users can specify custom domain in LAMP applications. [Cedric de Saint
Martin]
0.53 (2012-06-07)
-----------------
* Switch slaprunner into generic recipe, and add cloud9 recipe. [Cedric de
Saint Martin]
0.52 (2012-05-16) 0.52 (2012-05-16)
----------------- -----------------
......
# CA certificates # CA certificates
[buildout] [buildout]
extends =
../patch/buildout.cfg
parts = parts =
ca-certificates ca-certificates
...@@ -14,8 +18,9 @@ download-only = true ...@@ -14,8 +18,9 @@ download-only = true
[ca-certificates] [ca-certificates]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 20120212 version = 20120623
url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_${:version}.tar.gz 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
patches = patches =
${ca-certificates-sbin-dir.patch:location}/${ca-certificates-sbin-dir.patch:filename} ${ca-certificates-sbin-dir.patch:location}/${ca-certificates-sbin-dir.patch:filename}
patch-options = -p0 patch-options = -p0
......
...@@ -14,6 +14,13 @@ parts = ...@@ -14,6 +14,13 @@ parts =
[cloud9] [cloud9]
<= cloud9-git <= cloud9-git
[node-sm]
recipe = slapos.recipe.build:npm
packages = sm
node = nodejs
environment =
PATH=${nodejs:location}/bin:%(PATH)s
[cloud9-git] [cloud9-git]
# Online IDE written in javascript/node.js # Online IDE written in javascript/node.js
# URL : c9.io # URL : c9.io
...@@ -21,12 +28,13 @@ parts = ...@@ -21,12 +28,13 @@ parts =
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
commit = 97db1467c517d265438684bd2a70b0b76ee282f6 commit = 9caeac82317bdf8e9942fd17676325234cfadac8
repository = https://github.com/ajaxorg/cloud9.git repository = https://github.com/ajaxorg/cloud9.git
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
git-binary = ${git:location}/bin/git git-binary = ${git:location}/bin/git
npm-binary = ${nodejs-0.4:location}/bin/node ${npm:location}/bin/npm npm-binary = ${nodejs:location}/bin/node ${nodejs:location}/bin/npm
command = export GIT_SSL_NO_VERIFY=true; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${:git-binary} submodule update --init && cd support/jsdav && PATH=${nodejs-0.4:location}/bin:$PATH LDFLAGS=-L${libxml2:location}/lib ${:npm-binary} install) || (rm -fr ${:location}; exit 1) environment = export GIT_SSL_NO_VERIFY=true; export PATH=${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin/:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location};
command = ${:environment} (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${node-sm:location}/node_modules/.bin/sm install) || (rm -fr ${:location}; exit 1)
update-command = update-command =
[cloud9-npm] [cloud9-npm]
...@@ -36,10 +44,10 @@ update-command = ...@@ -36,10 +44,10 @@ update-command =
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location} # NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = slapos.recipe.npm recipe = slapos.recipe.npm
# Node part has to be specified, otherwise system node is used. # Node part has to be specified, otherwise system node is used.
node = nodejs-0.6 node = nodejs
# List of packages to install # List of packages to install
packages = packages =
cloud9 cloud9==0.7
# Specify environment jsDAV (dependency of cloud9) needs libxml2 # Specify environment jsDAV (dependency of cloud9) needs libxml2
environment = environment =
LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib
\ No newline at end of file
...@@ -6,25 +6,24 @@ extends = ...@@ -6,25 +6,24 @@ extends =
../curl/buildout.cfg ../curl/buildout.cfg
../libexpat/buildout.cfg ../libexpat/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../perl/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
parts = parts =
git git
[git] [git]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.8.4.tar.gz url = http://git-core.googlecode.com/files/git-1.7.10.4.tar.gz
md5sum = e6c3319d76d52a830af395046fc56143 md5sum = 68319d593d051ef76c26e945bbd2d7ac
configure-options = configure-options =
--with-curl=${curl:location} --with-curl=${curl:location}
--with-openssl=${openssl:location} --with-openssl=${openssl:location}
--with-zlib=${zlib:location} --with-zlib=${zlib:location}
--with-expat=${libexpat:location} --with-expat=${libexpat:location}
--with-perl=${perl:location}/bin/perl
--without-python --without-python
--without-tcltk --without-tcltk
environment = environment =
PATH=${curl:location}/bin:%(PATH)s NO_PERL=y
PATH=${curl:location}/bin:${gettext:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -23,6 +23,13 @@ md5sum = d65f61829cfbcd5062f49db2b00bd6fe ...@@ -23,6 +23,13 @@ md5sum = d65f61829cfbcd5062f49db2b00bd6fe
filename = mysql_create_system_tables__no_test.patch filename = mysql_create_system_tables__no_test.patch
download-only = true download-only = true
[mariadb-handler_socket-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = be3bd5a5cc5fc56a398e6762494c8232
filename = plugin_handler_socket_libhsclient_fatal.patch
download-only = true
[mariadb] [mariadb]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 5.3.5-ga version = 5.3.5-ga
...@@ -57,6 +64,7 @@ configure-options = ...@@ -57,6 +64,7 @@ configure-options =
patch-options = -p0 patch-options = -p0
patches = patches =
${mariadb-no_test-patch:location}/${mariadb-no_test-patch:filename} ${mariadb-no_test-patch:location}/${mariadb-no_test-patch:filename}
${mariadb-handler_socket-patch:location}/${mariadb-handler_socket-patch:filename}
environment = environment =
CPPFLAGS=-I${ncurses:location}/include -I${readline5:location}/include CPPFLAGS=-I${ncurses:location}/include -I${readline5:location}/include
LDFLAGS=-Wl,-rpath=${libevent:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline5:location}/lib -Wl,-rpath=${readline5:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-Wl,-rpath=${libevent:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline5:location}/lib -Wl,-rpath=${readline5:location}/lib -Wl,-rpath=${zlib:location}/lib
......
# inspired by handlersocket-1.0.6-80-g88bf1e0-1.1-nmu.diff by gregoa@debian.org
Description: add missing include to avoid FTBFS with gcc 4.7
bug-debian: http://bugs.debian.org/667198
More informations: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667198
Author: gregor herrmann <gregoa@debian.org>
--- plugin/handler_socket/libhsclient/fatal.cpp
+++ plugin/handler_socket/libhsclient/fatal.cpp
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
+#include <unistd.h>
#include "fatal.hpp"
...@@ -12,12 +12,13 @@ parts = ...@@ -12,12 +12,13 @@ parts =
[nodejs] [nodejs]
# Server-side Javascript. # Server-side Javascript.
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz url = http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz
md5sum = a12766ae4003c9712927d1fa134ed9f6 md5sum = f5669a9717422b811c6bad1cc961b1e5
configure-options = configure-options =
--openssl-includes=${openssl:location}/include --openssl-includes=${openssl:location}/include
--openssl-libpath=${openssl:location}/lib --openssl-libpath=${openssl:location}/lib
environment = environment =
HOME=${buildout:parts-directory}/${:_buildout_section_name_}
PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/ PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig/
CPPFLAGS=-I${zlib:location}/include CPPFLAGS=-I${zlib:location}/include
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
extends = extends =
../ca-certificates/buildout.cfg ../ca-certificates/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../patch/buildout.cfg
parts = parts =
openssl openssl
...@@ -30,6 +31,7 @@ download-only = true ...@@ -30,6 +31,7 @@ download-only = true
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.1.tar.gz url = https://www.openssl.org/source/openssl-1.0.1.tar.gz
md5sum = 134f168bc2a8333f19f81d684841710b md5sum = 134f168bc2a8333f19f81d684841710b
patch-binary = ${patch:location}/bin/patch
patches = patches =
${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename} ${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename}
${openssl-exlibs.patch:location}/${openssl-exlibs.patch:filename} ${openssl-exlibs.patch:location}/${openssl-exlibs.patch:filename}
......
...@@ -11,7 +11,7 @@ extends = ...@@ -11,7 +11,7 @@ extends =
[pkgconfig] [pkgconfig]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz
md5sum = 47525c26a9ba7ba14bf85e01509a7234 md5sum = 47525c26a9ba7ba14bf85e01509a7234
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
# build pkg-config twice so that second configure can use pkg-config # build pkg-config twice so that second configure can use pkg-config
......
...@@ -19,6 +19,7 @@ extends = ...@@ -19,6 +19,7 @@ extends =
../sqlite3/buildout.cfg ../sqlite3/buildout.cfg
../swig/buildout.cfg ../swig/buildout.cfg
../zlib/buildout.cfg ../zlib/buildout.cfg
../patch/buildout.cfg
parts = parts =
slapos slapos
...@@ -47,7 +48,7 @@ allowed-eggs-from-site-packages = ...@@ -47,7 +48,7 @@ allowed-eggs-from-site-packages =
[environment] [environment]
# Note: For now original PATH is appeneded to the end, as not all tools are # Note: For now original PATH is appeneded to the end, as not all tools are
# provided by SlapOS # provided by SlapOS
PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:$PATH PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:${patch:location}/bin:$PATH
CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include
CPPFLAGS=${:CFLAGS} CPPFLAGS=${:CFLAGS}
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -112,47 +113,53 @@ scripts = ...@@ -112,47 +113,53 @@ scripts =
slapproxy = slapos.proxy:main slapproxy = slapos.proxy:main
[versions] [versions]
zc.buildout = 1.6.0-dev-SlapOS-004 zc.buildout = 1.6.0-dev-SlapOS-006
# Generated by buildout-versions
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5
Werkzeug = 0.8.3 Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
collective.recipe.template = 1.9 collective.recipe.template = 1.9
hexagonit.recipe.cmmi = 1.5.0 docutils = 0.9.1
lxml = 2.3.4 hexagonit.recipe.cmmi = 1.6
ipython = 0.13
lxml = 2.3.5
meld3 = 0.6.8 meld3 = 0.6.8
netaddr = 0.7.6 netaddr = 0.7.7
slapos.core = 0.25 slapos.core = 0.27
slapos.libnetworkcache = 0.12 slapos.libnetworkcache = 0.12
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
Flask = 0.8 Flask = 0.9
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # netaddr==0.7.7
hexagonit.recipe.download = 1.5.0 Sphinx = 1.1.3
# Required by: # Required by:
# slapos.core==0.25 # hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.core==0.27
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
# slapos.libnetworkcache==0.12 # slapos.libnetworkcache==0.12
# supervisor==3.0a12 # supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-004 # zc.buildout==1.6.0-dev-SlapOS-006
# zope.interface==3.8.0 # zope.interface==4.0.1
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.core==0.25 # slapos.core==0.27
zope.interface = 3.8.0 zope.interface = 4.0.1
...@@ -4,8 +4,8 @@ parts = ...@@ -4,8 +4,8 @@ parts =
[zabbix-agent] [zabbix-agent]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.10.tar.gz?download url = http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.1.tar.gz?download
md5sum = 7e89f80c1822787c0831f7c0dbefcd7b md5sum = 3b301aa4f2b7cb5ede46884b9c7873e1
configure-options = configure-options =
--enable-agent --enable-agent
--enable-ipv6 --enable-ipv6
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.53-dev' version = '0.60-dev'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
...@@ -49,6 +49,7 @@ setup(name=name, ...@@ -49,6 +49,7 @@ setup(name=name,
'certificate_authority.request = slapos.recipe.certificate_authority:Request', 'certificate_authority.request = slapos.recipe.certificate_authority:Request',
'check_port_listening = slapos.recipe.check_port_listening:Recipe', 'check_port_listening = slapos.recipe.check_port_listening:Recipe',
'check_url_available = slapos.recipe.check_url_available:Recipe', 'check_url_available = slapos.recipe.check_url_available:Recipe',
'cloud9 = slapos.recipe.cloud9:Recipe',
'cron = slapos.recipe.dcron:Recipe', 'cron = slapos.recipe.dcron:Recipe',
'cron.d = slapos.recipe.dcron:Part', 'cron.d = slapos.recipe.dcron:Part',
'davstorage = slapos.recipe.davstorage:Recipe', 'davstorage = slapos.recipe.davstorage:Recipe',
...@@ -59,10 +60,10 @@ setup(name=name, ...@@ -59,10 +60,10 @@ setup(name=name,
'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe', 'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe',
'equeue = slapos.recipe.equeue:Recipe', 'equeue = slapos.recipe.equeue:Recipe',
'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe',
'generate_output_if_input_not_null = slapos.recipe.generate_output_if_input_not_null:Recipe',
'generate.mac = slapos.recipe.generatemac:Recipe', 'generate.mac = slapos.recipe.generatemac:Recipe',
'generate.password = slapos.recipe.generatepassword:Recipe',
'nbdserver = slapos.recipe.nbdserver:Recipe', 'nbdserver = slapos.recipe.nbdserver:Recipe',
'generic.onetimeupload = slapos.recipe.generic_onetimeupload:Recipe', 'onetimeupload = slapos.recipe.onetimeupload:Recipe',
'helloworld = slapos.recipe.helloworld:Recipe', 'helloworld = slapos.recipe.helloworld:Recipe',
'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe',
'firefox = slapos.recipe.firefox:Recipe', 'firefox = slapos.recipe.firefox:Recipe',
...@@ -108,6 +109,8 @@ setup(name=name, ...@@ -108,6 +109,8 @@ setup(name=name,
'siptester = slapos.recipe.siptester:SipTesterRecipe', 'siptester = slapos.recipe.siptester:SipTesterRecipe',
'simplelogger = slapos.recipe.simplelogger:Recipe', 'simplelogger = slapos.recipe.simplelogger:Recipe',
'slaprunner = slapos.recipe.slaprunner:Recipe', 'slaprunner = slapos.recipe.slaprunner:Recipe',
'slapmonitor = slapos.recipe.slapmonitor:Recipe',
'slapreport = slapos.recipe.slapreport:Recipe',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request', 'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request',
'sphinx= slapos.recipe.sphinx:Recipe', 'sphinx= slapos.recipe.sphinx:Recipe',
...@@ -131,6 +134,7 @@ setup(name=name, ...@@ -131,6 +134,7 @@ setup(name=name,
'erp5.test = slapos.recipe.erp5_test:Recipe', 'erp5.test = slapos.recipe.erp5_test:Recipe',
'generic.varnish = slapos.recipe.generic_varnish:Recipe', 'generic.varnish = slapos.recipe.generic_varnish:Recipe',
'webchecker = slapos.recipe.web_checker:Recipe', 'webchecker = slapos.recipe.web_checker:Recipe',
'signalwrapper= slapos.recipe.signal_wrapper:Recipe',
], ],
'slapos.recipe.nosqltestbed.plugin': [ 'slapos.recipe.nosqltestbed.plugin': [
'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed', 'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed',
......
...@@ -34,76 +34,45 @@ from slapos.recipe.librecipe import GenericSlapRecipe ...@@ -34,76 +34,45 @@ from slapos.recipe.librecipe import GenericSlapRecipe
import json import json
import ConfigParser import ConfigParser
# XXX: BaseSlapRecipe and GenericSlapRecipe are deprecated, use
# GenericBaseRecipe and move partition parameter fetching to software release.
class Recipe(BaseSlapRecipe, GenericSlapRecipe): class Recipe(BaseSlapRecipe, GenericSlapRecipe):
def install(self): def install(self):
self.path_list = [] self.path_list = []
self.crond = self.installCrond() crond = self.installCrond()
slap = slapos.slap.slap() slap = slapos.slap.slap()
computer_id = self.computer_id slap.initializeConnection(self.server_url, self.key_file, self.cert_file)
computer_partition_id = self.computer_partition_id parameter_dict = slap.registerComputerPartition(
server_url = self.server_url self.computer_id,
key_file = self.key_file self.computer_partition_id,
cert_file = self.cert_file ).getInstanceParameterDict()
slap.initializeConnection(server_url, key_file, cert_file)
self.computer_partition = slap.registerComputerPartition(
computer_id, computer_partition_id)
self.parameter_dict = self.computer_partition.getInstanceParameterDict()
# XXX: should probably expect one more (SR-originating) parameter instead
# of using self.work_directory .
configuration_path = os.path.join(self.work_directory, "agent.cfg") configuration_path = os.path.join(self.work_directory, "agent.cfg")
configuration = ConfigParser.SafeConfigParser() with open(configuration_path, "w") as configuration:
configuration.add_section("agent") configuration.write(parameter_dict["configuration"])
configuration.set("agent", "portal_url", self.parameter_dict["portal_url"]) agent_crond_path = os.path.join(crond, "agent")
configuration.set("agent", "master_url", self.parameter_dict["master_url"]) with open(agent_crond_path, "w") as agent_crond:
configuration.set("agent", "report_url", self.parameter_dict["report_url"]) agent_crond.write("*/5 * * * * %s -S %s --pidfile=%s --log=%s "
key_filepath = os.path.join(self.work_directory, "key") "%s 2>&1 > /dev/null\n" % (
key_file = open(key_filepath, "w") self.options["python_binary"],
key_file.write(self.parameter_dict["key"]) self.options["agent_binary"],
key_file.close() self.options["pidfile"],
configuration.set("agent", "key_file", key_filepath) self.options["log"],
cert_filepath = os.path.join(self.work_directory, "cert") configuration_path,
cert_file = open(cert_filepath, "w") ))
cert_file.write(self.parameter_dict["cert"])
cert_file.close()
configuration.set("agent", "cert_file", cert_filepath)
configuration.set("agent", "maximum_software_installation_duration",
self.parameter_dict["maximum_software_installation_duration"])
configuration.set("agent", "software_live_duration",
self.parameter_dict["software_live_duration"])
configuration.set("agent", "computer_list",
self.parameter_dict["computer_list"])
configuration.set("agent", "software_list",
self.parameter_dict["software_list"])
configuration.set("agent", "log_directory", self.options["log_directory"])
configuration.set("agent", "state_file", self.options["state_file"])
state = open(self.options["state_file"], "w")
state.write('')
state.close()
configuration.add_section("software_uri")
software_list = json.loads(self.parameter_dict["software_list"])
for software in software_list:
configuration.set("software_uri", software, self.parameter_dict[software])
configuration.write(open(configuration_path, "w")) return self.path_list + [configuration_path, agent_crond_path]
agent_crond_path = os.path.join(self.crond, "agent")
agent_crond = open(agent_crond_path, "w")
agent_crond.write("*/3 * * * * %s -S %s" % \
(self.options["python_binary"],
"%s --pidfile=%s %s" % \
(self.options["agent_binary"], self.options["pidfile"],
configuration_path)))
agent_crond.close()
return self.path_list + [configuration_path, key_filepath, cert_filepath, agent_crond_path]
def installCrond(self): def installCrond(self):
_, self.ws = self.egg.working_set() _, ws = self.egg.working_set()
timestamps = self.createDataDirectory('cronstamps') timestamps = self.createDataDirectory('cronstamps')
cron_output = os.path.join(self.log_directory, 'cron-output') cron_output = os.path.join(self.log_directory, 'cron-output')
self._createDirectory(cron_output) self._createDirectory(cron_output)
catcher = zc.buildout.easy_install.scripts([('catchcron', catcher = zc.buildout.easy_install.scripts([('catchcron',
__name__ + '.catdatefile', 'catdatefile')], self.ws, sys.executable, __name__ + '.catdatefile', 'catdatefile')], ws, sys.executable,
self.bin_directory, arguments=[cron_output])[0] self.bin_directory, arguments=[cron_output])[0]
self.path_list.append(catcher) self.path_list.append(catcher)
cron_d = os.path.join(self.etc_directory, 'cron.d') cron_d = os.path.join(self.etc_directory, 'cron.d')
...@@ -111,7 +80,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe): ...@@ -111,7 +80,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
self._createDirectory(cron_d) self._createDirectory(cron_d)
self._createDirectory(crontabs) self._createDirectory(crontabs)
wrapper = zc.buildout.easy_install.scripts([('crond', wrapper = zc.buildout.easy_install.scripts([('crond',
'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs,
'-t', timestamps, '-f', '-l', '5', '-M', catcher] '-t', timestamps, '-f', '-l', '5', '-M', catcher]
......
...@@ -33,6 +33,7 @@ import zc.buildout ...@@ -33,6 +33,7 @@ import zc.buildout
import zc.recipe.egg import zc.recipe.egg
import ConfigParser import ConfigParser
import re import re
import traceback
class Recipe(BaseSlapRecipe): class Recipe(BaseSlapRecipe):
...@@ -78,7 +79,7 @@ class Recipe(BaseSlapRecipe): ...@@ -78,7 +79,7 @@ class Recipe(BaseSlapRecipe):
# Future work may allow to choose between http and https (or both?) # Future work may allow to choose between http and https (or both?)
scheme = 'http://' scheme = 'http://'
self.logger.info('processing slave instance: %s' % reference) self.logger.info('Processing slave instance: %s' % reference)
# Check for mandatory slave fields # Check for mandatory slave fields
if backend_url is None: if backend_url is None:
...@@ -88,8 +89,14 @@ class Recipe(BaseSlapRecipe): ...@@ -88,8 +89,14 @@ class Recipe(BaseSlapRecipe):
# Check for custom domain (like mypersonaldomain.com) # Check for custom domain (like mypersonaldomain.com)
# If no custom domain, use generated one. # If no custom domain, use generated one.
domain = slave_instance.get('custom_domain', # Note: if we get an empty custom_domain parameter, we ignore it
"%s.%s" % (reference.replace("-", "").lower(), frontend_domain_name)) domain = slave_instance.get('custom_domain')
if isinstance(domain, basestring):
domain = domain.strip()
if domain is None or domain.strip() == '':
domain = "%s.%s" % (reference.replace("-", "").lower(),
frontend_domain_name)
# Define the URL where the instance will be available # Define the URL where the instance will be available
# WARNING: we use default ports (443, 80) here. # WARNING: we use default ports (443, 80) here.
slave_dict[reference] = "%s%s/" % (scheme, domain) slave_dict[reference] = "%s%s/" % (scheme, domain)
...@@ -149,13 +156,24 @@ class Recipe(BaseSlapRecipe): ...@@ -149,13 +156,24 @@ class Recipe(BaseSlapRecipe):
# Send connection informations about each slave # Send connection informations about each slave
for reference, url in slave_dict.iteritems(): for reference, url in slave_dict.iteritems():
self.setConnectionDict(dict(site_url=url), reference) self.logger.debug("Sending connection parameters of slave "
"instance: %s" % reference)
try:
connection_dict = {
'frontend_ipv6_address': self.getGlobalIPv6Address(),
'frontend_ipv4_address': self.getLocalIPv4Address(),
'site_url': url
}
self.setConnectionDict(connection_dict, reference)
except:
self.logger.fatal("Error while sending slave %s informations: %s",
reference, traceback.format_exc())
# Then set it for master instance # Then set it for master instance
self.setConnectionDict( self.setConnectionDict(
dict(site_url=apache_parameter_dict["site_url"], dict(site_url=apache_parameter_dict["site_url"],
domain_ipv6_address=self.getGlobalIPv6Address(), frontend_ipv6_address=self.getGlobalIPv6Address(),
domain_ipv4_address=self.getLocalIPv4Address())) frontend_ipv4_address=self.getLocalIPv4Address()))
# Promises # Promises
promise_config = dict( promise_config = dict(
......
...@@ -85,6 +85,8 @@ class Recipe(GenericBaseRecipe): ...@@ -85,6 +85,8 @@ class Recipe(GenericBaseRecipe):
with open(secret_key_filename, 'r') as secret_key_file: with open(secret_key_filename, 'r') as secret_key_file:
secret_key = secret_key_file.read() secret_key = secret_key_file.read()
# Generate application configuration file
if self.options.get('template'):
application_conf = dict(mysql_database=self.options['mysql-database'], application_conf = dict(mysql_database=self.options['mysql-database'],
mysql_user=self.options['mysql-username'], mysql_user=self.options['mysql-username'],
mysql_password=self.options['mysql-password'], mysql_password=self.options['mysql-password'],
......
...@@ -36,6 +36,7 @@ class Recipe(GenericBaseRecipe): ...@@ -36,6 +36,7 @@ class Recipe(GenericBaseRecipe):
config = { config = {
'url': self.options['url'], 'url': self.options['url'],
'shell_path': self.options['dash_path'], 'shell_path': self.options['dash_path'],
'curl_path': self.options['curl_path'],
} }
# XXX-Cedric in this script, curl won't check certificate # XXX-Cedric in this script, curl won't check certificate
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# BEWARE: It will be overwritten automatically # BEWARE: It will be overwritten automatically
URL="%(url)s" URL="%(url)s"
CODE=$(curl -k -sL $URL -w %%{http_code} -o /dev/null) CODE=$(%(curl_path)s -k -sL $URL -w %%{http_code} -o /dev/null)
if [ $CODE -eq 000 ]; then if [ $CODE -eq 000 ]; then
echo "$URL is not available (server not reachable)" >&2 echo "$URL is not available (server not reachable)" >&2
......
...@@ -25,47 +25,36 @@ ...@@ -25,47 +25,36 @@
# #
############################################################################## ##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
import os
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
"""Generate an output from one or several input and a template. """Deploy a fully operational cloud9 service."""
Take "input-list" buildout parameter as input. def _options(self, options):
Each input of the list is separated by \n self.ip = options['ip'].strip()
Each input contains : self.port = options['port'].strip()
1/ The parameter to use (like mybuildoutpart:myparameter) self.git = options['git-binary'].strip()
2/ The name of the input to use as key. self.node_executable = options['node-binary'].strip()
self.cloud9 = options['cloud9'].strip()
self.workdir = options['working-directory'].strip()
self.wrapper = options['wrapper'].strip()
# Set cloud9 access URL
options['access-url'] = 'http://[%s]:%s' % (self.ip, self.port)
If all parameters in input are found, create an "output" parameter from a def install(self):
"template" parameter. The "template" parameter is just a string containing path_list = []
python parameters (like %(mykey)s).
Will produce nothing if one element of "input_list" doesn't exist. environment = {
Will raise if any input reference non-existent buildout part. 'PATH': os.path.dirname(self.git) + ':' + os.environ['PATH'],
}
Example : cloud9_args = [self.node_executable, self.cloud9, '-l', self.ip, '-p',
[get-output] self.port, '-w', self.workdir]
recipe = slapos.cookbook:generate_output_if_input_not_null
input-list =
firstkey mybuildoutpart:myparameter
otherkey myotherbuildoutpart:myotherparameter
template = I want to get %(key)s and %(otherkey)s
This example will produce an "output" parameter if myparameter and wrapper = self.createPythonScript(self.wrapper,
myotherparameter are defined. 'slapos.recipe.librecipe.execute.executee',
""" (cloud9_args, environment)
def __init__(self, buildout, name, options): )
# Get all inputs path_list.append(wrapper)
input_dict = {}
for line in options['input-list'].strip().split('\n'):
key, buildout_parameter = line.split(' ')
buildout_part, parameter_name = buildout_parameter.split(':')
parameter_value = buildout[buildout_part].get(parameter_name)
# If any parameter is not defined, don't do anything
if not parameter_value:
return
input_dict[key] = parameter_value
# Generate output
options['output'] = options['template'] % input_dict
def install(self): return path_list
return []
############################################################################## ##############################################################################
# #
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved. # Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
...@@ -26,15 +25,26 @@ ...@@ -26,15 +25,26 @@
# #
############################################################################## ##############################################################################
import random import random
import os
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options): def __init__(self, buildout, name, options):
if os.path.exists(options['storage-path']):
open_file = open(options['storage-path'], 'r')
options['mac-address'] = open_file.read()
open_file.close()
if options.get('mac-address', '') == '':
# First octet has to represent a locally administered address # First octet has to represent a locally administered address
octet_list = [254] + [random.randint(0x00, 0xff) for x in range(5)] octet_list = [254] + [random.randint(0x00, 0xff) for x in range(5)]
options['mac-address'] = ':'.join(['%02x' % x for x in octet_list]) options['mac-address'] = ':'.join(['%02x' % x for x in octet_list])
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self): def install(self):
return [] open_file = open(self.options['storage-path'], 'w')
open_file.write(self.options['mac-address'])
open_file.close()
return [self.options['storage-path']]
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import random
import os
import binascii
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options):
if os.path.exists(options['storage-path']):
open_file = open(options['storage-path'], 'r')
options['passwd'] = open_file.read()
open_file.close()
if options.get('passwd', '') == '':
options['passwd'] = binascii.hexlify(os.urandom(
int(options.get('bytes', '24'))))
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
open_file = open(self.options['storage-path'], 'w')
open_file.write(self.options['passwd'])
open_file.close()
return [self.options['storage-path']]
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
# #
############################################################################## ##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
import binascii
import os import os
import sys import sys
...@@ -33,11 +32,6 @@ class Recipe(GenericBaseRecipe): ...@@ -33,11 +32,6 @@ class Recipe(GenericBaseRecipe):
""" """
kvm instance configuration. kvm instance configuration.
""" """
def __init__(self, buildout, name, options):
options['passwd'] = binascii.hexlify(os.urandom(4))
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self): def install(self):
config = dict( config = dict(
tap_interface=self.options['tap'], tap_interface=self.options['tap'],
......
...@@ -32,7 +32,7 @@ if not os.path.exists(disk_path): ...@@ -32,7 +32,7 @@ if not os.path.exists(disk_path):
subprocess.Popen(['%(qemu_img_path)s', 'create' ,'-f', 'qcow2', subprocess.Popen(['%(qemu_img_path)s', 'create' ,'-f', 'qcow2',
'%(disk_path)s', '%(disk_size)sG']) '%(disk_path)s', '%(disk_size)sG'])
kvm_argument_list = ['kvm', '-net', 'nic,macaddr=%(mac_address)s', kvm_argument_list = ['%(qemu_path)s', '-enable-kvm', '-net', 'nic,macaddr=%(mac_address)s',
'-net', 'tap,ifname=%(tap_interface)s,script=no,downscript=no', '-net', 'tap,ifname=%(tap_interface)s,script=no,downscript=no',
'-smp', '%(smp_count)s', '-smp', '%(smp_count)s',
'-m', '%(ram_size)s', '-m', '%(ram_size)s',
......
...@@ -33,11 +33,6 @@ class Recipe(GenericBaseRecipe): ...@@ -33,11 +33,6 @@ class Recipe(GenericBaseRecipe):
""" """
kvm instance configuration. kvm instance configuration.
""" """
def __init__(self, buildout, name, options):
options['key'] = binascii.hexlify(os.urandom(24))
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self): def install(self):
config = dict( config = dict(
ip=self.options['ip'], ip=self.options['ip'],
......
...@@ -36,6 +36,7 @@ class Recipe(object): ...@@ -36,6 +36,7 @@ class Recipe(object):
slap = slapmodule.slap() slap = slapmodule.slap()
self.software_release_url = options['software-url'] self.software_release_url = options['software-url']
self.name = options['name']
slap.initializeConnection(options['server-url'], slap.initializeConnection(options['server-url'],
options.get('key-file'), options.get('key-file'),
...@@ -73,7 +74,7 @@ class Recipe(object): ...@@ -73,7 +74,7 @@ class Recipe(object):
options['config-%s' % config_parameter] options['config-%s' % config_parameter]
self.instance = self.request(options['software-url'], software_type, self.instance = self.request(options['software-url'], software_type,
options['name'], partition_parameter_kw=partition_parameter_kw, self.name, partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, shared=self.isSlave) filter_kw=filter_kw, shared=self.isSlave)
self.failed = None self.failed = None
...@@ -92,13 +93,14 @@ class Recipe(object): ...@@ -92,13 +93,14 @@ class Recipe(object):
try: try:
status = self.instance.getState() status = self.instance.getState()
except slapmodule.NotFoundError: except slapmodule.NotFoundError:
status = "not ready yet, please try again" status = 'not ready yet, please try again'
# XXX-Cedric : currently raise an error. So swallow it...
except AttributeError: except AttributeError:
status = "unknown" status = 'unknown'
self.logger.error("Connection parameter %s not found. " error_message = 'Connection parameter %s not found. '\
"Status of requested instance is : %s." % (self.failed, status)) 'Requested instance is currently %s. If this error persists, '\
raise KeyError("Connection parameter %s not found. " % self.failed) 'check status of this instance.' % (self.failed, status)
self.logger.error(error_message)
raise KeyError(error_message)
return [] return []
update = install update = install
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
return [
self.createPythonScript(
self.options['wrapper-path'],
'slapos.recipe.librecipe.execute.execute_with_signal_translation',
[self.options['wrapped-path']]
)
]
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
"""
Slapmonitor instance configuration.
"""
def __init__(self, buildout, name, options):
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
config = dict(
pid_file_path=self.options['pid-file'],
database_path=self.options['database-path'],
slapmonitor_path = self.options['slapmonitor-path'],
shell_path=self.options['shell-path'],
)
# Runners
runner_path = self.createExecutable(
self.options['path'],
self.substituteTemplate(self.getTemplateFilename('slapmonitor_run.in'),
config))
return [runner_path]
def update(self):
pass
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
#
exec %(slapmonitor_path)s %(pid_file_path)s %(database_path)s
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
"""
Slapmonitor instance configuration.
"""
def __init__(self, buildout, name, options):
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
config = dict(
pid_file_path=self.options['pid-file'],
consumption_log_path=self.options['consumption-log-path'],
database_path=self.options['database-path'],
slapreport_path = self.options['slapreport-path'],
logbox_ip = self.options['logbox-ip'],
logbox_port = self.options['logbox-port'],
logbox_user = self.options['logbox-user'],
logbox_passwd = self.options['logbox-passwd'],
shell_path=self.options['shell-path'],
)
# Runners
runner_path = self.createExecutable(
self.options['path'],
self.substituteTemplate(self.getTemplateFilename('slapreport_run.in'),
config))
return [runner_path]
def update(self):
pass
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
#
exec %(slapreport_path)s %(pid_file_path)s %(consumption_log_path)s %(database_path)s %(logbox_ip)s %(logbox_port)s %(logbox_user)s %(logbox_passwd)s
...@@ -24,74 +24,71 @@ ...@@ -24,74 +24,71 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
from slapos.recipe.librecipe import BaseSlapRecipe from slapos.recipe.librecipe import GenericBaseRecipe
import os import os
import pkg_resources
import sys
import zc.buildout
import zc.recipe.egg
class Recipe(GenericBaseRecipe):
def _options(self, options):
self.ipv4 = options['ipv4'].strip()
self.ipv6 = options['ipv6'].strip()
self.proxy_port = options['proxy_port'].strip()
self.runner_port = options['runner_port'].strip()
self.workdir = options['working-directory'].strip()
self.software_directory = options['software-directory'].strip()
self.instance_directory = options['instance-directory'].strip()
self.partition_amount = options['partition-amount'].strip()
self.cloud9_url = options['cloud9-url'].strip()
# Set slaprunner access URL
options['access-url'] = 'http://[%s]:%s' % (self.ipv6, self.runner_port)
def install(self):
path_list = []
class Recipe(BaseSlapRecipe):
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
ipv4 = self.getLocalIPv4Address()
ipv6 = self.getGlobalIPv6Address()
proxy_port = '50000'
runner_port = '50000'
cloud9_port = '30000'
workdir = self.createDataDirectory('runner')
software_root = os.path.join(workdir, 'software')
instance_root = os.path.join(workdir, 'instance')
configuration = dict( configuration = dict(
software_root=software_root, software_root=self.software_directory,
instance_root=instance_root, instance_root=self.instance_directory,
master_url='http://%s:%s/' % (ipv4, proxy_port), master_url='http://%s:%s/' % (self.ipv4, self.proxy_port),
computer_id='slaprunner', computer_id='slaprunner',
partition_amount=7, partition_amount=self.partition_amount,
slapgrid_sr=self.options['slapgrid_sr'], slapgrid_sr=self.options['slapgrid_sr'],
slapgrid_cp=self.options['slapgrid_cp'], slapgrid_cp=self.options['slapgrid_cp'],
slapproxy=self.options['slapproxy'], slapproxy=self.options['slapproxy'],
supervisor=self.options['supervisor'], supervisor=self.options['supervisor'],
supervisord_config=os.path.join(instance_root, 'etc', supervisord_config=os.path.join(self.instance_directory, 'etc',
'supervisord.conf'), 'supervisord.conf'),
runner_workdir=workdir, runner_workdir=self.workdir,
runner_host=ipv6, etc=self.etc,
runner_port=runner_port, runner_host=self.ipv6,
ipv4_address=ipv4, runner_port=self.runner_port,
ipv6_address=ipv6, ipv4_address=self.ipv4,
proxy_host=ipv4, ipv6_address=self.ipv6,
proxy_port=proxy_port, proxy_host=self.ipv4,
proxy_database=os.path.join(workdir, 'proxy.db'), proxy_port=self.proxy_port,
git=self.options['git'], proxy_database=os.path.join(self.workdir, 'proxy.db'),
cloud9_url='http://[%s]:%s' % (ipv6, cloud9_port), git=self.options['git-binary'],
ssh_client=self.options['ssh_client'], ssh_client=self.options['ssh_client'],
public_key=self.options['public_key'], public_key=self.options['public_key'],
private_key=self.options['private_key'], private_key=self.options['private_key'],
cloud9_url=self.cloud9_url
) )
config_file = self.createConfigurationFile('slapos.cfg',
self.substituteTemplate(pkg_resources.resource_filename(__name__, config_file = self.createFile(self.options['slapos.cfg'],
'template/slapos.cfg.in'), configuration)) self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'),
self.path_list.append(config_file) configuration))
path_list.append(config_file)
environment = dict( environment = dict(
PATH=os.path.dirname(self.options['git']) + ':' + os.environ['PATH'], PATH=os.path.dirname(self.options['git-binary']) + ':' + os.environ['PATH'],
GIT_SSH=self.options['ssh_client'] GIT_SSH=self.options['ssh_client']
) )
workdir = os.path.join(workdir, 'project')
if not os.path.exists(workdir):
os.mkdir(workdir)
launch_args = [self.options['slaprunner'].strip(), config_file, '--debug'] launch_args = [self.options['slaprunner'].strip(), config_file, '--debug']
cloud9_args = [self.options['node-bin'].strip(), self.options['cloud9'].strip(),
'-l', ipv6, '-p', cloud9_port, '-w', workdir] wrapper = self.createPythonScript(self.options['wrapper'],
self.path_list.extend(zc.buildout.easy_install.scripts([('slaprunner', 'slapos.recipe.librecipe.execute.executee',
'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable, (launch_args, environment)
self.wrapper_directory, arguments=[launch_args, environment])) )
self.path_list.extend(zc.buildout.easy_install.scripts([('cloud9IDE', path_list.append(wrapper)
'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable,
self.wrapper_directory, arguments=[cloud9_args, environment])) return path_list
self.setConnectionDict(dict(slaprunner_url='http://[%s]:%s' % (ipv6, runner_port),
cloud9_url='http://[%s]:%s' % (ipv6, cloud9_port)))
return self.path_list
...@@ -3,6 +3,7 @@ software_root = %(software_root)s ...@@ -3,6 +3,7 @@ software_root = %(software_root)s
instance_root = %(instance_root)s instance_root = %(instance_root)s
master_url = %(master_url)s master_url = %(master_url)s
computer_id = %(computer_id)s computer_id = %(computer_id)s
maximal_delay = 0
[slapformat] [slapformat]
partition_amount = %(partition_amount)s partition_amount = %(partition_amount)s
......
...@@ -124,5 +124,6 @@ class Recipe(BaseSlapRecipe): ...@@ -124,5 +124,6 @@ class Recipe(BaseSlapRecipe):
self.parameter_dict['hostname'], self.parameter_dict['hostname'],
self.parameter_dict['server']) self.parameter_dict['server'])
self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'], self.setConnectionDict(dict(ip=zabbix_agentd_conf['ip'],
name=zabbix_agentd_conf['hostname'], port=zabbix_agentd_conf['port'])) name=zabbix_agentd_conf['hostname'],
port=str(zabbix_agentd_conf['port'])))
return self.path_list return self.path_list
...@@ -229,5 +229,13 @@ ListenIP=%(ip)s ...@@ -229,5 +229,13 @@ ListenIP=%(ip)s
# Mandatory: no # Mandatory: no
# Default: # Default:
# UserParameter= # UserParameter=
UserParameter=custom_sensor.temp1,sensors | grep "temp1" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.temp2,sensors | grep "temp2" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core0,sensors | grep "Core 0" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core1,sensors | grep "Core 1" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core2,sensors | grep "Core 2" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.core3,sensors | grep "Core 3" | sed -e "s/.* +//" | sed -e "s/.C.*//"
UserParameter=custom_sensor.fan1,sensors | grep "fan1" | sed -e "s/.* //" | sed -e "s/ .*//"
UserParameter=custom_sensor.fan2,sensors | grep "fan2" | sed -e "s/.* //" | sed -e "s/ .*//"
%(user_parameter_string)s %(user_parameter_string)s
testing agent
=============
Testing agent simulates a normal user interacting with vifib master. It requests software release installation or software instance instiaction randomly from time to time. SlapOS clients then run these commands remotely. It is the testing agent determining whether an error occurs.
Usage
=====
Request a testing agent instance from vifib with following parameters:
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="configuration">[DEFAULT]
# ConfigParser's magic section.
computer_list = ["COMP-607"]
master_url = https://slap.vifib.com/
# Note that certificates are now literally in the configuration, meaning
# you may decide to specify different ones for each test. Likewise for
# master_url.
key = -----BEGIN PRIVATE KEY-----
MII[...]
[...]
-----END PRIVATE KEY-----
cert = -----BEGIN CERTIFICATE-----
MII[...]
[...]
-----END CERTIFICATE-----
[agent]
# This section is special: it contains configuration.
# Does not make use of values coming from [DEFAULT] (well, it
# necessarily contains them, but they are not used).
node_title = ...
test_title = ...
project_title = ...
task_count = 2 # Number of tests to run concurrently
report_url = # report_url, find details in erp5 for details
# All other sections are individual tests, whatever they are named.
[test-apache]
# Software release URL
url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
# Optional request_kw parameters: if not provided, will only test SR
# build. Depending on your slap version, it may be required to provide
# a "software_type" parameter, even if you want the default type.
request_kw = {
"filter_kw": {"computer_guid": "..."},
"partition_parameter_kw": {
"domain": "example.com"
}
}
# All are in seconds.
max_install_duration = 3000
max_uninstall_duration = 360
max_request_duration = 700
max_destroy_duration = 360
[impossible-apache]
url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
max_install_duration = 1
max_uninstall_duration = 1
[impossible-apache-2]
url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
max_install_duration = 660
max_uninstall_duration = 1
</parameter>
</instance>
[buildout] [buildout]
parts = parts =
rootdirectory
instance instance
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
...@@ -9,17 +8,16 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -9,17 +8,16 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance] [instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = ${instance-recipe:egg}:${instance-recipe:module}
agent_binary = ${buildout:directory}/bin/agent agent_binary = ${buildout:directory}/bin/agent
report_start = ${buildout:directory}/bin/report_start
report_stop = ${buildout:directory}/bin/report_stop
dcrond_binary = ${dcron:location}/sbin/crond dcrond_binary = ${dcron:location}/sbin/crond
python_binary = ${python2.7:location}/bin/python python_binary = ${python2.7:location}/bin/python
pidfile = $${buildout:directory}/agent.pid pidfile = $${rootdirectory:run}/agent.pid
log_directory = $${buildout:directory}/var/log log = $${rootdirectory:agentlog}/agent.log
state_file = $${buildout:directory}/state.cfg
[rootdirectory] [rootdirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/ run = $${buildout:directory}/etc/run
run = $${rootdirectory:etc}/run/ agentlog = $${buildout:directory}/var/log/agent
var = $${buildout:directory}/var/ srv = $${buildout:directory}/srv
log = $${rootdirectory:var}/log/ bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
[buildout] [buildout]
# develop =
# /opt/slapdev
# /opt/slapos.toolbox
extends = extends =
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/python-2.7/buildout.cfg ../../component/python-2.7/buildout.cfg
...@@ -31,7 +26,7 @@ eggs = ${instance-recipe:egg} ...@@ -31,7 +26,7 @@ eggs = ${instance-recipe:egg}
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
md5sum = 2e1a7a68b18de68b163e98a5f92cc776 md5sum = c7cb98594f394d05baedabe424643f6f
mode = 0644 mode = 0644
[eggs] [eggs]
...@@ -41,6 +36,7 @@ eggs = ...@@ -41,6 +36,7 @@ eggs =
${lxml-python:egg} ${lxml-python:egg}
slapos.cookbook slapos.cookbook
slapos.toolbox slapos.toolbox
erp5.util
[lxml-python] [lxml-python]
python = python2.7 python = python2.7
...@@ -53,7 +49,7 @@ eggs = ...@@ -53,7 +49,7 @@ eggs =
${lxml-python:egg} ${lxml-python:egg}
slapos.core slapos.core
slapos.cookbook slapos.cookbook
slapos.toolbox slapos.toolbox[agent]
[networkcache] [networkcache]
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
......
[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
<?php
/**
* @file
* Drupal site-specific configuration file.
*
* IMPORTANT NOTE:
* This file may have been set to read-only by the Drupal installation
* program. If you make changes to this file, be sure to protect it again
* after making your modifications. Failure to remove write permissions
* to this file is a security risk.
*
* The configuration file to be loaded is based upon the rules below.
*
* The configuration directory will be discovered by stripping the
* website's hostname from left to right and pathname from right to
* left. The first configuration file found will be used and any
* others will be ignored. If no other configuration file is found
* then the default configuration file at 'sites/default' will be used.
*
* For example, for a fictitious site installed at
* http://www.drupal.org/mysite/test/, the 'settings.php'
* is searched in the following directories:
*
* - sites/www.drupal.org.mysite.test
* - sites/drupal.org.mysite.test
* - sites/org.mysite.test
*
* - sites/www.drupal.org.mysite
* - sites/drupal.org.mysite
* - sites/org.mysite
*
* - sites/www.drupal.org
* - sites/drupal.org
* - sites/org
*
* - sites/default
*
* If you are installing on a non-standard port number, prefix the
* hostname with that number. For example,
* http://www.drupal.org:8080/mysite/test/ could be loaded from
* sites/8080.www.drupal.org.mysite.test/.
*/
/**
* Database settings:
*
* The $databases array specifies the database connection or
* connections that Drupal may use. Drupal is able to connect
* to multiple databases, including multiple types of databases,
* during the same request.
*
* Each database connection is specified as an array of settings,
* similar to the following:
* @code
* array(
* 'driver' => 'mysql',
* 'database' => 'databasename',
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
* 'port' => 3306,
* 'prefix' => 'myprefix_',
* 'collation' => 'utf8_general_ci',
* );
* @endcode
*
* The "driver" property indicates what Drupal database driver the
* connection should use. This is usually the same as the name of the
* database type, such as mysql or sqlite, but not always. The other
* properties will vary depending on the driver. For SQLite, you must
* specify a database file name in a directory that is writable by the
* webserver. For most other drivers, you must specify a
* username, password, host, and database name.
*
* Some database engines support transactions. In order to enable
* transaction support for a given database, set the 'transactions' key
* to TRUE. To disable it, set it to FALSE. Note that the default value
* varies by driver. For MySQL, the default is FALSE since MyISAM tables
* do not support transactions.
*
* For each database, you may optionally specify multiple "target" databases.
* A target database allows Drupal to try to send certain queries to a
* different database if it can but fall back to the default connection if not.
* That is useful for master/slave replication, as Drupal may try to connect
* to a slave server when appropriate and if one is not available will simply
* fall back to the single master server.
*
* The general format for the $databases array is as follows:
* @code
* $databases['default']['default'] = $info_array;
* $databases['default']['slave'][] = $info_array;
* $databases['default']['slave'][] = $info_array;
* $databases['extra']['default'] = $info_array;
* @endcode
*
* In the above example, $info_array is an array of settings described above.
* The first line sets a "default" database that has one master database
* (the second level default). The second and third lines create an array
* of potential slave databases. Drupal will select one at random for a given
* request as needed. The fourth line creates a new database with a name of
* "extra".
*
* For a single database configuration, the following is sufficient:
* @code
* $databases['default']['default'] = array(
* 'driver' => 'mysql',
* 'database' => 'databasename',
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
* 'prefix' => 'main_',
* 'collation' => 'utf8_general_ci',
* );
* @endcode
*
* You can optionally set prefixes for some or all database table names
* by using the 'prefix' setting. If a prefix is specified, the table
* name will be prepended with its value. Be sure to use valid database
* characters only, usually alphanumeric and underscore. If no prefixes
* are desired, leave it as an empty string ''.
*
* To have all database names prefixed, set 'prefix' as a string:
* @code
* 'prefix' => 'main_',
* @endcode
* To provide prefixes for specific tables, set 'prefix' as an array.
* The array's keys are the table names and the values are the prefixes.
* The 'default' element is mandatory and holds the prefix for any tables
* not specified elsewhere in the array. Example:
* @code
* 'prefix' => array(
* 'default' => 'main_',
* 'users' => 'shared_',
* 'sessions' => 'shared_',
* 'role' => 'shared_',
* 'authmap' => 'shared_',
* ),
* @endcode
* You can also use a reference to a schema/database as a prefix. This maybe
* useful if your Drupal installation exists in a schema that is not the default
* or you want to access several databases from the same code base at the same
* time.
* Example:
* @code
* 'prefix' => array(
* 'default' => 'main.',
* 'users' => 'shared.',
* 'sessions' => 'shared.',
* 'role' => 'shared.',
* 'authmap' => 'shared.',
* );
* @endcode
* NOTE: MySQL and SQLite's definition of a schema is a database.
*
* Advanced users can add or override initial commands to execute when
* connecting to the database server, as well as PDO connection settings. For
* example, to enable MySQL SELECT queries to exceed the max_join_size system
* variable, and to reduce the database connection timeout to 5 seconds:
*
* @code
* $databases['default']['default'] = array(
* 'init_commands' => array(
* 'big_selects' => 'SET SQL_BIG_SELECTS=1',
* ),
* 'pdo' => array(
* PDO::ATTR_TIMEOUT => 5,
* ),
* );
* @endcode
*
* WARNING: These defaults are designed for database portability. Changing them
* may cause unexpected behavior, including potential data loss.
*
* @see DatabaseConnection_mysql::__construct
* @see DatabaseConnection_pgsql::__construct
* @see DatabaseConnection_sqlite::__construct
*
* Database configuration format:
* @code
* $databases['default']['default'] = array(
* 'driver' => 'mysql',
* 'database' => 'databasename',
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
* 'prefix' => '',
* );
* $databases['default']['default'] = array(
* 'driver' => 'pgsql',
* 'database' => 'databasename',
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
* 'prefix' => '',
* );
* $databases['default']['default'] = array(
* 'driver' => 'sqlite',
* 'database' => '/path/to/databasefilename',
* );
* @endcode
*/
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => '%(mysql_database)s',
'username' => '%(mysql_user)s',
'password' => '%(mysql_password)s',
'host' => '%(mysql_host)s',
'prefix' => '',
);
/**
* Access control for update.php script.
*
* If you are updating your Drupal installation using the update.php script but
* are not logged in using either an account with the "Administer software
* updates" permission or the site maintenance account (the account that was
* created during installation), you will need to modify the access check
* statement below. Change the FALSE to a TRUE to disable the access check.
* After finishing the upgrade, be sure to open this file again and change the
* TRUE back to a FALSE!
*/
$update_free_access = FALSE;
/**
* Salt for one-time login links and cancel links, form tokens, etc.
*
* This variable will be set to a random value by the installer. All one-time
* login links will be invalidated if the value is changed. Note that if your
* site is deployed on a cluster of web servers, you must ensure that this
* variable has the same value on each server. If this variable is empty, a hash
* of the serialized database credentials will be used as a fallback salt.
*
* For enhanced security, you may set this variable to a value using the
* contents of a file outside your docroot that is never saved together
* with any backups of your Drupal files and database.
*
* Example:
* $drupal_hash_salt = file_get_contents('/home/example/salt.txt');
*
*/
$drupal_hash_salt = '';
/**
* Base URL (optional).
*
* If Drupal is generating incorrect URLs on your site, which could
* be in HTML headers (links to CSS and JS files) or visible links on pages
* (such as in menus), uncomment the Base URL statement below (remove the
* leading hash sign) and fill in the absolute URL to your Drupal installation.
*
* You might also want to force users to use a given domain.
* See the .htaccess file for more information.
*
* Examples:
* $base_url = 'http://www.example.com';
* $base_url = 'http://www.example.com:8888';
* $base_url = 'http://www.example.com/drupal';
* $base_url = 'https://www.example.com:8888/drupal';
*
* It is not allowed to have a trailing slash; Drupal will add it
* for you.
*/
# $base_url = 'http://www.example.com'; // NO trailing slash!
/**
* PHP settings:
*
* To see what PHP settings are possible, including whether they can be set at
* runtime (by using ini_set()), read the PHP documentation:
* http://www.php.net/manual/en/ini.list.php
* See drupal_initialize_variables() in includes/bootstrap.inc for required
* runtime settings and the .htaccess file for non-runtime settings. Settings
* defined there should not be duplicated here so as to avoid conflict issues.
*/
/**
* Some distributions of Linux (most notably Debian) ship their PHP
* installations with garbage collection (gc) disabled. Since Drupal depends on
* PHP's garbage collection for clearing sessions, ensure that garbage
* collection occurs by using the most common settings.
*/
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
/**
* Set session lifetime (in seconds), i.e. the time from the user's last visit
* to the active session may be deleted by the session garbage collector. When
* a session is deleted, authenticated users are logged out, and the contents
* of the user's $_SESSION variable is discarded.
*/
ini_set('session.gc_maxlifetime', 200000);
/**
* Set session cookie lifetime (in seconds), i.e. the time from the session is
* created to the cookie expires, i.e. when the browser is expected to discard
* the cookie. The value 0 means "until the browser is closed".
*/
ini_set('session.cookie_lifetime', 2000000);
/**
* If you encounter a situation where users post a large amount of text, and
* the result is stripped out upon viewing but can still be edited, Drupal's
* output filter may not have sufficient memory to process it. If you
* experience this issue, you may wish to uncomment the following two lines
* and increase the limits of these variables. For more information, see
* http://php.net/manual/en/pcre.configuration.php.
*/
# ini_set('pcre.backtrack_limit', 200000);
# ini_set('pcre.recursion_limit', 200000);
/**
* Drupal automatically generates a unique session cookie name for each site
* based on its full domain name. If you have multiple domains pointing at the
* same Drupal site, you can either redirect them all to a single domain (see
* comment in .htaccess), or uncomment the line below and specify their shared
* base domain. Doing so assures that users remain logged in as they cross
* between your various domains. Make sure to always start the $cookie_domain
* with a leading dot, as per RFC 2109.
*/
# $cookie_domain = '.example.com';
/**
* Variable overrides:
*
* To override specific entries in the 'variable' table for this site,
* set them here. You usually don't need to use this feature. This is
* useful in a configuration file for a vhost or directory, rather than
* the default settings.php. Any configuration setting from the 'variable'
* table can be given a new value. Note that any values you provide in
* these variable overrides will not be modifiable from the Drupal
* administration interface.
*
* The following overrides are examples:
* - site_name: Defines the site's name.
* - theme_default: Defines the default theme for this site.
* - anonymous: Defines the human-readable name of anonymous users.
* Remove the leading hash signs to enable.
*/
# $conf['site_name'] = 'My Drupal site';
# $conf['theme_default'] = 'garland';
# $conf['anonymous'] = 'Visitor';
/**
* A custom theme can be set for the offline page. This applies when the site
* is explicitly set to maintenance mode through the administration page or when
* the database is inactive due to an error. It can be set through the
* 'maintenance_theme' key. The template file should also be copied into the
* theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
* Note: This setting does not apply to installation and update pages.
*/
# $conf['maintenance_theme'] = 'bartik';
/**
* Reverse Proxy Configuration:
*
* Reverse proxy servers are often used to enhance the performance
* of heavily visited sites and may also provide other site caching,
* security, or encryption benefits. In an environment where Drupal
* is behind a reverse proxy, the real IP address of the client should
* be determined such that the correct client IP address is available
* to Drupal's logging, statistics, and access management systems. In
* the most simple scenario, the proxy server will add an
* X-Forwarded-For header to the request that contains the client IP
* address. However, HTTP headers are vulnerable to spoofing, where a
* malicious client could bypass restrictions by setting the
* X-Forwarded-For header directly. Therefore, Drupal's proxy
* configuration requires the IP addresses of all remote proxies to be
* specified in $conf['reverse_proxy_addresses'] to work correctly.
*
* Enable this setting to get Drupal to determine the client IP from
* the X-Forwarded-For header (or $conf['reverse_proxy_header'] if set).
* If you are unsure about this setting, do not have a reverse proxy,
* or Drupal operates in a shared hosting environment, this setting
* should remain commented out.
*
* In order for this setting to be used you must specify every possible
* reverse proxy IP address in $conf['reverse_proxy_addresses'].
* If a complete list of reverse proxies is not available in your
* environment (for example, if you use a CDN) you may set the
* $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
* Be aware, however, that it is likely that this would allow IP
* address spoofing unless more advanced precautions are taken.
*/
# $conf['reverse_proxy'] = TRUE;
/**
* Specify every reverse proxy IP address in your environment.
* This setting is required if $conf['reverse_proxy'] is TRUE.
*/
# $conf['reverse_proxy_addresses'] = array('a.b.c.d', ...);
/**
* Set this value if your proxy server sends the client IP in a header
* other than X-Forwarded-For.
*/
# $conf['reverse_proxy_header'] = 'HTTP_X_CLUSTER_CLIENT_IP';
/**
* Page caching:
*
* By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page
* views. This tells a HTTP proxy that it may return a page from its local
* cache without contacting the web server, if the user sends the same Cookie
* header as the user who originally requested the cached page. Without "Vary:
* Cookie", authenticated users would also be served the anonymous page from
* the cache. If the site has mostly anonymous users except a few known
* editors/administrators, the Vary header can be omitted. This allows for
* better caching in HTTP proxies (including reverse proxies), i.e. even if
* clients send different cookies, they still get content served from the cache.
* However, authenticated users should access the site directly (i.e. not use an
* HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid
* getting cached pages from the proxy.
*/
# $conf['omit_vary_cookie'] = TRUE;
/**
* CSS/JS aggregated file gzip compression:
*
* By default, when CSS or JS aggregation and clean URLs are enabled Drupal will
* store a gzip compressed (.gz) copy of the aggregated files. If this file is
* available then rewrite rules in the default .htaccess file will serve these
* files to browsers that accept gzip encoded content. This allows pages to load
* faster for these users and has minimal impact on server load. If you are
* using a webserver other than Apache httpd, or a caching reverse proxy that is
* configured to cache and compress these files itself you may want to uncomment
* one or both of the below lines, which will prevent gzip files being stored.
*/
# $conf['css_gzip_compression'] = FALSE;
# $conf['js_gzip_compression'] = FALSE;
/**
* String overrides:
*
* To override specific strings on your site with or without enabling locale
* module, add an entry to this list. This functionality allows you to change
* a small number of your site's default English language interface strings.
*
* Remove the leading hash signs to enable.
*/
# $conf['locale_custom_strings_en'][''] = array(
# 'forum' => 'Discussion board',
# '@count min' => '@count minutes',
# );
/**
*
* IP blocking:
*
* To bypass database queries for denied IP addresses, use this setting.
* Drupal queries the {blocked_ips} table by default on every page request
* for both authenticated and anonymous users. This allows the system to
* block IP addresses from within the administrative interface and before any
* modules are loaded. However on high traffic websites you may want to avoid
* this query, allowing you to bypass database access altogether for anonymous
* users under certain caching configurations.
*
* If using this setting, you will need to add back any IP addresses which
* you may have blocked via the administrative interface. Each element of this
* array represents a blocked IP address. Uncommenting the array and leaving it
* empty will have the effect of disabling IP blocking on your site.
*
* Remove the leading hash signs to enable.
*/
# $conf['blocked_ips'] = array(
# 'a.b.c.d',
# );
/**
* Fast 404 pages:
*
* Drupal can generate fully themed 404 pages. However, some of these responses
* are for images or other resource files that are not displayed to the user.
* This can waste bandwidth, and also generate server load.
*
* The options below return a simple, fast 404 page for URLs matching a
* specific pattern:
* - 404_fast_paths_exclude: A regular expression to match paths to exclude,
* such as images generated by image styles, or dynamically-resized images.
* If you need to add more paths, you can add '|path' to the expression.
* - 404_fast_paths: A regular expression to match paths that should return a
* simple 404 page, rather than the fully themed 404 page. If you don't have
* any aliases ending in htm or html you can add '|s?html?' to the expression.
* - 404_fast_html: The html to return for simple 404 pages.
*
* Add leading hash signs if you would like to disable this functionality.
*/
$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
$conf['404_fast_html'] = '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
/**
* By default, fast 404s are returned as part of the normal page request
* process, which will properly serve valid pages that happen to match and will
* also log actual 404s to the Drupal log. Alternatively you can choose to
* return a 404 now by uncommenting the following line. This will reduce server
* load, but will cause even valid pages that happen to match the pattern to
* return 404s, rather than the actual page. It will also prevent the Drupal
* system log entry. Ensure you understand the effects of this before enabling.
*
* To enable this functionality, remove the leading hash sign below.
*/
# drupal_fast_404();
/**
* Authorized file system operations:
*
* The Update manager module included with Drupal provides a mechanism for
* site administrators to securely install missing updates for the site
* directly through the web user interface by providing either SSH or FTP
* credentials. This allows the site to update the new files as the user who
* owns all the Drupal files, instead of as the user the webserver is running
* as. However, some sites might wish to disable this functionality, and only
* update the code directly via SSH or FTP themselves. This setting completely
* disables all functionality related to these authorized file operations.
*
* Remove the leading hash signs to disable.
*/
# $conf['allow_authorize_operations'] = FALSE;
[buildout] [buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends = extends =
../../stack/lamp.cfg ../../stack/lamp/buildout.cfg
../../stack/shacache-client.cfg
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = http://ftp.drupal.org/files/projects/drupal-7.8.tar.gz url = http://ftp.drupal.org/files/projects/drupal-7.14.tar.gz
md5sum = e0226b56e8d5c57c6b126e8ed5866b1f md5sum = af7abd95c03ecad4e1567ed94a438334
[instance-recipe] [application-template]
egg = slapos.cookbook recipe = slapos.recipe.download
module = lamp.simple url = ${:_profile_base_location_}/settings.php.in
md5sum = add9e4e96094a9d3fb7cf0f4d26ae544
[template] download-only = True
# Default template for the instance. filename = template.in
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-recipe-egg] [application-configuration]
recipe = zc.recipe.egg location = sites/default/default.settings.php
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
Jinja2 = 2.6
MySQL-python = 1.2.3
Werkzeug = 0.8.1
apache-libcloud = 0.5.2
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.7
plone.recipe.command = 1.1
slapos.cookbook = 0.34
slapos.recipe.build = 0.7
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.2
slapos.toolbox = 0.10
# Required by:
# slapos.core==0.18
# slapos.toolbox==0.10
Flask = 0.8
# Required by:
# slapos.cookbook==0.34
PyXML = 0.8.4
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.34
# slapos.core==0.18
# slapos.toolbox==0.10
# xml-marshaller==0.9.7
lxml = 2.3.1
# Required by:
# slapos.cookbook==0.34
netaddr = 0.7.6
# Required by:
# slapos.core==0.18
netifaces = 0.5
# Required by:
# slapos.toolbox==0.10
paramiko = 1.7.7.1
# Required by:
# slapos.toolbox==0.10
psutil = 0.3.0
# Required by:
# slapos.cookbook==0.34
# slapos.core==0.18
# slapos.toolbox==0.10
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.34
# slapos.toolbox==0.10
slapos.core = 0.18
# Required by:
# slapos.core==0.18
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.34
# slapos.toolbox==0.10
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.34
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.18
zope.interface = 3.8.0
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
...@@ -12,7 +12,6 @@ parts = ...@@ -12,7 +12,6 @@ parts =
ca-frontend ca-frontend
certificate-authority certificate-authority
frontend-promise frontend-promise
publish-kvm-frontend-connection-information
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -48,7 +47,7 @@ logrotate-entries = $${rootdirectory:etc}/logrotate.d ...@@ -48,7 +47,7 @@ logrotate-entries = $${rootdirectory:etc}/logrotate.d
recipe = slapos.cookbook:kvm.frontend recipe = slapos.cookbook:kvm.frontend
domain = $${ca-frontend:name} domain = $${ca-frontend:name}
# port = $${slap-parameter:port} # port = $${slap-parameter:port}
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:local-ipv4}
port = $${slap-parameter:port} port = $${slap-parameter:port}
http-redirection = $${slap-parameter:http-redirection} http-redirection = $${slap-parameter:http-redirection}
ssl-key-path = $${ca-frontend:key-file} ssl-key-path = $${ca-frontend:key-file}
...@@ -130,11 +129,6 @@ logrotate-entries = $${directory:logrotate-entries} ...@@ -130,11 +129,6 @@ logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup} backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status state-file = $${rootdirectory:srv}/logrotate.status
[publish-kvm-frontend-connection-information]
recipe = slapos.cookbook:publish
ip = $${frontend-instance:ip}
port = $${frontend-instance:port}
[slap-parameter] [slap-parameter]
# Default value if no port is specified # Default value if no port is specified
port = 4443 port = 4443
......
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
############################# #############################
[buildout] [buildout]
parts = parts =
request-slave-frontend
certificate-authority certificate-authority
publish-kvm-backend-connection-information
publish-kvm-frontend-connection-information
kvm-promise kvm-promise
websockify-sighandler
novnc-promise novnc-promise
frontend-promise frontend-promise
publish-kvm-connection-information
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -33,6 +34,12 @@ ca-dir = $${rootdirectory:srv}/ssl ...@@ -33,6 +34,12 @@ ca-dir = $${rootdirectory:srv}/ssl
[create-mac] [create-mac]
recipe = slapos.cookbook:generate.mac recipe = slapos.cookbook:generate.mac
storage-path = $${rootdirectory:srv}/mac
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:srv}/passwd
bytes = 4
[kvm-instance] [kvm-instance]
recipe = slapos.cookbook:kvm recipe = slapos.cookbook:kvm
...@@ -53,6 +60,7 @@ controller-path = $${basedirectory:services}/kvm_controller ...@@ -53,6 +60,7 @@ controller-path = $${basedirectory:services}/kvm_controller
shell-path = ${dash:location}/bin/dash shell-path = ${dash:location}/bin/dash
qemu-path = ${kvm:location}/bin/qemu-system-x86_64 qemu-path = ${kvm:location}/bin/qemu-system-x86_64
qemu-img-path = ${kvm:location}/bin/qemu-img qemu-img-path = ${kvm:location}/bin/qemu-img
passwd = $${gen-passwd:passwd}
[kvm-promise] [kvm-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
...@@ -73,6 +81,11 @@ websockify-path = ${buildout:directory}/bin/websockify ...@@ -73,6 +81,11 @@ websockify-path = ${buildout:directory}/bin/websockify
ssl-key-path = $${ca-novnc:key-file} ssl-key-path = $${ca-novnc:key-file}
ssl-cert-path = $${ca-novnc:cert-file} ssl-cert-path = $${ca-novnc:cert-file}
[websockify-sighandler]
recipe = slapos.cookbook:signalwrapper
wrapper-path = $${basedirectory:services}/websockify
wrapped-path = $${novnc-instance:path}
[certificate-authority] [certificate-authority]
recipe = slapos.cookbook:certificate_authority recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl openssl-binary = ${openssl:location}/bin/openssl
...@@ -98,7 +111,7 @@ recipe = slapos.cookbook:certificate_authority.request ...@@ -98,7 +111,7 @@ recipe = slapos.cookbook:certificate_authority.request
key-file = $${basedirectory:novnc-conf}/novnc.key key-file = $${basedirectory:novnc-conf}/novnc.key
cert-file = $${basedirectory:novnc-conf}/novnc.crt cert-file = $${basedirectory:novnc-conf}/novnc.crt
executable = $${rootdirectory:bin}/novnc executable = $${rootdirectory:bin}/novnc
wrapper = $${basedirectory:services}/websockify wrapper = $${rootdirectory:bin}/websockify
[novnc-promise] [novnc-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
...@@ -114,41 +127,34 @@ db-path = $${rootdirectory:srv}/slapmonitor_database ...@@ -114,41 +127,34 @@ db-path = $${rootdirectory:srv}/slapmonitor_database
[request-slave-frontend] [request-slave-frontend]
recipe = slapos.cookbook:request recipe = slapos.cookbook:request
software-url = $${slap-connection:software-release-url} software-url = $${slap-parameter:frontend-software-url}
server-url = $${slap-connection:server-url} server-url = $${slap-connection:server-url}
key-file = $${slap-connection:key-file} key-file = $${slap-connection:key-file}
cert-file = $${slap-connection:cert-file} cert-file = $${slap-connection:cert-file}
computer-id = $${slap-connection:computer-id} computer-id = $${slap-connection:computer-id}
partition-id = $${slap-connection:partition-id} partition-id = $${slap-connection:partition-id}
name = SlaveFrontend name = SlaveFrontend
software-type = frontend software-type = $${slap-parameter:frontend-software-type}
slave = true slave = true
config = host port config = host port
config-host = $${novnc-instance:ip} config-host = $${novnc-instance:ip}
config-port = $${novnc-instance:port} config-port = $${novnc-instance:port}
return = url resource port domainname return = url resource port domainname
sla = instance_guid
sla-instance_guid = $${slap-parameter:frontend-instance-guid}
[publish-kvm-backend-connection-information]
recipe = slapos.cookbook:publish
backend_url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1
password = $${kvm-instance:passwd}
# Will generate, if existing, URL to reach KVM using frontend [publish-kvm-frontend-connection-information]
[get-slave-connection-url] <= publish-kvm-backend-connection-information
recipe = slapos.cookbook:generate_output_if_input_not_null 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}
input-list =
frontend-url request-slave-frontend:connection-url
frontend-port request-slave-frontend:connection-port
frontend-resource request-slave-frontend:connection-resource
frontend-domainname request-slave-frontend:connection-domainname
template = %(frontend-url)s/vnc_auto.html?host=%(frontend-domainname)s&port=%(frontend-port)s&encrypt=1&path=%(frontend-resource)s
# This is default output, if slave is not ready yet
output = Not ready yet. Please use backend URL if possible or wait a few minutes.
[frontend-promise] [frontend-promise]
recipe = slapos.cookbook:check_url_available recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend_promise path = $${basedirectory:promises}/frontend_promise
url = $${get-slave-connection-url:output} url = $${publish-kvm-frontend-connection-information:url}
dash_path = ${dash:location}/bin/dash dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[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
url = $${get-slave-connection-url:output}
password = $${kvm-instance:passwd}
...@@ -40,8 +40,13 @@ path = $${basedirectory:promises}/nbd_promise ...@@ -40,8 +40,13 @@ path = $${basedirectory:promises}/nbd_promise
hostname = $${nbd-instance:ip} hostname = $${nbd-instance:ip}
port = $${nbd-instance:port} port = $${nbd-instance:port}
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:srv}/passwd
bytes = 24
[onetimeupload-instance] [onetimeupload-instance]
recipe = slapos.cookbook:generic.onetimeupload recipe = slapos.cookbook:onetimeupload
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
port = 9999 port = 9999
image-path = $${rootdirectory:srv}/cdrom.iso image-path = $${rootdirectory:srv}/cdrom.iso
...@@ -49,6 +54,7 @@ log-path = $${rootdirectory:log}/onetimeupload.log ...@@ -49,6 +54,7 @@ log-path = $${rootdirectory:log}/onetimeupload.log
shell-path = ${dash:location}/bin/dash shell-path = ${dash:location}/bin/dash
onetimeupload-path = ${buildout:bin-directory}/onetimeupload onetimeupload-path = ${buildout:bin-directory}/onetimeupload
path = $${basedirectory:services}/onetimeupload path = $${basedirectory:services}/onetimeupload
key = $${gen-passwd:passwd}
[onetimeupload-promise] [onetimeupload-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
......
...@@ -14,6 +14,7 @@ extends = ...@@ -14,6 +14,7 @@ extends =
../../component/openssl/buildout.cfg ../../component/openssl/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/curl/buildout.cfg
../../stack/nodejs.cfg ../../stack/nodejs.cfg
develop = develop =
...@@ -104,14 +105,14 @@ eggs = ...@@ -104,14 +105,14 @@ eggs =
# https://github.com/nodejitsu/node-http-proxy # https://github.com/nodejitsu/node-http-proxy
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
#XXX-Cedric : use upstream when merged #XXX-Cedric : use upstream when merged
url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/master url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/20120621
md5sum = 20204d0b29c2cef26e1c91e99eedca6b md5sum = 20204d0b29c2cef26e1c91e99eedca6b
[proxy-by-url] [proxy-by-url]
# https://github.com/dominictarr/proxy-by-url # https://github.com/dominictarr/proxy-by-url
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
#XXX-Cedric : use upstream when merged #XXX-Cedric : use upstream when merged
url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/master url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/20120621
md5sum = c2609948aa708581f93b981b23880314 md5sum = c2609948aa708581f93b981b23880314
[npm-modules] [npm-modules]
...@@ -132,7 +133,7 @@ command = ...@@ -132,7 +133,7 @@ command =
[template-kvm] [template-kvm]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg url = ${:_profile_base_location_}/instance-kvm.cfg
md5sum = 8d67a6cabe4fbce2bd44aa006a0d0cf8 md5sum = c0f24f40e3c55a30fb584c40e81956da
output = ${buildout:directory}/template-kvm.cfg output = ${buildout:directory}/template-kvm.cfg
mode = 0644 mode = 0644
...@@ -146,14 +147,14 @@ mode = 0644 ...@@ -146,14 +147,14 @@ mode = 0644
[template-nbd] [template-nbd]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-nbd.cfg url = ${:_profile_base_location_}/instance-nbd.cfg
md5sum = 7691fadfc8d4392c58ac1bf0ebd5aaf2 md5sum = 692b3da84473fbc962bea9b371b5355b
output = ${buildout:directory}/template-nbd.cfg output = ${buildout:directory}/template-nbd.cfg
mode = 0644 mode = 0644
[template-frontend] [template-frontend]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-frontend.cfg url = ${:_profile_base_location_}/instance-frontend.cfg
md5sum = 123bf4e5bea9e86c03b62e9afb8ca04b md5sum = 73359b52013b1b65f75005e8698ed180
output = ${buildout:directory}/template-frontend.cfg output = ${buildout:directory}/template-frontend.cfg
mode = 0644 mode = 0644
...@@ -208,7 +209,7 @@ lxml = 2.3.4 ...@@ -208,7 +209,7 @@ lxml = 2.3.4
meld3 = 0.6.8 meld3 = 0.6.8
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.5 pycrypto = 2.5
slapos.cookbook = 0.48 slapos.cookbook = 0.57
slapos.recipe.build = 0.7 slapos.recipe.build = 0.7
slapos.recipe.template = 2.3 slapos.recipe.template = 2.3
slapos.toolbox = 0.24 slapos.toolbox = 0.24
...@@ -225,7 +226,7 @@ Flask = 0.8 ...@@ -225,7 +226,7 @@ Flask = 0.8
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
...@@ -237,11 +238,11 @@ atomize = 0.1.1 ...@@ -237,11 +238,11 @@ atomize = 0.1.1
feedparser = 5.1.1 feedparser = 5.1.1
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
netaddr = 0.7.6 netaddr = 0.7.6
# Required by: # Required by:
...@@ -261,13 +262,13 @@ paramiko = 1.7.7.1 ...@@ -261,13 +262,13 @@ paramiko = 1.7.7.1
psutil = 0.4.1 psutil = 0.4.1
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
# slapos.core==0.24 # slapos.core==0.24
# slapos.toolbox==0.24 # slapos.toolbox==0.24
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
# slapos.toolbox==0.24 # slapos.toolbox==0.24
slapos.core = 0.24 slapos.core = 0.24
...@@ -276,14 +277,16 @@ slapos.core = 0.24 ...@@ -276,14 +277,16 @@ slapos.core = 0.24
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
# slapos.toolbox==0.24 # slapos.toolbox==0.24
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.48 # slapos.cookbook==0.57
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.24
zope.interface = 3.8.0 zope.interface = 3.8.0
websockify = 0.1-dev
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
[buildout] [buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends = extends =
../../stack/lamp.cfg ../../stack/lamp/buildout.cfg
[application] [application]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
...@@ -28,20 +20,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -28,20 +20,3 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration] [application-configuration]
location = Student shall put here relative path to application top level directory where configuration shall be created location = Student shall put here relative path to application top level directory where configuration shall be created
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
kvm
===
Introduction
------------
This software release is used to deploy Slaprunner instances.
Slaprunner is an all-in-one IDE used to develop and test profiles and recipes for SlapOS.
Parameters
----------
authorized-key
~~~~~~~~~~~~~~
You need to specify your SSH public key in order to connect to the SSH server of this instance.
Example of parameter XML::
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="authorized-key">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdNp7qZMVAzNc07opHshiIFDmJpYXQpetfcSgUj39a409d42PpsJElp7WsAE/x0nN6gUIoWIl7UiAlMzf6bKEJGJVSOZEPTmiJVlgK1Gp+kE0x9yNcncYg7p38Jny0daVA/NkkpAFyRsAm5kLGzyLtaCcktSvy0cJuy7WSSHU05pd1f8Y8thofE9g5t+/JA2VZvipxPkRfkFAG3aOAGLULlTImTSDFSDFGSDFG5F6mMnl7yvY2d6vEHVBu+K+aKmAwZVfCUwtSpa/tq3i2Lppjrw3UfrxbQSFHZCkzefr+u+l4YYe+tJrX7rYJYXD7LIfZfdSeFTlHFaN/yI1 user@host.local</parameter>
</instance>
[buildout]
parts =
cloud9
slaprunner
sshkeys-dropbear
dropbear-server-add-authorized-key
sshkeys-authority
publish-connection-informations
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# Create all needed directories
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
[directory]
recipe = slapos.cookbook:mkdirectory
sshkeys = $${rootdirectory:srv}/sshkeys
services = $${rootdirectory:etc}/run/
ssh = $${rootdirectory:etc}/ssh/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
[runnerdirectory]
recipe = slapos.cookbook:mkdirectory
home = $${rootdirectory:srv}/runner/
project = $${:home}/project
software-root = $${:home}/software
instance-root = $${:home}/instance
#Create password for slaprunner
[slapunner-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.passwd
bytes = 4
# Deploy cloud9 and slaprunner
[cloud9]
recipe = slapos.cookbook:cloud9
ip = $${slap-network-information:global-ipv6}
port = 30000
wrapper = $${basedirectory:services}/cloud9
working-directory = $${runnerdirectory:home}
git-binary = ${git:location}/bin/git
node-binary = ${nodejs:location}/bin/node
cloud9 = ${cloud9:location}/server.js
[slaprunner]
recipe = slapos.cookbook:slaprunner
slaprunner = ${buildout:directory}/bin/slaprunner
slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr
slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp
slapproxy = ${buildout:directory}/bin/slapproxy
supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl
git-binary = ${git:location}/bin/git
slapos.cfg = $${rootdirectory:etc}/slapos.cfg
working-directory = $${runnerdirectory:home}
project-directory = $${runnerdirectory:project}
software-directory = $${runnerdirectory:software-root}
instance-directory = $${runnerdirectory:instance-root}
etc = $${rootdirectory:etc}
ssh_client = $${sshkeys-dropbear:wrapper}
public_key = $${sshkeys-dropbear:public-key}
private_key = $${sshkeys-dropbear:private-key}
ipv4 = $${slap-network-information:local-ipv4}
ipv6 = $${slap-network-information:global-ipv6}
proxy_port = 50000
runner_port = 50000
partition-amount = 7
cloud9-url = $${cloud9:access-url}
wrapper = $${basedirectory:services}/slaprunner
# Deploy dropbear (minimalist ssh server)
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${basedirectory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = /bin/bash
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-server:wrapper}
public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd
[dropbear-server-add-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
# Request frontend
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:request
name = Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url
config-url = $${slaprunner:access-url}
return = site_url
# Send informations to SlapOS Master
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = $${slaprunner:access-url}
url = $${request-frontend:connection-site_url}
cloud9_url = $${cloud9:access-url}
ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port}
passwd = $${slapunner-passwd:passwd}
[slap-parameter]
# Default value if no ssh key is specified
authorized-key =
[buildout] [buildout]
parts = parts =
instance switch_softwaretype
sshkeys-authority
sshkeys-dropbear
dropbear-client
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance] [switch_softwaretype]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = slapos.cookbook:softwaretype
slaprunner = ${buildout:directory}/bin/slaprunner default = ${template-runner:output}
slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr \ No newline at end of file
slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp
slapproxy = ${buildout:directory}/bin/slapproxy
supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl
git = ${git:location}/bin/git
node-bin = ${nodejs-0.4:location}/bin/node
cloud9 = ${cloud9:location}/bin/cloud9.js
ssh_client = $${sshkeys-dropbear:wrapper}
public_key = $${sshkeys-dropbear:public-key}
private_key = $${sshkeys-dropbear:private-key}
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${directory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-client:wrapper}
public-key = $${dropbear-client:identity-file}.pub
private-key = $${dropbear-client:identity-file}
wrapper = $${rootdirectory:bin}/dbclient
[dropbear-client]
recipe = slapos.cookbook:dropbear.client
dbclient-binary = ${dropbear:location}/bin/dbclient
identity-file = $${directory:ssh}/id_rsa
wrapper = $${rootdirectory:bin}/dbclient_raw
home = $${rootdirectory:etc}/ssh/
force-host-key = True
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
[directory]
recipe = slapos.cookbook:mkdirectory
sshkeys = $${rootdirectory:srv}/sshkeys
services = $${rootdirectory:etc}/run/
ssh = $${rootdirectory:etc}/ssh/
\ No newline at end of file
[buildout] [buildout]
extensions =
buildout-versions
extends = extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/flask.cfg ../../stack/flask.cfg
...@@ -13,30 +9,26 @@ extends = ...@@ -13,30 +9,26 @@ extends =
parts = parts =
template template
slapos-cookbook
eggs eggs
instance-recipe-egg
dropbear
versions = versions
[instance-recipe]
egg = slapos.cookbook
module = slaprunner
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
md5sum = 7cfd248cdc6fa6cbb4957d25a0aed884 md5sum = 5307e4200f044ae57b504ad68444491c
[template-runner]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
md5sum = 9c7daf59883c4c330064632fdaf329fa
mode = 0644
[eggs] [eggs]
eggs += recipe = z3c.recipe.scripts
eggs =
slapos.libnetworkcache slapos.libnetworkcache
slapos.toolbox slapos.toolbox
slapos.core slapos.core
...@@ -60,98 +52,93 @@ signature-certificate-list = ...@@ -60,98 +52,93 @@ signature-certificate-list =
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions] [versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-003
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.8.0 apache-libcloud = 0.10.1
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
docutils = 0.9.1
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.6
ipython = 0.13
lxml = 2.3.4
meld3 = 0.6.8 meld3 = 0.6.8
netaddr = 0.7.7
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.5 pycrypto = 2.6
slapos.cookbook = 0.45 slapos.cookbook = 0.58
slapos.core = 0.26.2
slapos.libnetworkcache = 0.12 slapos.libnetworkcache = 0.12
slapos.recipe.template = 2.3 slapos.recipe.build = 0.9
slapos.toolbox = 0.20 slapos.recipe.template = 2.4
slapos.toolbox = 0.26.1
smmap = 0.8.2 smmap = 0.8.2
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.26.2
Flask = 0.8 # slapos.toolbox==0.26.1
Flask = 0.9
# Required by: # Required by:
# slapos.toolbox==0.20 # hexagonit.recipe.cmmi==1.6
GitPython = 0.3.2.RC1 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.toolbox==0.26.1
PyXML = 0.8.4 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.toolbox==0.20 # slapos.cookbook==0.58
atomize = 0.1.1 PyXML = 0.8.4
# Required by: # Required by:
# slapos.toolbox==0.20 # netaddr==0.7.7
feedparser = 5.1.1 Sphinx = 1.1.3
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.toolbox==0.26.1
inotifyx = 0.2.0 atomize = 0.1.1
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.toolbox==0.26.1
# slapos.core==0.24 feedparser = 5.1.2
# xml-marshaller==0.9.7
lxml = 2.3.4
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.cookbook==0.58
netaddr = 0.7.6 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.26.2
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.20 # slapos.toolbox==0.26.1
paramiko = 1.7.7.1 paramiko = 1.7.7.2
# Required by: # Required by:
# slapos.toolbox==0.20 # slapos.toolbox==0.26.1
psutil = 0.4.1 psutil = 0.5.1
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.cookbook==0.58
# slapos.core==0.24 # slapos.core==0.26.2
# slapos.libnetworkcache==0.12 # slapos.libnetworkcache==0.12
# slapos.toolbox==0.20 # slapos.toolbox==0.26.1
# supervisor==3.0a12 # supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-003 # zope.interface==4.0.1
# zc.recipe.egg==1.3.2
# zope.interface==3.8.0
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.core==0.26.2
slapos.core = 0.24
# Required by:
# slapos.core==0.24
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.45 # slapos.cookbook==0.58
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.45
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.26.2
zope.interface = 3.8.0 zope.interface = 4.0.1
\ No newline at end of file
[buildout] [buildout]
extends = extends =
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
../../component/zabbix/buildout.cfg ../../component/zabbix/buildout.cfg
../../component/lxml-python/buildout.cfg ../../stack/slapos.cfg
find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/
versions = versions
parts = parts =
eggs slapos-cookbook
template template
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
[template] [template]
# Default template for the instance. # Default template for the instance.
recipe = slapos.recipe.template recipe = slapos.recipe.template
...@@ -33,493 +18,93 @@ md5sum = 98a680fe8fddce5dcee455e65c228fde ...@@ -33,493 +18,93 @@ md5sum = 98a680fe8fddce5dcee455e65c228fde
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[versions] [networkcache]
zc.buildout = 1.5.3-dev-SlapOS-001 # signature certificates of the following uploaders.
Jinja2 = 2.5.5 # Cedric de Saint Martin
Werkzeug = 0.6.2 signature-certificate-list =
buildout-versions = 1.6 -----BEGIN CERTIFICATE-----
hexagonit.recipe.cmmi = 1.5.0 MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
lxml = 2.3 BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT
meld3 = 0.6.7 MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
slapos.recipe.template = 1.1 wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB
D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1
# Required by: P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O
# slapos.core==0.2 BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp
Flask = 0.6.1 cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr
b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV
# Required by: Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby
# slapos.cookbook==0.4 If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
PyXML = 0.8.4 -----END CERTIFICATE-----
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.5
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:01:36.219846
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.5
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by: [versions]
# slapos.cookbook==0.4 Jinja2 = 2.6
slapos.core = 0.2 Pygments = 1.5
Werkzeug = 0.8.3
# Required by: buildout-versions = 1.7
# slapos.core==0.2 docutils = 0.9.1
supervisor = 3.0a10 hexagonit.recipe.cmmi = 1.6
ipython = 0.13
# Required by: meld3 = 0.6.8
# slapos.cookbook==0.4 slapos.cookbook = 0.59
xml-marshaller = 0.9.7 slapos.recipe.template = 2.4
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:15:31.979623
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:16:55.921352
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:17:42.100375
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.2
zope.interface = 3.6.3
# Added by Buildout Versions at 2011-06-13 10:19:50.709164
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by:
# slapos.core==0.2
Flask = 0.6.1
# Required by:
# slapos.cookbook==0.4
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.8
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.core==0.26.2
zope.interface = 3.6.3 Flask = 0.9
# Added by Buildout Versions at 2011-06-13 10:39:36.870559
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.recipe.template = 1.1
# Required by: # Required by:
# slapos.core==0.2 # hexagonit.recipe.cmmi==1.6
Flask = 0.6.1 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.cookbook==0.4 # slapos.cookbook==0.59
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# slapos.recipe.template==1.1 # netaddr==0.7.7
collective.recipe.template = 1.8 Sphinx = 1.1.3
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
netaddr = 0.7.3
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.4
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2
setuptools = 0.6c11
# Required by:
# slapos.cookbook==0.4
slapos.core = 0.2
# Required by:
# slapos.core==0.2
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.4
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.4
zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.cookbook==0.59
zope.interface = 3.6.3 inotifyx = 0.2.0
# Added by Buildout Versions at 2011-06-13 10:41:41.115948
Jinja2 = 2.5.5
Werkzeug = 0.6.2
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
slapos.cookbook = 0.5
slapos.recipe.template = 1.1
# Required by: # Required by:
# slapos.core==0.2 # slapos.cookbook==0.59
Flask = 0.6.1 # slapos.core==0.26.2
# xml-marshaller==0.9.7
# Required by: lxml = 2.3.4
# slapos.cookbook==0.5
PyXML = 0.8.4
# Required by: # Required by:
# slapos.recipe.template==1.1 # slapos.cookbook==0.59
collective.recipe.template = 1.8 netaddr = 0.7.7
# Required by: # Required by:
# hexagonit.recipe.cmmi==1.5.0 # slapos.core==0.26.2
hexagonit.recipe.download = 1.5.0 netifaces = 0.8
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
# slapos.core==0.2 # slapos.core==0.26.2
netaddr = 0.7.3 # zc.buildout==1.6.0-dev-SlapOS-006
# Required by:
# slapos.core==0.2
netifaces = 0.5
# Required by:
# slapos.cookbook==0.5
# slapos.core==0.2
# zc.buildout==1.5.3-dev-SlapOS-001
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
setuptools = 0.6c11 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
slapos.core = 0.2 slapos.core = 0.26.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.core==0.26.2
supervisor = 3.0a10 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.5 # slapos.cookbook==0.59
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.2 # slapos.core==0.26.2
zope.interface = 3.6.3 zope.interface = 4.0.1
# Stack for Flask microframework: http://flask.pocoo.org/ # Stack for Flask microframework: http://flask.pocoo.org/
[buildout] [buildout]
extends = extends =
../component/python-2.7/buildout.cfg slapos.cfg
../component/lxml-python/buildout.cfg
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
parts = parts =
eggs slapos-cookbook
flask-egg
# Unzip, as Flask can have a lot of troubles with zipped eggs
unzip = true
[eggs] [flask-egg]
python = python2.7
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
${lxml-python:egg}
Flask Flask
slapos.cookbook
[lxml-python]
python = python2.7
# Warning: this file is deprecated and is here only for compatiblity.
# If you extend this file, you should probably extend stack/lamp/buildout.cfg
# Instead.
# Only reason to use this file is when your PHP application uses "delete",
# "rename" or any feature of lampconfigure (not yet ported to new stack).
[buildout] [buildout]
parts = parts =
template template
...@@ -20,9 +27,6 @@ extends = ...@@ -20,9 +27,6 @@ extends =
../component/pycrypto-python/buildout.cfg ../component/pycrypto-python/buildout.cfg
../component/mysql-python/buildout.cfg ../component/mysql-python/buildout.cfg
../stack/slapos.cfg ../stack/slapos.cfg
../component/python-2.7/buildout.cfg
# python-2.7 component is here only for compatibility with old software.cfg.
# It is not needed and should not be used in LAMP-based software.cfg
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
......
...@@ -35,6 +35,8 @@ extends = ...@@ -35,6 +35,8 @@ extends =
../../component/mysql-python/buildout.cfg ../../component/mysql-python/buildout.cfg
../../component/dropbear/buildout.cfg ../../component/dropbear/buildout.cfg
../slapos.cfg ../slapos.cfg
../../component/dash/buildout.cfg
../../component/curl/buildout.cfg
[mariadb] [mariadb]
# Compile dir is for plugins, there's no plugin in LAMP # Compile dir is for plugins, there's no plugin in LAMP
...@@ -64,7 +66,7 @@ mode = 0644 ...@@ -64,7 +66,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-php.cfg url = ${:_profile_base_location_}/instance-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg output = ${buildout:directory}/template-apache-php.cfg
md5sum = f8a1599f19a67d948f4a1f32f3bd3e2f md5sum = ae9c0f8c70a62f13eb948424c99d71e2
mode = 0644 mode = 0644
[template-apache-backup] [template-apache-backup]
...@@ -85,7 +87,7 @@ mode = 0644 ...@@ -85,7 +87,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg url = ${:_profile_base_location_}/instance-mariadb.cfg
output = ${buildout:directory}/template-mariadb.cfg output = ${buildout:directory}/template-mariadb.cfg
md5sum = 70ab558c2e925c3627c39fbc20a7501c md5sum = ba5ebecbfe9fbb96d48f2baa43c37065
mode = 0644 mode = 0644
[template-mariadb-pbsready] [template-mariadb-pbsready]
...@@ -116,6 +118,14 @@ output = ${buildout:directory}/template-pull-backup.cfg ...@@ -116,6 +118,14 @@ output = ${buildout:directory}/template-pull-backup.cfg
md5sum = 9aab30ba5aa23a37d4b507e7c414be00 md5sum = 9aab30ba5aa23a37d4b507e7c414be00
mode = 0644 mode = 0644
# Dummy parts in case no application configuration file is needed
[application-template]
filename =
location =
[application-configuration]
location =
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
...@@ -180,100 +190,103 @@ signature-certificate-list = ...@@ -180,100 +190,103 @@ signature-certificate-list =
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions] [versions]
# Automatically picked by buildout-versions
Jinja2 = 2.6 Jinja2 = 2.6
Pygments = 1.5 Pygments = 1.5
Sphinx = 1.1.3
Werkzeug = 0.8.3 Werkzeug = 0.8.3
apache-libcloud = 0.9.1 apache-libcloud = 0.10.1
async = 0.6.1 async = 0.6.1
buildout-versions = 1.7 buildout-versions = 1.7
docutils = 0.9 docutils = 0.9.1
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.5.0 hexagonit.recipe.cmmi = 1.5.1
ipython = 0.12.1
meld3 = 0.6.8 meld3 = 0.6.8
pycrypto = 2.5 pycrypto = 2.6
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.cookbook = 0.52 slapos.cookbook = 0.55
slapos.recipe.build = 0.7 slapos.recipe.build = 0.9
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.3 slapos.recipe.template = 2.4
slapos.toolbox = 0.24 slapos.toolbox = 0.25
smmap = 0.8.2 smmap = 0.8.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
# slapos.toolbox==0.24 # slapos.toolbox==0.25
Flask = 0.8 Flask = 0.8
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.25
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
PyXML = 0.8.4 PyXML = 0.8.4
# Required by: # Required by:
# slapos.toolbox==0.24 # netaddr==0.7.7
Sphinx = 1.1.3
# Required by:
# slapos.toolbox==0.25
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.25
feedparser = 5.1.2 feedparser = 5.1.2
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
# slapos.core==0.24 # slapos.core==0.25
# xml-marshaller==0.9.7 # xml-marshaller==0.9.7
lxml = 2.3.4 lxml = 2.3.4
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
netaddr = 0.7.6 netaddr = 0.7.7
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.25
paramiko = 1.7.7.1 paramiko = 1.7.7.2
# Required by: # Required by:
# slapos.toolbox==0.24 # slapos.toolbox==0.25
psutil = 0.4.1 psutil = 0.4.1
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
# slapos.core==0.24 # slapos.core==0.25
# slapos.toolbox==0.24 # slapos.toolbox==0.25
# zc.buildout==1.6.0-dev-SlapOS-003 # zc.buildout==1.6.0-dev-SlapOS-006
# zc.recipe.egg==1.3.2 # zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
# slapos.toolbox==0.24 # slapos.toolbox==0.25
slapos.core = 0.24 slapos.core = 0.25
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
# slapos.toolbox==0.24 # slapos.toolbox==0.25
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
# slapos.cookbook==0.52 # slapos.cookbook==0.55
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.24 # slapos.core==0.25
zope.interface = 4.0.0 zope.interface = 4.0.1
...@@ -9,6 +9,8 @@ parts = ...@@ -9,6 +9,8 @@ parts =
cron cron
cron-entry-logrotate cron-entry-logrotate
promise promise
slapmonitor
slapreport
frontend-promise frontend-promise
publish-connection-informations publish-connection-informations
...@@ -16,64 +18,36 @@ eggs-directory = ${buildout:eggs-directory} ...@@ -16,64 +18,36 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[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
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = $${apache-php:url}
url = $${request-frontend:connection-site_url}
[mariadb-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url}
[apache-php]
recipe = slapos.cookbook:apachephp
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
htdocs = $${rootdirectory:srv}/www/ # Creation of all needed directories
pid-file = $${basedirectory:run}/apache.pid [rootdirectory]
lock-file = $${basedirectory:run}/apache.lock recipe = slapos.cookbook:mkdirectory
ip = $${slap-network-information:global-ipv6} etc = $${buildout:directory}/etc/
port = 8080 var = $${buildout:directory}/var/
url = http://[$${:ip}]:$${:port}/ srv = $${buildout:directory}/srv/
error-log = $${directory:httpd-log}/error.log bin = $${buildout:directory}/bin/
access-log = $${directory:httpd-log}/access.log tmp = $${buildout:directory}/tmp/
php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php}
httpd-conf = $${rootdirectory:etc}/apache.conf
wrapper = $${basedirectory:services}/apache
httpd-binary = ${apache:location}/bin/httpd
mysql-username = $${mariadb-urlparse:username} [basedirectory]
mysql-password = $${mariadb-urlparse:password} recipe = slapos.cookbook:mkdirectory
mysql-database = $${mariadb-urlparse:path} log = $${rootdirectory:var}/log/
mysql-host = $${stunnel:local-host} services = $${rootdirectory:etc}/run/
mysql-port = $${stunnel:local-port} run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
[certificate-authority] [directory]
recipe = slapos.cookbook:certificate_authority recipe = slapos.cookbook:mkdirectory
openssl-binary = ${openssl:location}/bin/openssl ca-dir = $${rootdirectory:srv}/ssl/
ca-dir = $${directory:ca-dir} httpd-log = $${basedirectory:log}/apache/
requests-directory = $${cadirectory:requests} php-ini-dir = $${rootdirectory:etc}/php/
wrapper = $${basedirectory:services}/ca tmp-php = $${rootdirectory:tmp}/php/
ca-private = $${cadirectory:private} logrotate-entries = $${rootdirectory:etc}/logrotate.d/
ca-certs = $${cadirectory:certs} logrotate-backup = $${basedirectory:backup}/logrotate/
ca-newcerts = $${cadirectory:newcerts} stunnel-conf = $${rootdirectory:etc}/stunnel/
ca-crl = $${cadirectory:crl} cronstamps = $${rootdirectory:etc}/cronstamps/
cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/
[cadirectory] [cadirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -83,14 +57,8 @@ certs = $${directory:ca-dir}/certs/ ...@@ -83,14 +57,8 @@ certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/ newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/ crl = $${directory:ca-dir}/crl/
[ca-stunnel]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${stunnel:wrapper}
wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
# Deploy stunnel
[stunnel] [stunnel]
recipe = slapos.cookbook:stunnel recipe = slapos.cookbook:stunnel
client = true client = true
...@@ -107,6 +75,29 @@ pid-file = $${basedirectory:run}/stunnel.pid ...@@ -107,6 +75,29 @@ pid-file = $${basedirectory:run}/stunnel.pid
wrapper = $${rootdirectory:bin}/raw_stunnel wrapper = $${rootdirectory:bin}/raw_stunnel
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
# Certificate stuffs
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${basedirectory:services}/ca
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}
[ca-stunnel]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${stunnel:wrapper}
wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
# Request MariaDB instance and parse its URL
[request-mariadb] [request-mariadb]
<= slap-connection <= slap-connection
recipe = slapos.cookbook:request recipe = slapos.cookbook:request
...@@ -115,17 +106,41 @@ software-url = $${slap-connection:software-release-url} ...@@ -115,17 +106,41 @@ software-url = $${slap-connection:software-release-url}
software-type = mariadb software-type = mariadb
return = url return = url
[request-frontend] [mariadb-urlparse]
<= slap-connection recipe = slapos.cookbook:urlparse
recipe = slapos.cookbook:request url = $${request-mariadb:connection-url}
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 # Deploy Apache + PHP application
slave = true [apache-php]
config = url recipe = slapos.cookbook:apachephp
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/ source = ${application:location}
return = site_url template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
htdocs = $${rootdirectory:srv}/www/
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
url = http://[$${:ip}]:$${:port}/
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php}
httpd-conf = $${rootdirectory:etc}/apache.conf
wrapper = $${basedirectory:services}/apache
httpd-binary = ${apache:location}/bin/httpd
mysql-username = $${mariadb-urlparse:username}
mysql-password = $${mariadb-urlparse:password}
mysql-database = $${mariadb-urlparse:path}
mysql-host = $${stunnel:local-host}
mysql-port = $${stunnel:local-port}
# Deploy logrotate, cron, configure it
[logrotate] [logrotate]
recipe = slapos.cookbook:logrotate recipe = slapos.cookbook:logrotate
# Binaries # Binaries
...@@ -161,6 +176,11 @@ notifempty = true ...@@ -161,6 +176,11 @@ notifempty = true
create = true create = true
post = $${stunnel:post-rotate-script} post = $${stunnel:post-rotate-script}
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
[cron] [cron]
recipe = slapos.cookbook:cron recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond dcrond-binary = ${dcron:location}/sbin/crond
...@@ -170,11 +190,6 @@ cronstamps = $${directory:cronstamps} ...@@ -170,11 +190,6 @@ cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper} catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond binary = $${basedirectory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
[cron-entry-logrotate] [cron-entry-logrotate]
<= cron <= cron
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -182,31 +197,71 @@ name = logrotate ...@@ -182,31 +197,71 @@ name = logrotate
frequency = 0 0 * * * frequency = 0 0 * * *
command = $${logrotate:wrapper} command = $${logrotate:wrapper}
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
tmp = $${buildout:directory}/tmp/
[basedirectory] # Request frontend
recipe = slapos.cookbook:mkdirectory [request-frontend]
log = $${rootdirectory:var}/log/ <= slap-connection
services = $${rootdirectory:etc}/run/ recipe = slapos.cookbook:request
run = $${rootdirectory:var}/run/ name = Frontend
backup = $${rootdirectory:srv}/backup/ # XXX We have hardcoded SR URL here.
promises = $${rootdirectory:etc}/promise/ software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url custom_domain
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
return = site_url
config-custom_domain = $${slap-parameter:domain}
[directory]
recipe = slapos.cookbook:mkdirectory # Deploy slapmonitor
ca-dir = $${rootdirectory:srv}/ssl/ [slapmonitor]
httpd-log = $${basedirectory:log}/apache/ recipe = slapos.cookbook:slapmonitor
php-ini-dir = $${rootdirectory:etc}/php/ pid-file = $${basedirectory:run}/apache.pid
tmp-php = $${rootdirectory:tmp}/php/ database-path = $${basedirectory:log}/slapmonitor.db
logrotate-entries = $${rootdirectory:etc}/logrotate.d/ shell-path = ${dash:location}/bin/dash
logrotate-backup = $${basedirectory:backup}/logrotate/ slapmonitor-path = ${buildout:bin-directory}/slapmonitor
stunnel-conf = $${rootdirectory:etc}/stunnel/ path = $${basedirectory:services}/slapmonitor
cronstamps = $${rootdirectory:etc}/cronstamps/
cron-entries = $${rootdirectory:etc}/cron.d/ [slapreport]
crontabs = $${rootdirectory:etc}/crontabs/ recipe = slapos.cookbook:slapreport
pid-file = $${basedirectory:run}/apache.pid
database-path = $${basedirectory:log}/slapmonitor.db
consumption-log-path = $${basedirectory:log}/instance_consumption.log
logbox-ip = 87.98.152.12
logbox-port = 5122
logbox-user = admin
logbox-passwd = passer
shell-path = ${dash:location}/bin/dash
slapreport-path = ${buildout:bin-directory}/slapreport
path = $${basedirectory:services}/slapreport
# Publish all instance parameters (url of instance)
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = $${apache-php:url}
url = $${request-frontend:connection-site_url}
# Deploy promises scripts
[promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache
hostname = $${apache-php:ip}
port = $${apache-php:port}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[slap-parameter]
# Default value if no domain is specified
domain =
# Default value if no ssh parameter is specified
logbox-ip =
logbox-port =
logbox-user =
logbox-passwd =
...@@ -11,6 +11,8 @@ parts = ...@@ -11,6 +11,8 @@ parts =
logrotate-entry-cron logrotate-entry-cron
cron cron
cron-entry-logrotate cron-entry-logrotate
slapmonitor
slapreport
gzip-binary = ${gzip:location}/bin/gzip gzip-binary = ${gzip:location}/bin/gzip
...@@ -49,6 +51,26 @@ mysql-install-binary = ${mariadb:location}/bin/mysql_install_db ...@@ -49,6 +51,26 @@ mysql-install-binary = ${mariadb:location}/bin/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
mysqld-binary = ${mariadb:location}/libexec/mysqld mysqld-binary = ${mariadb:location}/libexec/mysqld
[slapmonitor]
recipe = slapos.cookbook:slapmonitor
pid-file = $${basedirectory:run}/mariadb.pid
database-path = $${basedirectory:log}/slapmonitor.db
shell-path = ${dash:location}/bin/dash
slapmonitor-path = ${buildout:bin-directory}/slapmonitor
path = $${basedirectory:services}/slapmonitor
[slapreport]
recipe = slapos.cookbook:slapreport
pid-file = $${basedirectory:run}/mariadb.pid
consumption-log-path = $${basedirectory:log}/instance_consumption.log
database-path = $${basedirectory:log}/slapmonitor.db
logbox-ip = 87.98.152.12
logbox-port = 5122
logbox-user = admin
logbox-passwd = passer
shell-path = ${dash:location}/bin/dash
slapreport-path = ${buildout:bin-directory}/slapreport
path = $${basedirectory:services}/slapreport
[certificate-authority] [certificate-authority]
recipe = slapos.cookbook:certificate_authority recipe = slapos.cookbook:certificate_authority
...@@ -185,3 +207,10 @@ mariadb-data = $${rootdirectory:srv}/mariadb/ ...@@ -185,3 +207,10 @@ mariadb-data = $${rootdirectory:srv}/mariadb/
logrotate-backup = $${basedirectory:backup}/logrotate/ logrotate-backup = $${basedirectory:backup}/logrotate/
stunnel-conf = $${rootdirectory:etc}/stunnel/ stunnel-conf = $${rootdirectory:etc}/stunnel/
logrotate-entries = $${rootdirectory:etc}/logrotate.d/ logrotate-entries = $${rootdirectory:etc}/logrotate.d/
[slap-parameter]
#Default value if no ssh parameters specified
logbox-ip =
logbox-port =
logbox-user =
logbox-passwd =
[buildout] [buildout]
extends = extends =
../component/nodejs/buildout.cfg ../component/nodejs/buildout.cfg
../component/lxml-python/buildout.cfg
../stack/slapos.cfg ../stack/slapos.cfg
versions = versions
parts = parts =
eggs
nodejs nodejs
npm
[eggs]
recipe = zc.recipe.egg
eggs =
slapos.cookbook
${lxml-python:egg}
...@@ -2,14 +2,17 @@ ...@@ -2,14 +2,17 @@
# Software Releases or Stacks can safely extend this stack. # Software Releases or Stacks can safely extend this stack.
[buildout] [buildout]
# Developers need to add explicitely this part in their software profile
parts = slapos-cookbook
# Generate list of automatically chosen eggs version # Generate list of automatically chosen eggs version
extensions += extensions +=
buildout-versions buildout-versions
# Use shacache and lxml # Use shacache and lxml
extends = extends =
shacache-client.cfg
../component/lxml-python/buildout.cfg ../component/lxml-python/buildout.cfg
shacache-client.cfg
# Separate from site eggs # Separate from site eggs
allowed-eggs-from-site-packages = allowed-eggs-from-site-packages =
...@@ -30,19 +33,18 @@ allow-hosts += ...@@ -30,19 +33,18 @@ allow-hosts +=
dist.repoze.org dist.repoze.org
effbot.org effbot.org
github.com github.com
launchpad.net
peak.telecommunity.com peak.telecommunity.com
psutil.googlecode.com psutil.googlecode.com
sourceforge.net
www.dabeaz.com www.dabeaz.com
www.owlfish.com www.owlfish.com
launchpad.net
# XXX: Workaround of SlapOS limitation # XXX: Workaround of SlapOS limitation
# Unzippig of eggs is required, as SlapOS do not yet provide nicely working # Unzippig of eggs is required, as SlapOS do not yet provide nicely working
# development / fast switching environment for whole software # development / fast switching environment for whole software
unzip = true unzip = true
parts += slapos-cookbook
versions = versions versions = versions
# Install slapos.cookbook containing all officials recipes # Install slapos.cookbook containing all officials recipes
...@@ -53,8 +55,5 @@ eggs = ...@@ -53,8 +55,5 @@ eggs =
slapos.cookbook slapos.cookbook
[versions] [versions]
# Use patched hexagonit.recipe.download from
# https://github.com/SlapOS/hexagonit.recipe.download
hexagonit.recipe.download = 1.5.1-dev-slapos-001
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-004 zc.buildout = 1.6.0-dev-SlapOS-006
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