Commit c6a51979 authored by Marco Mariani's avatar Marco Mariani

Merge branch 'master' into zimbra

parents 0bc71b45 453b3265
Changes
=======
0.78.1 (2013-05-31)
-------------------
* Fix slapos.cookbook:request: Add backward compatiblity about getInstanceGuid(). [Cedric de Saint Martin]
* slapos.cookbook:check_* promises: Add timeout to curl that is not otherwise killed by slapos promise subsystem. [Cedric de Saint Martin]
* Add boinc recipe: Allow to deploy an empty BOINC project. [Alain Takoudjou]
* Add boinc.app recipe: Allow to deploy and update a BOINC application into existing BOINC server instance . [Alain Takoudjou]
* Add boinc.client recipe: Allow to deploy a BOINC Client instance on SlapOS. [Alain Takoudjou]
* Add condor recipe: Allow to deploy Condor Manager or Condor worker instance on SlapOS. [Alain Takoudjou]
* Add condor.submit recipe: Allow to deploy or update application into existing Condor Manager instance. [Alain Takoudjou]
* Add redis.server recipe: Allow to deploy Redis server. [Alain Takoudjou]
* Add trac recipe: for deploying Trac and manage project with support of SVN and GIT. [Alain Takoudjou]
* Add bonjourgrid recipe: for deploying BonjourGrid Master and submit BOINC or Condor project. [Alain Takoudjou]
* Add bonjourgrid.client recipe: for deploying BonjourGrid Worker instance and execute BOINC or Condor Jobs. [Alain Takoudjou]
* Cloudooo: Allow any environment variables. [Yusei Tahara]
* ERP5: disable MariaDB query cache completely by 'query_cache_type = 0' for ERP5. [Kazuhiko Shiozaki]
* ERP5: enable haproxy admin socket and install haproxyctl script. [Kazuhiko Shiozaki]
* ERP5: increase the maximum number of open file descriptors before starting mysqld. [Kazuhiko Shiozaki]
0.78.0 (2013-04-28)
-------------------
* LAMP stack: Allow to give application-dependent parameters to application configuration file. [Cedric de Saint Martin]
* zabbix-agent: Allow user to pass zabbix parameter. [Cedric de Saint Martin]
* kvm frontend: listen to ipv6 and ipv4. [Jean-Baptiste Petre]
0.77.1 (2013-04-18)
-------------------
......
[buildout]
extends =
../apache/buildout.cfg
../python-2.7/buildout.cfg
../bzip2/buildout.cfg
../gdbm/buildout.cfg
../gettext/buildout.cfg
../libexpat/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../readline/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../file/buildout.cfg
parts =
apache-wsgi
[python2.7]
configure-options =
--enable-shared
--disable-static
--enable-ipv6
--enable-unicode=ucs4
--with-system-expat
--with-threads
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
LD_RUN_PATH=${buildout:parts-directory}/${:_buildout_section_name_}/lib
[apache-wsgi]
recipe = hexagonit.recipe.cmmi
url = http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
md5sum = f42d69190ea0c337ef259cbe8d94d985
configure-options =
--with-apxs=${apache:location}/bin/apxs
--with-python=${python2.7:location}/bin/python2.7
environment =
CPPFLAGS = -I${python2.7:location}/include/python2.7
LDFLAGS = -L${python2.7:location}/lib
......@@ -3,7 +3,7 @@ parts =
aspell
aspell-en-dictonary
extends =
extends =
../ncurses/buildout.cfg
[aspell-common-dictionary]
......@@ -15,11 +15,18 @@ stop-on-error = yes
[aspell]
recipe = slapos.recipe.cmmi
revision = 1
url = http://ftp.gnu.org/gnu/aspell/aspell-0.60.6.1.tar.gz
md5sum = e66a9c9af6a60dc46134fdacf6ce97d7
environment =
CPPFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
[aspell-en-dictionary]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-7.1-0.tar.bz2
md5sum = beba5e8f3afd3ed1644653bb685b2dfb
configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin
\ No newline at end of file
configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin
depends =
${aspell:url}
${aspell:revision}
--- a/client/scripts/Makefile.am 2012-08-24 12:11:10.400291229 +0200
+++ b/client/scripts/Makefile.am 2012-09-10 15:21:01.973773228 +0200
@@ -2,16 +2,16 @@
install-exec-hook:
chmod +x boinc-client
- $(INSTALL) -d $(DESTDIR)/etc/init.d
- $(INSTALL) -b boinc-client $(DESTDIR)/etc/init.d/boinc-client
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/etc/init.d
+ $(INSTALL) -b boinc-client $(DESTDIR)$(exec_prefix)/etc/init.d/boinc-client
if [ -d /etc/sysconfig ] ; then \
- $(INSTALL) -d $(DESTDIR)/etc/sysconfig ; \
- $(INSTALL) boinc-client.conf $(DESTDIR)/etc/sysconfig/boinc-client ; \
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/etc/sysconfig ; \
+ $(INSTALL) boinc-client.conf $(DESTDIR)$(exec_prefix)/etc/sysconfig/boinc-client ; \
elif [ -d /etc/default ] ; then \
- $(INSTALL) -d $(DESTDIR)/etc/default ; \
- $(INSTALL) boinc-client.conf $(DESTDIR)/etc/default/boinc-client ; \
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/etc/default ; \
+ $(INSTALL) boinc-client.conf $(DESTDIR)$(exec_prefix)/etc/default/boinc-client ; \
else \
- $(INSTALL) -d $(DESTDIR)/etc ; \
- $(INSTALL) boinc-client.conf $(DESTDIR)/etc/boinc-client.conf ; \
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/etc ; \
+ $(INSTALL) boinc-client.conf $(DESTDIR)$(exec_prefix)/etc/boinc-client.conf ; \
fi
\ No newline at end of file
[buildout]
parts =
boinc
extends =
../curl/buildout.cfg
../openssl/buildout.cfg
../zlib/buildout.cfg
../subversion/buildout.cfg
../m4/buildout.cfg
../automake/buildout.cfg
../libtool/buildout.cfg
../pkgconfig/buildout.cfg
../openldap/buildout.cfg
../gnutls/buildout.cfg
../../stack/slapos.cfg
[download-boinc]
recipe = slapos.recipe.download
url = http://boinc.berkeley.edu/dl/boinc_7.0.28_x86_64-pc-linux-gnu.sh
md5sum = efdfd115ae69227ceb6118ca09777988
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = boinc_7.0.28_x86_64-pc-linux-gnu.sh
mode = 0744
[boinc-bin]
recipe = plone.recipe.command
on_install = true
on_update = true
command = cp ${download-boinc:location}/${download-boinc:filename} ${buildout:parts-directory} && \
cd ${buildout:parts-directory} && \
./${download-boinc:filename}
#boinc client is a binary: write LD_LABRARY_PATH
ld_library = ${curl:location}/lib:${openssl:location}/lib:${zlib:location}/lib
location = ${buildout:parts-directory}/BOINC
[boinc-patch]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/boinc-abs-path.patch
md5sum = 412acedfbcdc8a9a7f196a02465da248
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = boinc-abs-path.patch
#checkout boinc package from svn repository
[boinc-package]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
# Compile now boinc client
[boinc]
recipe = slapos.recipe.cmmi
url = ${boinc-package:tarball}
configure-command =
echo 'AC_PROG_OBJCXX' >> configure.ac
aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal
./_autosetup
./configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-fcgi
--disable-shared
--enable-static
--with-pic
--disable-manager
--disable-server
--with-pkg-config
--with-ssl=${openssl:location}
--with-libldap=${openldap:location}/lib
--with-libgnutls=${gnutls:location}/lib
--with-libcurl=${curl:location}/lib
--with-x=no
patches =
${boinc-patch:location}/${boinc-patch:filename}
patch-options = -p1
environment =
PATH=${pkgconfig:location}/bin:${automake:location}/bin:${autoconf:location}/bin:${libtool:location}/bin:${subversion:location}/bin:${curl:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
M4=${m4:location}/bin/m4
CFLAGS=-fPIC
CPPFLAGS=-I${openssl:location}/include -I${zlib:location}/include
LDFLAGS = -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${libtool:location}/share/aclocal
[buildout]
parts=
mariadb
boinc
extends =
../subversion/buildout.cfg
../m4/buildout.cfg
../automake/buildout.cfg
../libtool/buildout.cfg
../pkgconfig/buildout.cfg
../openssl/buildout.cfg
../cyrus-sasl/buildout.cfg
../openldap/buildout.cfg
../gnutls/buildout.cfg
../mariadb/buildout.cfg
../curl/buildout.cfg
../../stack/slapos.cfg
[mariadb]
# Compile dir is for plugins, not needed in boinc
keep-compile-dir = false
#checkout boinc package from svn repository
[boinc-package]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
sed -i "20i\#include <unistd.h>" ${:location}/tools/process_input_template.cpp && \
sed -i "25i\#include <unistd.h>" ${:location}/sched/single_job_assimilator.cpp && \
sed -i "27i\#include <unistd.h>" ${:location}/tools/create_work.cpp && \
sed -i 's#--prefix=$(prefix)#--prefix=/$(prefix)#' ${:location}/py/Makefile.am && \
sed -i 's#parent::base_escape_string#@parent::base_escape_string#' ${:location}/html/inc/boinc_db.inc
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
# Compile now boinc
# When installing boinc python module, path /srv/slapgrid/... is strip to srv/slapgrid... It is why
# we need to set --prefix="/${buildout:parts-directory}/${:_buildout_section_name_}"
[boinc]
recipe = slapos.recipe.cmmi
url = ${boinc-package:tarball}
keep-compile-dir = true
source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__
configure-command =
echo 'AC_PROG_OBJCXX' >> configure.ac
aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal
./_autosetup
./configure
configure-options =
--prefix="${buildout:parts-directory}/${:_buildout_section_name_}"
--disable-fcgi
--disable-shared
--enable-static
--disable-manager
--disable-client
--with-pkg-config
--with-ssl=${openssl:location}
--with-libsasl2=${cyrus-sasl:location}/lib
--with-libldap=${openldap:location}/lib
--with-libgnutls=${gnutls:location}/lib
--with-libcurl=${curl:location}/lib
--with-x=no
environment =
PATH=${pkgconfig:location}/bin:${automake:location}/bin:${autoconf:location}/bin:${libtool:location}/bin:${subversion:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
M4=${m4:location}/bin/m4
CPPFLAGS=-I${openssl:location}/include -I${mariadb:location}/include
LDFLAGS = -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${mariadb:location}/lib -Wl,-rpath=${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
MYSQL_CONFIG=${mariadb:location}/bin/mysql_config
ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${libtool:location}/share/aclocal
\ No newline at end of file
[buildout]
extends =
../ncurses/buildout.cfg
parts =
cmake
......@@ -6,3 +9,6 @@ parts =
recipe = slapos.recipe.cmmi
url = http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
md5sum = 097278785da7182ec0aea8769d06860c
environment =
CMAKE_INCLUDE_PATH=${ncurses:location}/include
CMAKE_LIBRARY_PATH=${ncurses:location}/lib
[buildout]
parts =
condor
extends =
../libexpat/buildout.cfg
../kerberos/buildout.cfg
../perl/buildout.cfg
../java/buildout.cfg
../openldap/buildout.cfg
../dash/buildout.cfg
../zlib/buildout.cfg
../../stack/slapos.cfg
[condor]
recipe = slapos.recipe.build
slapos_promise =
directory:bin
directory:etc
directory:examples
directory:include
directory:lib
directory:libexec
directory:man
directory:src
directory:sbin
depends =
${libexpat:location}
${kerberos:location}
${perl:location}
${openldap:location}
${java:location}
${dash:location}
${zlib:location}
x86 = http://parrot.cs.wisc.edu//symlink/20130530031504/7/7.9/7.9.5/28b36a94ad1a405bac689a76b6c353a7/condor-7.9.5-x86_Debian6-unstripped.tar.gz 227059bb9bebc9033665bb246d90a7bb
x86-64 = http://parrot.cs.wisc.edu//symlink/20130530031504/7/7.9/7.9.5/7000a12f9a22765b457e2958762871d5/condor-7.9.5-x86_64_Debian6-stripped.tar.gz 30fa4cebabb8ff4971c769f4ef74ba68
script =
if not self.options.get('path'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
\ No newline at end of file
......@@ -10,7 +10,7 @@ parts =
curl
[curl]
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://curl.haxx.se/download/curl-7.30.0.tar.bz2
md5sum = 0db5ec03a5001b42a2edc03bf63b5ceb
configure-options =
......@@ -27,10 +27,12 @@ configure-options =
--disable-gopher
--enable-ipv6
--disable-sspi
--without-gnutls
--with-ssl=${openssl:location}
--with-zlib=${zlib:location}
--without-nss
--without-libssh2
--without-librtmp
--without-libidn
environment =
......
......@@ -19,18 +19,18 @@ md5sum = 5c781723a0d9ed6188960defba8e91cf
destination = ${fonts:location}/${:_buildout_section_name_}
# IPAex and IPA Font - Japanese fonts provided by IPA
# http://ossipedia.ipa.go.jp/ipafont/index.html
# http://ipafont.ipa.go.jp/
[ipaex-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://ossipedia.ipa.go.jp/ipafont/ipaexfont/IPAexfont00201.php
url = http://ipafont.ipa.go.jp/ipaexfont/IPAexfont00201.php
md5sum = 7bf84182a04a9632268dbcb03f100d05
destination = ${fonts:location}/${:_buildout_section_name_}
[ipa-fonts]
recipe = hexagonit.recipe.download
strip-top-level-dir = true
url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip
url = http://ipafont.ipa.go.jp/ipafont/IPAfont00303.php
md5sum = 39a828acf27790adbe4944dfb4d94bb1
destination = ${fonts:location}/${:_buildout_section_name_}
......
......@@ -12,8 +12,8 @@ parts =
[git]
recipe = slapos.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.12.tar.gz
md5sum = ceb1a6b17a3e33bbc70eadf8fce5876c
url = http://git-core.googlecode.com/files/git-1.8.2.3.tar.gz
md5sum = 03ebfd403a8cf355da0e3f15e53b8925
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
......
[buildout]
extends =
extends =
../readline/buildout.cfg
../ncurses/buildout.cfg
../zlib/buildout.cfg
......
......@@ -11,9 +11,9 @@ extends =
[groonga]
recipe = slapos.recipe.cmmi
version = 3.0.2
version = 3.0.4
url = http://packages.groonga.org/source/groonga/groonga-${:version}.tar.gz
md5sum = b17934ef2589a4e261ed0d99aec713eb
md5sum = d37e6391f9a7346166e0d1301e88dea5
configure-options =
--disable-static
--disable-glibtest
......@@ -27,9 +27,9 @@ environment =
[groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi
version = 1.0.2
version = 1.0.4
url = http://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-${:version}.tar.gz
md5sum = 782111599dcba5023beb698dc5ea514a
md5sum = 72c9d9fe5031c2c3af34dbbfcd46a9a9
location = ${groonga:location}
depends =
${groonga:version}
......
# jsl - command line javascript lint
# http://javascriptlint.com/
[buildout]
parts = jsl
[jsl]
recipe = slapos.recipe.build
url = http://www.javascriptlint.com/download/jsl-0.3.0-src.tar.gz
md5sum = 2b94ffa4fab07acabe0c5e73cd49bcdf
script =
location = %(location)r
self.failIfPathExists(location)
import sys
url = self.options['url']
md5sum = self.options['md5sum']
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir)
os.chdir(os.path.join(workdir, 'src'))
os.system('make -f Makefile.ref -j 1 DIST="%(location)s" all export')
[buildout]
parts =
kerberos
extends =
../../component/bison/buildout.cfg
[kerberos-package]
recipe = hexagonit.recipe.download
url = http://web.mit.edu/kerberos/dist/krb5/1.11/krb5-1.11.1-signed.tar
md5sum = 76c6bed945c5771674357cfd4a08e3f5
[kerberos]
recipe = hexagonit.recipe.cmmi
url = ${kerberos-package:location}/krb5-1.11.1.tar.gz
configure-command = src/configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
PATH=${bison:location}/bin:%(PATH)s
\ No newline at end of file
......@@ -2,7 +2,19 @@
parts =
libiconv
[libiconv.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 8a20d8afe0617fce56f77537d2b84621
download-only = true
filename = libiconv.gets.patch
[libiconv]
virtual-depends =
${libiconv.gets.patch:md5sum}
patch-options = -p1
patches =
${libiconv.gets.patch:location}/${libiconv.gets.patch:filename}
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
md5sum = e34509b1623cec449dfeb73d7ce9c6c6
--- libiconv-1.14.orig/srclib/stdio.in.h 2011-08-07 13:42:06.000000000 +0000
+++ libiconv-1.14/srclib/stdio.in.h 2013-01-09 19:56:21.115819812 +0000
@@ -680,22 +680,7 @@
#endif
#if @GNULIB_GETS@
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gets
-# define gets rpl_gets
-# endif
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
-# else
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
-# undef gets
-# endif
-_GL_CXXALIASWARN (gets);
-/* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#undef gets
#endif
......@@ -8,8 +8,8 @@ parts =
[libxml2]
recipe = slapos.recipe.cmmi
url = ftp://ftp.xmlsoft.org/libxml2/libxml2-2.9.0.tar.gz
md5sum = 5b9bebf4f5d2200ae2c4efe8fa6103f7
url = ftp://ftp.xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz
md5sum = 9c0cfef285d5c4a5c80d00904ddab380
configure-options =
--disable-static
--without-python
......
[buildout]
extends =
../libxml2/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
parts =
......@@ -19,7 +18,5 @@ configure-options =
--without-debug
--without-debugger
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-Wl,-rpath=${zlib:location}/lib
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
CPPFLAGS=-I${zlib:location}/include -I${libxml2:location}/include
LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -25,10 +25,10 @@ download-only = true
[mariadb]
recipe = slapos.recipe.cmmi
version = 5.5.30
version = 5.5.31
revision = 1
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb
md5sum = 39d4da4dabc8bda012517b3587dee6f8
md5sum = 3fe756bc76f0e7a3af2757e48ce0f3f4
# compile directory is required to build mysql plugins.
keep-compile-dir = true
patch-options = -p0
......@@ -62,8 +62,8 @@ environment =
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = slapos.recipe.cmmi
url = http://packages.groonga.org/source/mroonga/mroonga-3.02.tar.gz
md5sum = b2d1a4abc12030fdbd9064bbb6175366
url = http://packages.groonga.org/source/mroonga/mroonga-3.04.tar.gz
md5sum = 790d239c5bf5b98a760a78fdfcbe6803
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
......
......@@ -13,8 +13,8 @@ extends =
[poppler]
recipe = slapos.recipe.cmmi
md5sum = 3939740201c59c470bc7198003450a20
url = http://poppler.freedesktop.org/poppler-0.22.2.tar.gz
md5sum = be915388eaad6865cee5a156c8119ec1
url = http://poppler.freedesktop.org/poppler-0.22.3.tar.gz
depends =
${libtiff:version}
configure-options =
......
[buildout]
parts =
redis
extends = ../tcl/buildout.cfg
[redis]
recipe = hexagonit.recipe.cmmi
url = https://github.com/geoffgarside/redis/archive/ipv6.tar.gz
md5sum = 0eb594bd4e8ee746a0e2ef67b28cb5d8
configure-command = true
prefix =
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
V=1
make-targets =
install
test
environment =
PATH=${tcl:location}/bin:%(PATH)s
\ No newline at end of file
......@@ -5,8 +5,8 @@ parts =
[sqlite3]
recipe = slapos.recipe.cmmi
url = http://www.sqlite.org/2013/sqlite-autoconf-3071601.tar.gz
md5sum = 8860d1a1ed26d40f07e3c7ae035b644a
url = http://www.sqlite.org/2013/sqlite-autoconf-3071700.tar.gz
md5sum = 18c285053e9562b848209cb0ee16d4ab
configure-options =
--disable-static
--enable-readline
......
......@@ -10,6 +10,7 @@ extends =
../pkgconfig/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../swig/buildout.cfg
parts =
subversion
......@@ -59,3 +60,45 @@ environment =
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
[subversion-1.9]
recipe = hexagonit.recipe.cmmi
url = http://www.apache.org/dist/subversion/subversion-1.7.9.tar.gz
md5sum = dfb083e8bfac88aa28d606168b08e4ff
configure-options =
--disable-static
--with-apr=${apache:location}/bin/apr-1-config
--with-apr-util=${apache:location}/bin/apu-1-config
--with-apxs=${apache:location}/bin/apxs
--with-zlib=${zlib:location}
--with-sqlite=${sqlite3:location}
--with-neon=${neon:location}
--with-swig=${swig:location}/bin/swig
--without-berkeley-db
--without-sasl
--without-apr_memcache
--without-gnome-keyring
--without-kwallet
--without-jdk
--without-jikes
--without-junit
--without-ctypesgen
--without-ruby-sitedir
--without-ruby-test-verbose
--disable-nls
# it seems that parallel build sometimes fails.
make-options =
-j1
make-targets =
install
swig-py
install-swig-py
environment =
PATH=${pkgconfig:location}/bin:${neon:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
[buildout]
parts = tcl
[tcl-package]
recipe = hexagonit.recipe.download
url = http://prdownloads.sourceforge.net/tcl/tcl8.5.13-src.tar.gz
md5sum = fa3a9bf9b2d6ed2431f1baa46f4058b8
strip-top-level-dir = true
[tcl]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = cd ${tcl-package:location}/unix &&
./configure --prefix=${:location} &&
make &&
make test &&
make install
\ No newline at end of file
......@@ -4,5 +4,5 @@ parts =
[zlib]
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/libpng/zlib-1.2.6.tar.bz2?download
md5sum = dc2cfa0d2313ca77224b4d932b2911e9
url = http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
md5sum = 44d667c142d7cda120332623eab69f40
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.77.2.dev'
version = '0.78.2.dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -57,6 +57,7 @@ setup(name=name,
'netaddr', # to manipulate on IP addresses
'setuptools', # namespaces
'inotifyx', # to watch filesystem changes (used in lockfile)
'lock_file', #another lockfile implementation for multiprocess
'slapos.core', # uses internally
# 'slapos.toolbox', # needed for libcloud, cloudmgr, disabled for now
'xml_marshaller', # need to communication with slapgrid
......@@ -71,10 +72,15 @@ setup(name=name,
'agent = slapos.recipe.agent:Recipe',
'apache.frontend = slapos.recipe.apache_frontend:Recipe',
'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe',
'apacheperl = slapos.recipe.apacheperl:Recipe',
'apacheperl = slapos.recipe.apacheperl:Recipe',
'apachephp = slapos.recipe.apachephp:Recipe',
'apachephpconfigure = slapos.recipe.apachephpconfigure:Recipe',
'apacheproxy = slapos.recipe.apacheproxy:Recipe',
'boinc = slapos.recipe.boinc:Recipe',
'boinc.app = slapos.recipe.boinc:App',
'boinc.client = slapos.recipe.boinc:Client',
'bonjourgrid = slapos.recipe.bonjourgrid:Recipe',
'bonjourgrid.client = slapos.recipe.bonjourgrid:Client',
'certificate_authority = slapos.recipe.certificate_authority:Recipe',
'certificate_authority.request = slapos.recipe.certificate_authority:Request',
'check_page_content = slapos.recipe.check_page_content:Recipe',
......@@ -82,6 +88,8 @@ setup(name=name,
'check_url_available = slapos.recipe.check_url_available:Recipe',
'cloud9 = slapos.recipe.cloud9:Recipe',
'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe',
'condor = slapos.recipe.condor:Recipe',
'condor.submit = slapos.recipe.condor:AppSubmit',
'configurationfile = slapos.recipe.configurationfile:Recipe',
'cron = slapos.recipe.dcron:Recipe',
'cron.d = slapos.recipe.dcron:Part',
......@@ -159,6 +167,7 @@ setup(name=name,
'publishurl = slapos.recipe.publishurl:Recipe',
'pwgen = slapos.recipe.pwgen:Recipe',
'pwgen.stable = slapos.recipe.pwgen:StablePasswordGeneratorRecipe',
'redis.server = slapos.recipe.redis:Recipe',
'request = slapos.recipe.request:Recipe',
'request.serialised = slapos.recipe.request:Serialised',
'request.edge = slapos.recipe.request:RequestEdge',
......@@ -186,6 +195,7 @@ setup(name=name,
'stunnel = slapos.recipe.stunnel:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe',
'trac = slapos.recipe.trac:Recipe',
'urlparse = slapos.recipe._urlparse:Recipe',
'uuid = slapos.recipe._uuid:Recipe',
'vifib = slapos.recipe.vifib:Recipe',
......@@ -203,3 +213,4 @@ setup(name=name,
],
},
)
......@@ -33,6 +33,27 @@ from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options):
self.environ = {}
environment_section = options.get('environment-section', '').strip()
if environment_section and environment_section in buildout:
# Use environment variables from the designated config section.
self.environ.update(buildout[environment_section])
for variable in options.get('environment', '').splitlines():
if variable.strip():
try:
key, value = variable.split('=', 1)
self.environ[key.strip()] = value
except ValueError:
raise zc.buildout.UserError('Invalid environment variable definition: %s', variable)
# Extrapolate the environment variables using values from the current
# environment.
for key in self.environ:
self.environ[key] = self.environ[key] % os.environ
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
path_list = []
......@@ -54,21 +75,22 @@ class Recipe(GenericBaseRecipe):
path_list.append(php_ini)
# Install apache
apache_config = dict(
pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'],
ip=self.options['ip'],
port=self.options['port'],
error_log=self.options['error-log'],
access_log=self.options['access-log'],
document_root=self.options['htdocs'],
php_ini_dir=self.options['php-ini-dir'],
)
httpd_conf = self.createFile(self.options['httpd-conf'],
self.substituteTemplate(self.getTemplateFilename('apache.in'),
apache_config)
)
path_list.append(httpd_conf)
if self.optionIsTrue('default-conf', True):
apache_config = dict(
pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'],
ip=self.options['ip'],
port=self.options['port'],
error_log=self.options['error-log'],
access_log=self.options['access-log'],
document_root=self.options['htdocs'],
php_ini_dir=self.options['php-ini-dir'],
)
httpd_conf = self.createFile(self.options['httpd-conf'],
self.substituteTemplate(self.getTemplateFilename('apache.in'),
apache_config)
)
path_list.append(httpd_conf)
wrapper = self.createWrapper(name=self.options['wrapper'],
command=self.options['httpd-binary'],
......@@ -76,7 +98,8 @@ class Recipe(GenericBaseRecipe):
'-f',
self.options['httpd-conf'],
'-DFOREGROUND'
])
],
environment=self.environ)
path_list.append(wrapper)
secret_key_filename = os.path.join(self.buildout['buildout']['directory'],
......@@ -105,6 +128,11 @@ class Recipe(GenericBaseRecipe):
port=self.options['port'],
# XXX-Cedric: add frontend url.
)
# Allow to give custom parameters to template
application_parameter_prefix = 'application-'
for key in self.options.keys():
if key.startswith(application_parameter_prefix):
application_conf[key.lstrip(application_parameter_prefix)] = self.options[key]
directory, file_ = os.path.split(self.options['configuration'])
......
This diff is collapsed.
This diff is collapsed.
#!%(dash)s
sed -i "/remove the die/d" %(installroot)s/html/ops/create_forums.php
sed -i "s#REPLACE WITH PROJECT NAME#%(fullname)s#" %(installroot)s/html/project/project.inc
sed -i "s#REPLACE WITH COPYRIGHT HOLDER#%(copyright)s#" %(installroot)s/html/project/project.inc
sed -i.old -e "/<\/config>/i\<uldl_pid>%(uldl_pid)s</uldl_pid>" %(installroot)s/config.xml
sed -i.old -e "/<\/config>/i\<httpd_user>%(user)s</httpd_user>" %(installroot)s/config.xml
#!%(dash)s
if [ $# -ne 2 ]
then
echo not enough argument.
echo ARGS: appname installroot
else
sed -i.old -e "/<\/boinc>/i\<app>\n<name>$1</name>\n<user_friendly_name>$1</user_friendly_name>\n</app>" $2/project.xml
sed -i.old -e "/<\/daemons>/i\<daemon>\n<cmd>\nsample_bitwise_validator -d 3 -app $1\n</cmd>\n</daemon>" $2/config.xml
sed -i.old -e "/<\/daemons>/i\<daemon>\n<cmd>\nsample_assimilator -d 3 -app $1\n</cmd>\n</daemon>" $2/config.xml
fi
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import os
import subprocess
import pwd
import signal
import zc.buildout
class Recipe(GenericBaseRecipe):
"""Deploy a fully operational BonjourGrid Master architecture."""
def install(self):
path_list = []
condor_wrapper = self.options['condor-wrapper'].strip()
boinc_wrapper = self.options['boinc-wrapper'].strip()
startCondor = startBoinc = False
condor_wrapper_list = []
boinc_wrapper_list = []
for file in os.listdir(condor_wrapper):
condor_wrapper_list.append(os.path.join(condor_wrapper, file))
for file in os.listdir(boinc_wrapper):
boinc_wrapper_list.append(os.path.join(boinc_wrapper, file))
type = self.options['type'].strip()
if type == "condor":
startCondor = True
project = self.options['condor_host'].strip()
if type == "boinc":
project = self.options['url-boinc'].strip()
startBoinc = True
#Generate BOINC/Condor launcher script
grid_wrapper = self.options['boinc_condor_wrapper'].strip()
parameters = dict(startCondor=startCondor, startBoinc=startBoinc,
bg_base=self.options['work_dir'].strip(),
condor_wrapper_list=condor_wrapper_list,
boinc_wrapper_list=boinc_wrapper_list)
bonjourGrid_wrapper = self.createPythonScript(grid_wrapper,
'%s.configure.launchScript' % __name__,
parameters
)
path_list.append(bonjourGrid_wrapper)
#Generate wrapper for BonjourGrid Master
bonjourgrid_master = self.options['master_script'].strip()
python = self.options['python-bin'].strip()
bg_wrapper = self.options['wrapper'].strip()
log = self.options['log_file'].strip()
pid_file = self.options['pid_file'].strip()
wrapper = self.createPythonScript(bg_wrapper,
'slapos.recipe.librecipe.execute.execute',
([python, bonjourgrid_master, '--log_file', log,
'--pid_file', pid_file,
'--master_wrapper', grid_wrapper,
'--directory', self.options['work_dir'].strip(),
'--server', self.options['redis-url'].strip(),
'--port', self.options['redis-port'].strip(),
'--num_workers', self.options['nworkers'].strip(),
])
)
path_list.append(wrapper)
#generate Computer information file
config_info_file = os.path.join(self.options['work_dir'].strip(),
'machineinfo.sh')
config_info = self.createFile(config_info_file,
self.substituteTemplate(self.getTemplateFilename('machineinfo.sh.in'),
dict(ip_address=self.options['ipv6'].strip(),
project=project,
middleware=type)))
os.chmod(config_info_file, 0744)
path_list.append(config_info)
update = install
class Client(GenericBaseRecipe):
def install(self):
path_list = []
boinc_script = self.options['boinc_script'].strip()
condor_script = self.options['condor_script'].strip()
#Generate wrapper for BonjourGrid Worker
bonjourgrid_client = self.options['client_script'].strip()
python = self.options['python-bin'].strip()
bg_wrapper = self.options['wrapper'].strip()
log = self.options['log_file'].strip()
pid_file = self.options['pid_file'].strip()
wrapper = self.createPythonScript(bg_wrapper,
'slapos.recipe.librecipe.execute.execute',
([python, bonjourgrid_client, '--log_file', log,
'--pid_file', pid_file,
'--boinc_wrapper', boinc_script,
'--condor_wrapper', condor_script,
'--directory', self.options['work_dir'].strip(),
'--install_directory', self.options['install_dir'].strip(),
'--server', self.options['redis-url'].strip(),
'--port', self.options['redis-port'].strip(),
])
)
path_list.append(wrapper)
#generate BOINC and Condor configure script for bonjourgrid
boinc_wrapper = self.createPythonScript(boinc_script,
'%s.boinc.runBoinc' % __name__,
dict(ipv6=self.options['ipv6'].strip(),
email=self.options['email'].strip(),
boinc_wrapper=self.options['boinc_wrapper'].strip(),
boinc_cmd=self.options['boinc_cmd'].strip(),
boinc_rpc_port=self.options['boinc_rpc_port'],
boinc_install_dir=self.options['boinc_install_dir'].strip(),
boinc_passwd=self.options['boinc_passwd'].strip(),
account_name=self.options['account_name'].strip(),
account_passwd=self.options['account_passwd'].strip(),
)
)
path_list.append(boinc_wrapper)
condor_wrapper = self.createPythonScript(condor_script,
'%s.condor.runCondor' % __name__,
dict(ipv6=self.options['ipv6'].strip(),
condor_bin=self.options['condor_bin'].strip(),
condor_sbin=self.options['condor_sbin'].strip(),
condor_wrapper=self.options['condor_wrapper'].strip(),
condor_config=self.options['condor_config'].strip(),
condor_config_local=self.options['condor_config_local'].strip(),
)
)
path_list.append(condor_wrapper)
# -*- coding: utf-8 -*-
import os
import sys
import re
import subprocess
import time
import signal
def startProcess(launch_args, env=None, cwd=None, stdout=subprocess.PIPE):
process = subprocess.Popen(launch_args, stdout=stdout,
stderr=subprocess.STDOUT, env=env,
cwd=cwd)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
raise NameError("Failed to execute executable.\nThe error was: %s" % result)
def joinProject(args, base_cmd):
"""Finish BOINC Client configuration with create account and attach project"""
project_args = base_cmd + ['--project_attach', args['project_url'],
args['key']]
startProcess(project_args, cwd=args['boinc_install_dir'])
def createAccount(config, base_cmd):
"""Connect to BOINC Master and create an account
"""
account_args = base_cmd + ['--create_account', config['project_url'],
config['email'], config['account_passwd'],
config['account_name']]
startProcess(account_args, cwd=config['boinc_install_dir'])
account_file = os.path.join(config['boinc_install_dir'], 'create_account.xml')
key = re.search("<authenticator>([\w\d\._]+)</authenticator>",
open(account_file, 'r').read()).group(1)
return key
def runBoinc(config):
if len(sys.argv) < 2:
print "Argument Error: uses %s project_url" % sys.argv[0]
exit(1)
if type(config) == type(""):
print "Error: bonjourgrid.xml parsing error, file not exist or corrupted"
exit(1)
#XXX Using define values here for Boinc Master URL
config['project_url'] = sys.argv[1]
#launch Boinc Client
boinc = subprocess.Popen([config['boinc_wrapper']],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
#Retrieve ipv4 using by Boinc-client in client-configuration
client_config = os.path.join(config['boinc_install_dir'], 'client_state.xml')
while not os.path.exists(client_config):
time.sleep(5)
print "Search for file '%r'..." % client_config
time.sleep(10)
try:
#Scan client state xml to find client ipv4 adress
host = re.search("<ip_addr>([\w\d\.:]+)</ip_addr>",
open(client_config, 'r').read()).group(1)
base_cmd = [config['boinc_cmd'], '--host',
host + ":" + str(config['boinc_rpc_port']),
'--passwd', config['boinc_passwd']]
#Create Account for current instance on BOINC master
print "Create account for current client..."
key = createAccount(config, base_cmd)
config['key'] = key
print "Done. The account key is %s" % key
#Attach project to Boinc Master
print "Attach client to Boinc Master at %s " % config['project_url']
try:
joinProject(config, base_cmd)
except Exception, e:
print e
print "Done! Waiting for Boinc Client now..."
except Exception, e:
#An error occure!!!
os.kill(boinc.pid, signal.SIGTERM)
print e
#wait for Boinc client execution
boinc.wait()
# -*- coding: utf-8 -*-
import os
import sys
import re
import subprocess
import time
def writeFile(file, content):
f = open(file, 'w')
f.write(content)
f.close()
def updateCondorConfig(path, path_local, hostname, ipv6):
"""Replace Static information into condor_config and condor_config.local files"""
#replace condor host into condor_config
text = open(path, 'r').read()
text = re.sub(r'\[%s\]' % ipv6, hostname, text, flags=re.IGNORECASE)
writeFile(path, text)
#replace condor host into condor_config.local
text = open(path_local, 'r').read()
text = re.sub(r'\[%s\]' % ipv6, hostname, text, flags=re.IGNORECASE)
writeFile(path_local, text)
def updateCondorWrapper(folder, hostname, ipv6):
"""Replace slapos generated value by the true value"""
for file in os.listdir(folder):
path = os.path.join(folder, file)
if os.path.exists(path) and not os.path.isdir(path):
text = re.sub(r'\[%s\]' % ipv6, hostname, open(path, 'r').read(),
flags=re.IGNORECASE)
writeFile(path, text)
def runCondor(config):
if len(sys.argv) < 2:
print "Argument Error: uses %s hostname" % sys.argv[0]
exit(1)
hostname = sys.argv[1]
updateCondorConfig(config['condor_config'], config['condor_config_local'],
hostname, config['ipv6'])
updateCondorWrapper(config['condor_bin'], hostname, config['ipv6'])
updateCondorWrapper(config['condor_sbin'], hostname, config['ipv6'])
#launch Boinc Client
condor = subprocess.Popen([config['condor_wrapper']],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
condor.wait()
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import subprocess
import time
def runProcess(args, file):
filename = file.split('/')[-1:][0]
stdout_file = open(os.path.join(args['bg_log'], filename + ".log"), 'w')
process = subprocess.Popen(file, stdout=stdout_file,
stderr=subprocess.STDOUT)
fp = open(os.path.join(args['bg_pid'], filename + '.pid'), 'w')
fp.write(str(process.pid))
fp.close()
return process.pid
def launchScript(args):
print "Sleep for a few second..."
time.sleep(10)
pid_list = []
bg_pid = os.path.join(args['bg_base'], 'pid')
bg_log = os.path.join(args['bg_base'], 'log')
args['bg_pid'] = bg_pid
args['bg_log'] = bg_log
if not os.path.exists(bg_pid):
os.mkdir(bg_pid)
if not os.path.exists(bg_log):
os.mkdir(bg_log)
#launch all Condor wrapper
if args['startCondor']:
for file in args['condor_wrapper_list']:
pid_list.append(runProcess(args, file))
#Launch all BOINC wrapper
if args['startBoinc']:
for file in args['boinc_wrapper_list']:
pid_list.append(runProcess(args, file))
for pid in pid_list:
print "Parent waiting for process child: %s " % pid
result = os.waitpid(pid, 0)
print "Done...", result
# This script generates a file (with the name `hostname`) of the characteristics of the machine
Mhz=`grep -i Mhz /proc/cpuinfo | cut -d : -f2 | head -1 | cut -f2 -d " "`
mem=`grep -i MemTotal /proc/meminfo | cut -f2 -d :`
Ram=`echo $mem | cut -f1 -d " "`
Cpu=`uname -a | cut -f3 -d " "`
H=`hostname`
Nbproc=`grep processor /proc/cpuinfo |wc -l`
Ip=%(ip_address)s
status="in execution"
secours="host1"
middleware="%(middleware)s"
project="%(project)s"
c="{'"MHZ"':\"$Mhz\",'"Ram"':\"$Ram\",'"Cpu"':\"$Cpu\",'"HOST"':\"$H\",'"IP"':\"$Ip\",'"STATUS"':\"$status\",'"SECOURS"':\"$secours\",'"MIDDLEWARE"':\"$middleware\",'"PROJECT"':\"$project\",}"
filename=`hostname`
echo $c > $filename
......@@ -29,16 +29,17 @@ import sys
class Recipe(GenericBaseRecipe):
"""
Create script that will check if content at "url" is available
Create script that will check if content at "url" is available
(e.g page has a link to itself).
"""
def install(self):
url = self.options['url'].strip()
config = {
'url': self.options['url'],
'url': url,
'shell_path': self.options['dash_path'],
'curl_path': self.options['curl_path'],
'match': self.options.get('match', self.options['url'])
'match': self.options.get('match', url)
}
# XXX-Cedric in this script, curl won't check certificate
......
......@@ -10,7 +10,7 @@ if [ -z $URL ]; then
exit 3
fi
%(curl_path)s -k -sL $URL | grep "$MATCH" > /dev/null
%(curl_path)s -k -sL $URL --max-time 10 | grep "$MATCH" > /dev/null
if [ $? != 0 ]; then
echo "Content at $URL seems to be corrupted" >&2
......
......@@ -9,7 +9,7 @@ if [ -z $URL ]; then
exit 3
fi
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} -o /dev/null)
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} --max-time 10 -o /dev/null)
if [ $? -eq 3 ]; then
echo "URL malformed: $URL." >&2
......
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import subprocess
import time
def submitJob(args):
"""Run condor_submit (if needed) for job deployment"""
time.sleep(10)
print "Check if needed to submit %s job's" % args['appname']
if not os.path.exists(args['sig_install']):
print "Nothing for install or update...Exited"
return
# '-a', "log = out.log", '-a', "error = error.log",
launch_args = [args['submit'], '-verbose', args['submit_file']]
process = subprocess.Popen(launch_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, cwd=args['appdir'])
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
print "Failed to execute condor_submit.\nThe error was: %s" % result
else:
os.unlink(args['sig_install'])
def condorStart(args):
"""Start Condor if deamons is currently stopped"""
result = os.system(args['condor_reconfig'])
if result != 0:
#process failled to reconfig condor that mean that condor deamons is not curently started
os.system(args['start_bin'])
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
## Pathnames:
## Where have you installed the bin, sbin and lib condor directories?
RELEASE_DIR = %(releasedir)s
## Where is the local condor directory for each host?
## This is where the local config file(s), logs and
## spool/execute directories are located
LOCAL_DIR = %(localdir)s
## Mail parameters:
## When something goes wrong with condor at your site, who should get
## the email?
CONDOR_ADMIN =
## The user/group ID <uid>.<gid> of the "Condor" user.
## (this can also be specified in the environment)
## Note: the CONDOR_IDS setting is ignored on Win32 platforms
CONDOR_IDS = %(slapuser)s
## Condor needs to create a few lock files to synchronize access to
## various log files. Because of problems we've had with network
## filesystems and file locking over the years, we HIGHLY recommend
## that you put these lock files on a local partition on each
## machine. If you don't have your LOCAL_DIR on a local partition,
## be sure to change this entry. Whatever user (or group) condor is
## running as needs to have write access to this directory. If
## you're not running as root, this is whatever user you started up
## the condor_master as. If you are running as root, and there's a
## condor account, it's probably condor. Otherwise, it's whatever
## you've set in the CONDOR_IDS environment variable. See the Admin
## manual for details on this.
LOCK = /tmp/condor-lock.$(HOSTNAME)0.829500835462571
DAEMON_LIST = MASTER, SCHEDD, STARTD
## Java parameters:
## If you would like this machine to be able to run Java jobs,
## then set JAVA to the path of your JVM binary. If you are not
## interested in Java, there is no harm in leaving this entry
## empty or incorrect.
JAVA = %(java-bin)s
JAVA_MAXHEAP_ARGUMENT = -Xmx1024m
......@@ -38,16 +38,20 @@ class Recipe(GenericBaseRecipe):
port=int(self.options['port']),
openoffice_port=int(self.options['openoffice-port']),
)
environment_variable_list = []
for env_line in self.options['environment'].splitlines():
env_line = env_line.strip()
if not env_line:
continue
if '=' in env_line:
env_key, env_value = env_line.split('=')
conversion_server_dict[env_key.strip()] = env_value.strip()
environment_variable_list.append((env_key.strip(), env_value.strip()))
else:
raise zc.buildout.UserError('Line %r in environment parameter is '
'incorrect' % env_line)
conversion_server_dict['ENVIRONMENT_VARIABLE_LIST'] = '\n'.join(
['env-%s = %s' % (key, value) for key, value in environment_variable_list]
)
config_file = self.createFile(self.options['configuration-file'],
self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'),
conversion_server_dict))
......
......@@ -33,9 +33,9 @@ application_hostname = %(ip)s
# OpenOffice Port
openoffice_port = %(openoffice_port)s
# LD_LIBRARY_PATH passed to OpenOffice
env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s
env-FONTCONFIG_FILE = %(FONTCONFIG_FILE)s
# LD_LIBRARY_PATH and other environment variables
# passed to OpenOffice
%(ENVIRONMENT_VARIABLE_LIST)s
#
# Mimetype Registry
......
......@@ -34,6 +34,22 @@ def runMysql(args):
print "Starting %r" % mysqld_wrapper_list[0]
sys.stdout.flush()
sys.stderr.flush()
# try to increase the maximum number of open file descriptors.
# it seems that mysqld requires (max_connections + 810) file descriptors.
# to make it possible, you need to set the hard limit of nofile in
# /etc/security/limits.conf like the following :
# @slapsoft hard nofile 2048
try:
import resource
required_nofile = 2048 # XXX hardcoded value more than 1000 + 810
nofile_limit_list = [max(x, required_nofile) for x in resource.getrlimit(resource.RLIMIT_NOFILE)]
resource.setrlimit(resource.RLIMIT_NOFILE, nofile_limit_list)
except ImportError:
# resource library is only available on Unix platform.
pass
except ValueError:
# 'ValueError: not allowed to raise maximum limit'
pass
os.execl(mysqld_wrapper_list[0], *mysqld_wrapper_list)
......
......@@ -23,6 +23,7 @@ slow_query_log_file = %(slow_query_log)s
long_query_time = 1
max_allowed_packet = 128M
query_cache_size = 0
query_cache_type = 0
plugin-load = ha_mroonga.so;handlersocket.so
......
......@@ -36,8 +36,12 @@ class Recipe(GenericBaseRecipe):
binary-path -- location of the haproxy command
ctl-path -- location of the haproxy control script
conf-path -- location of the configuration file
socket-path -- location of the socket file for administration
ip -- ip of the haproxy server
port -- port of the haproxy server
......@@ -108,6 +112,7 @@ class Recipe(GenericBaseRecipe):
self.options['conf-path'],
self.substituteTemplate(
self.getTemplateFilename('haproxy.cfg.in'),
{'socket_path': self.options['socket-path']},
{'server_text': server_snippet},
)
)
......@@ -115,4 +120,8 @@ class Recipe(GenericBaseRecipe):
self.options['wrapper-path'],
'slapos.recipe.librecipe.execute.execute',
arguments=[self.options['binary-path'].strip(), '-f', configuration_path],)
return [configuration_path, wrapper_path]
ctl_path = self.createPythonScript(
self.options['ctl-path'],
'%s.haproxy.haproxyctl' % __name__,
{'socket_path':self.options['socket-path']})
return [configuration_path, wrapper_path, ctl_path]
import socket
try:
import readline
except ImportError:
pass
def haproxyctl(conf):
while True:
try:
l = raw_input('> ')
except EOFError:
print
break
if l == 'quit':
break
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(conf['socket_path'])
s.send('%s\n' % l)
while True:
r = s.recv(1024)
if not r:
break
print r
s.close()
global
maxconn 4096
stats socket %(socket_path)s level admin
defaults
log global
......
......@@ -128,7 +128,8 @@ class GenericBaseRecipe(object):
path, arguments=arguments)[0]
return script
def createWrapper(self, name, command, parameters, comments=[], parameters_extra=False):
def createWrapper(self, name, command, parameters, comments=[],
parameters_extra=False, environment=None):
"""
Creates a very simple (one command) shell script for process replacement.
Takes care of quoting.
......@@ -139,6 +140,10 @@ class GenericBaseRecipe(object):
for comment in comments:
lines.append('# %s' % comment)
if environment:
for key in environment:
lines.append('export %s=%s' % (key, environment[key]))
lines.append('exec %s' % shlex.quote(command))
for param in parameters:
......
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
path_list = []
if not self.optionIsTrue('use_passwd', False):
master_passwd = "# masterauth <master-password>"
else:
master_passwd = "masterauth %s" % self.options['passwd']
config_file = self.options['config_file'].strip()
configuration = dict(pid_file=self.options['pid_file'],
port=self.options['port'],
ipv6=self.options['ipv6'],
server_dir=self.options['server_dir'],
log_file=self.options['log_file'],
master_passwd=master_passwd
)
config = self.createFile(config_file,
self.substituteTemplate(self.getTemplateFilename('redis.conf.in'),
configuration))
path_list.append(config)
redis = self.createPythonScript(
self.options['wrapper'],
'slapos.recipe.librecipe.execute.execute',
[self.options['server_bin'], config_file]
)
path_list.append(redis)
promise_script = self.options.get('promise_wrapper', '').strip()
if promise_script:
promise = self.createPythonScript(
promise_script,
'%s.promise.main' % __name__,
dict(host=self.options['ipv6'], port=self.options['port'])
)
path_list.append(promise)
return path_list
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import slapos.recipe.redis.MyRedis2410 as redis
import sys
def main(args):
host = args['host']
port = int(args['port'])
try:
pool = redis.ConnectionPool(host=host, port=port, db=0)
r = redis.Redis(connection_pool=pool)
r.publish("Promise-Service","SlapOS Promise")
pool.disconnect()
sys.exit(0)
except Exception, e:
print str(e)
sys.exit(1)
\ No newline at end of file
This diff is collapsed.
......@@ -131,8 +131,8 @@ class Recipe(object):
options['instance-guid'] = self.instance.getInstanceGuid()
# XXX: deprecated, to be removed
options['instance_guid'] = self.instance.getInstanceGuid()
except slapmodule.ResourceNotReady:
# Backward compatibility. Old SlapOS masters don't know this.
except (slapmodule.ResourceNotReady, AttributeError):
# Backward compatibility. Old SlapOS master and core don't know this.
self.logger.warning("Impossible to fetch instance GUID.")
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady) as exc:
self._raise_request_exception = exc
......
......@@ -38,7 +38,7 @@ class Recipe(GenericBaseRecipe):
self.software_directory = options['software-directory'].strip()
self.instance_directory = options['instance-directory'].strip()
self.partition_amount = options['partition-amount'].strip()
self.cloud9_url = options['cloud9-url'].strip()
self.cloud9_url = options.get('cloud9-url', '').strip()
self.log_file = os.path.join(options['log_dir'].strip(), 'slaprunner.log')
# Set slaprunner access URL
options['access-url'] = 'http://[%s]:%s' % (self.ipv6, self.runner_port)
......@@ -109,7 +109,7 @@ class Test(GenericBaseRecipe):
self.software_directory = options['software-directory'].strip()
self.instance_directory = options['instance-directory'].strip()
self.partition_amount = options['partition-amount'].strip()
self.cloud9_url = options['cloud9-url'].strip()
self.cloud9_url = options.get('cloud9-url', '').strip()
# Set slaprunner access URL
options['access-url'] = 'http://[%s]:%s' % (self.ipv6, self.runner_port)
......
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import sys
import subprocess
import shutil
import json
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options):
pythonPath = ""
for eggs in options['eggs-dirs'].splitlines():
if eggs:
for item in os.listdir(eggs):
path = os.path.join(eggs, item)
pythonPath = path + ":" + pythonPath
options['python_path'] = pythonPath
options['wsgi-dir'] = os.path.join(options['site-dir'].strip(), 'apache')
options['git-dir'] = os.path.join(options['site-dir'].strip(), 'git')
options['svn-dir'] = os.path.join(options['site-dir'].strip(), 'svn')
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
install_path = []
env = os.environ
env['LD_LIBRARY_PATH'] = self.options['python-lib']
project_dir = self.options['site-dir'].strip()
trac_admin = self.options['trac-admin'].strip()
admin = self.options['admin-user'].strip()
passwd = self.options['admin-password'].strip()
config = os.path.join(project_dir, 'conf/trac.ini')
filestat = self.options['file-status'].strip()
self.logger.info("Checking if trac project is not installed...")
if os.path.exists(filestat):
os.unlink(filestat)
if not os.path.exists(project_dir):
self.logger.info("Starting trac project installation at %s" % project_dir)
trac_args = [trac_admin, project_dir, 'initenv']
db_string = "mysql://%s:%s@%s:%s/%s" % (
self.options['mysql-username'].strip(),
self.options['mysql-password'].strip(),
self.options['mysql-host'].strip(),
self.options['mysql-port'].strip(),
self.options['mysql-database'].strip()
)
process_install = subprocess.Popen(trac_args, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
process_install.stdin.write('%s\n%s\n' % (self.options['project'].strip(),
db_string))
result = process_install.communicate()[0]
process_install.stdin.close()
if process_install.returncode is None or process_install.returncode != 0:
if os.path.exists(project_dir):
shutil.rmtree(project_dir)
self.logger.error("Failed to initialize Trac.\nThe error was: %s" % result)
return []
os.mkdir(self.options['git-dir'])
os.mkdir(self.options['svn-dir'])
os.mkdir(self.options['wsgi-dir'])
os.unlink(config)
shutil.copy(self.options['trac-ini'].strip(), config)
shutil.copy(self.options['trac-wsgi'].strip(),
os.path.join(self.options['wsgi-dir'], 'trac.wsgi'))
else:
self.logger.info("The directory %s already exist, skip project installation"
% project_dir)
trac_args = [trac_admin, project_dir, 'repository', 'list']
process_upgrade = subprocess.Popen(trac_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = process_upgrade.communicate()[0]
if process_upgrade.returncode is None or process_upgrade.returncode != 0:
self.logger.error("Failed to run Trac.\nThe error was: %s" % result)
return []
#Add All grant to admin user
self.logger.info("Granting admin rights to the admin user.")
trac_grant = [trac_admin, project_dir, "permission add %s TRAC_ADMIN" % admin]
process = subprocess.Popen(trac_grant, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, env=env)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
raise Exception("Failed to execute Trac-admin.\nThe error was: %s" % result)
self.logger.info("Copying additional plugins into plugins directory")
plugins_dir = os.path.join(project_dir, "plugins")
for item in os.listdir(self.options['plugins-egg-dir'].strip()):
source = os.path.join(self.options['plugins-egg-dir'].strip(), item)
destination = os.path.join(plugins_dir, item)
if not os.path.exists(destination):
shutil.copytree(source, destination)
svn_list = json.loads(self.options.get('svn-project-list', '{}'))
for svn_repo in svn_list:
svn_repo_path = os.path.join(self.options['svn-dir'], svn_repo)
if not os.path.exists(svn_repo_path):
self.logger.info("Initializing %s SVN repository..." % svn_repo)
svn_args = [self.options['svn-repo-script'], project_dir,
svn_repo, svn_list[svn_repo]]
process = subprocess.Popen(svn_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
shutil.rmtree(svn_repo_path)
raise Exception("Failed to create repository.\nThe error was: %s" % result)
shutil.copy(self.options['trac-svn-hook'].strip(),
os.path.join(svn_repo_path, 'hooks/post-commit'))
shutil.copy(self.options['post-revprop-change'].strip(),
os.path.join(svn_repo_path, 'hooks/post-revprop-change'))
self.logger.info("Finished initializing %s reposiroty" % svn_repo)
repolist = json.loads(self.options.get('git-project-list', '{}'))
for repo, desc in repolist.iteritems():
absolute_path = os.path.join(self.options['git-dir'], '%s.git' % repo)
if not os.path.exists(absolute_path):
self.logger.info("Initializing %s GIT repository..." % repo)
subprocess.check_call([self.options['git-binary'], 'init',
'--bare', absolute_path])
subprocess.check_call([trac_admin, project_dir, 'repository',
'add', repo, absolute_path, 'git'], env=env)
subprocess.check_call([trac_admin, project_dir, 'repository',
'resync', repo], env=env)
# XXX: Hardcoded path
shutil.copy(self.options['trac-git-hook'].strip(),
os.path.join(absolute_path, 'hooks/post-commit'))
description_filename = os.path.join(absolute_path, 'description')
with open(description_filename, 'w') as description_file:
description_file.write(desc)
user_list = json.loads(self.options.get('user-list', '{}'))
fd = open(os.path.join(project_dir, 'svnpasswd'), 'w')
fd.write("[users]\n%s = %s" % (admin, passwd))
os.system("%s -cb %s %s %s" % (self.options['htpasswd'],
self.options['passwd-file'],
admin, passwd)
)
for user in user_list:
self.logger.info("Creating or updating user %s ..." % user)
user_args = [self.options['htpasswd'], '-b', self.options['passwd-file'],
user, user_list[user]]
process = subprocess.Popen(user_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
raise Exception("Failed to create user %s.\nThe error was: %s" %
(user, result))
fd.write("\n%s = %s" % (user, user_list[user]))
fd.close()
open(filestat, "w").write("done.")
return install_path
This diff is collapsed.
[buildout]
parts =
switch_softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${instance-apache:output}
mariadb = ${instance-mariadb:output}
\ No newline at end of file
This diff is collapsed.
# Apache static configuration
# Automatically generated
# Basic server configuration
PidFile "${:pid_file}"
Listen ${:ip}:8070
Listen ${:ip}:8080
Listen ${:ip}:8090
PHPINIDir ${:php_ini_dir}
ServerAdmin someone@email
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml .php5 .php4
AddType application/x-httpd-php-source .phps
# Log configuration
ErrorLog "${:error_log}"
LogLevel warn
LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b" common
CustomLog "${:access_log}" common
NameVirtualHost ${:ip}:8090
NameVirtualHost ${:ip}:8080
NameVirtualHost ${:ip}:8070
<VirtualHost ${:ip}:8070>
#ServerName www.example.com
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory ${:document_root}>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot ${:document_root}
DirectoryIndex index.html index.php
</VirtualHost>
<VirtualHost ${:ip}:8080>
#ServerName www.example.com
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory ${:document_root}data/files/website/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot ${:document_root}data/files/website/
DirectoryIndex index.html index.php
</VirtualHost>
<VirtualHost ${:ip}:8090>
#ServerName www.example.com
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory ${:document_root}data/files/website2/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot ${:document_root}data/files/website2/
DirectoryIndex index.html index.php
</VirtualHost>
# List of modules
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
LoadModule alias_module modules/mod_alias.so
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
test string
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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