Commit 98364770 authored by Marco Mariani's avatar Marco Mariani

Merge branch 'maarch'

Conflicts:
	stack/lapp/buildout.cfg
parents 585b292a 1d832b8f
...@@ -13,7 +13,9 @@ depends = ...@@ -13,7 +13,9 @@ depends =
${libtiff:version} ${libtiff:version}
configure-options = configure-options =
--disable-cups --disable-cups
--disable-threadsafe
--with-system-libtiff --with-system-libtiff
--without-libidn
--without-x --without-x
--with-drivers=FILES --with-drivers=FILES
--with-fontpath=${ghostscript-fonts:location} --with-fontpath=${ghostscript-fonts:location}
...@@ -30,8 +32,8 @@ environment = ...@@ -30,8 +32,8 @@ environment =
[ghostscript-9] [ghostscript-9]
<= ghostscript-common <= ghostscript-common
url = http://downloads.ghostscript.com/public/ghostscript-9.06.tar.bz2 url = http://downloads.ghostscript.com/public/ghostscript-9.07.tar.bz2
md5sum = 46f9ebe40dc52755287b30704270db11 md5sum = eea27befc1e85bef6d4768202f6b03a5
[ghostscript-fonts] [ghostscript-fonts]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
......
...@@ -7,25 +7,22 @@ extends = ...@@ -7,25 +7,22 @@ extends =
../zlib/buildout.cfg ../zlib/buildout.cfg
../gtk-2/buildout.cfg ../gtk-2/buildout.cfg
../xorg/buildout.cfg ../xorg/buildout.cfg
../xz-utils/buildout.cfg
[libcroco] [libcroco]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.3.tar.bz2 url = http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.8.tar.xz
md5sum = e1e93eeff4367c896f3959af34ba20eb md5sum = 767e73c4174f75b99695d4530fd9bb80
environment = environment =
PATH=${pkgconfig:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig PKG_CONFIG_PATH=${pkgconfig:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
LDFLAGS=-Wl,-rpath=${zlib:location}/lib LDFLAGS=-Wl,-rpath=${zlib:location}/lib
[librsvg] [librsvg]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
version = 2.36.1 version = 2.36.1
url = http://www.nexedi.org/static/tarballs/librsvg/librsvg-${:version}.tar.gz url = http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.4.tar.xz
md5sum = 699cb7124d319035346e69782baa7c36 md5sum = 3c94524c8ccf668e30b236f409239f54
# The original source provided by gnome is tar.xz and it is not a supported compression
# on hexagonit.recipe.cmmi neither by slapos.recipe.build, so keep alternative source
# with tar.gz format as a temporary alternative for this.
# url = http://ftp.acc.umu.se/pub/GNOME/sources/librsvg/2.36/librsvg-2.36.1.tar.xz
configure-options = configure-options =
--disable-static --disable-static
--disable-gtk-theme --disable-gtk-theme
...@@ -35,6 +32,6 @@ configure-options = ...@@ -35,6 +32,6 @@ configure-options =
--disable-gtk-doc-html --disable-gtk-doc-html
--enable-introspection=no --enable-introspection=no
environment = environment =
PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:%(PATH)s PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${cairo:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig PKG_CONFIG_PATH=${cairo:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -13,8 +13,8 @@ extends = ...@@ -13,8 +13,8 @@ extends =
[poppler] [poppler]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
md5sum = c7038be37a7d446544e83a7df3c26196 md5sum = 3939740201c59c470bc7198003450a20
url = http://poppler.freedesktop.org/poppler-0.22.0.tar.gz url = http://poppler.freedesktop.org/poppler-0.22.2.tar.gz
depends = depends =
${libtiff:version} ${libtiff:version}
configure-options = configure-options =
......
...@@ -85,8 +85,20 @@ class Recipe(BaseSlapRecipe): ...@@ -85,8 +85,20 @@ class Recipe(BaseSlapRecipe):
domain_dict = {} domain_dict = {}
for slave_instance in slave_instance_list: for slave_instance in slave_instance_list:
# Sanitize inputs
backend_url = slave_instance.get("url", None) backend_url = slave_instance.get("url", None)
reference = slave_instance.get("slave_reference") reference = slave_instance.get("slave_reference")
if slave_instance.haskey("enable_cache"):
enable_cache = slave_instance.get("enable_cache", "").upper() in ('1', 'TRUE')
else:
enable_cache = False
if slave_instance.haskey("type"):
slave_type = slave_instance.get("type", "").lower()
else:
slave_type = None
# Set scheme (http? https?) # Set scheme (http? https?)
# 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://'
...@@ -120,12 +132,14 @@ class Recipe(BaseSlapRecipe): ...@@ -120,12 +132,14 @@ class Recipe(BaseSlapRecipe):
slave_dict[reference] = "%s%s/" % (scheme, domain) slave_dict[reference] = "%s%s/" % (scheme, domain)
# Check if we want varnish+stunnel cache. # Check if we want varnish+stunnel cache.
if slave_instance.get("enable_cache", "").upper() in ('1', 'TRUE'): #if enable_cache:
# XXX-Cedric : need to refactor to clean code? (to many variables) # # XXX-Cedric : need to refactor to clean code? (to many variables)
rewrite_rule = self.configureVarnishSlave( # rewrite_rule = self.configureVarnishSlave(
base_varnish_port, backend_url, reference, service_dict, domain) # base_varnish_port, backend_url, reference, service_dict, domain)
base_varnish_port += 2 # base_varnish_port += 2
else: #else:
# rewrite_rule = "%s %s" % (domain, backend_url)
# Temporary forbid activation of cache until it is properly tested
rewrite_rule = "%s %s" % (domain, backend_url) rewrite_rule = "%s %s" % (domain, backend_url)
# Finally, if successful, we add the rewrite rule to our list of rules # Finally, if successful, we add the rewrite rule to our list of rules
...@@ -134,7 +148,7 @@ class Recipe(BaseSlapRecipe): ...@@ -134,7 +148,7 @@ class Recipe(BaseSlapRecipe):
# rule structure. # rule structure.
# So we will have one RewriteMap for normal websites, and one # So we will have one RewriteMap for normal websites, and one
# RewriteMap for Zope Virtual Host Monster websites. # RewriteMap for Zope Virtual Host Monster websites.
if slave_instance.get("type", "").lower() in ['zope']: if slave_type in ['zope']:
rewrite_rule_zope_list.append(rewrite_rule) rewrite_rule_zope_list.append(rewrite_rule)
# For Zope, we have another dict containing the path e.g '/erp5/... # For Zope, we have another dict containing the path e.g '/erp5/...
rewrite_rule_path = "%s %s" % (domain, slave_instance.get('path', '')) rewrite_rule_path = "%s %s" % (domain, slave_instance.get('path', ''))
...@@ -529,7 +543,7 @@ class Recipe(BaseSlapRecipe): ...@@ -529,7 +543,7 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(mod_ssl_cache_location) self._createDirectory(mod_ssl_cache_location)
# Create "custom" apache configuration files if it does not exist. # Create "custom" apache configuration files if it does not exist.
# Note : Those files won't be erased or changed when slapgrid is ran. # Note : Those files won't be erased or changed by slapgrid.
# It can be freely customized by node admin. # It can be freely customized by node admin.
custom_apache_configuration_directory = os.path.join( custom_apache_configuration_directory = os.path.join(
self.data_root_directory, 'apache-conf.d') self.data_root_directory, 'apache-conf.d')
...@@ -537,12 +551,14 @@ class Recipe(BaseSlapRecipe): ...@@ -537,12 +551,14 @@ class Recipe(BaseSlapRecipe):
# First one is included in the end of the apache configuration file # First one is included in the end of the apache configuration file
custom_apache_configuration_file_location = os.path.join( custom_apache_configuration_file_location = os.path.join(
custom_apache_configuration_directory, 'apache_frontend.custom.conf') custom_apache_configuration_directory, 'apache_frontend.custom.conf')
open(custom_apache_configuration_file_location, 'a') if not os.path.exists(custom_apache_configuration_file_location):
open(custom_apache_configuration_file_location, 'w')
# Second one is included in the virtualhost of apache configuration file # Second one is included in the virtualhost of apache configuration file
custom_apache_virtual_configuration_file_location = os.path.join( custom_apache_virtual_configuration_file_location = os.path.join(
custom_apache_configuration_directory, custom_apache_configuration_directory,
'apache_frontend.virtualhost.custom.conf') 'apache_frontend.virtualhost.custom.conf')
open(custom_apache_virtual_configuration_file_location, 'a') if not os.path.exists(custom_apache_virtual_configuration_file_location):
open(custom_apache_virtual_configuration_file_location, 'w')
# Create backup of custom apache configuration # Create backup of custom apache configuration
backup_path = self.createBackupDirectory('custom_apache_conf_backup') backup_path = self.createBackupDirectory('custom_apache_conf_backup')
......
...@@ -43,6 +43,25 @@ all slave instances. ...@@ -43,6 +43,25 @@ all slave instances.
Finally, the slave instance will be accessible from: Finally, the slave instance will be accessible from:
https://someidentifier.moulefrite.org. https://someidentifier.moulefrite.org.
How to have custom configuration in frontend server
===================================================
In your instance directory, you, as sysadmin, can directly edit two
configuration files that won't be overwritten by SlapOS to customize your
instance:
* $PARTITION_PATH/srv/srv/apache-conf.d/apache_frontend.custom.conf
* $PARTITION_PATH/srv/srv/apache-conf.d/apache_frontend.virtualhost.custom.conf
The first one is included in the end of the main apache configuration file.
The second one is included in the virtualhost of the main apache configuration file.
SlapOS will jsut create those two files for you, then completely forget them.
Note: make sure that the UNIX user of the instance has read access to those
files if you edit them.
Instance Parameters Instance Parameters
=================== ===================
......
...@@ -35,7 +35,7 @@ git-executable = ${git:location}/bin/git ...@@ -35,7 +35,7 @@ git-executable = ${git:location}/bin/git
[slapos.cookbook-repository] [slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git repository = http://git.erp5.org/repos/slapos.git
branch = lapp-resilient3 branch = master
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
[slapos.core-repository] [slapos.core-repository]
......
...@@ -13,8 +13,31 @@ parts += ...@@ -13,8 +13,31 @@ parts +=
instance instance
instance-apache-php instance-apache-php
slapos-recipe-maarch-egg slapos-recipe-maarch-egg
slapos.cookbook-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
extensions = buildout-versions
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
revision = e6cce9da68214cf43aaa5419731d8d2bc59eb426
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
#---------------- #----------------
#-- #--
......
...@@ -127,6 +127,7 @@ parts = ...@@ -127,6 +127,7 @@ parts =
fix-products-paths fix-products-paths
# some additional utils # some additional utils
slapos-toolbox slapos-toolbox
zodbanalyze
# Local development # Local development
slapos.cookbook-repository slapos.cookbook-repository
...@@ -507,6 +508,16 @@ scripts = ...@@ -507,6 +508,16 @@ scripts =
extra-paths = extra-paths =
${erp5:location} ${erp5:location}
[zodbanalyze]
recipe = zc.recipe.egg
python = python2.6
eggs =
ZODB3
erp5.util
entry-points =
zodbanalyze=erp5.util.zodbanalyze:main
scripts = zodbanalyze
[cloudooo-repository] [cloudooo-repository]
branch = master branch = master
revision = 6629837c96ae58e96cac019044ce95d19cb7a659 revision = 6629837c96ae58e96cac019044ce95d19cb7a659
...@@ -619,7 +630,7 @@ coverage = 3.6 ...@@ -619,7 +630,7 @@ coverage = 3.6
csp-eventlet = 0.7.0 csp-eventlet = 0.7.0
elementtree = 1.2.7-20070827-preview elementtree = 1.2.7-20070827-preview
erp5.recipe.cmmiforcei686 = 0.1.3 erp5.recipe.cmmiforcei686 = 0.1.3
erp5.util = 0.4.31 erp5.util = 0.4.33
erp5diff = 0.8.1.5 erp5diff = 0.8.1.5
eventlet = 0.12.1 eventlet = 0.12.1
feedparser = 5.1.3 feedparser = 5.1.3
......
...@@ -318,8 +318,10 @@ cp.recipe.cmd = 0.4 ...@@ -318,8 +318,10 @@ cp.recipe.cmd = 0.4
gitdb = 0.5.4 gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6 hexagonit.recipe.cmmi = 1.6
meld3 = 0.6.10 meld3 = 0.6.10
plone.recipe.command = 1.1
pycrypto = 2.6 pycrypto = 2.6
rdiff-backup = 1.0.5 rdiff-backup = 1.0.5
slapos.recipe.build = 0.11.6
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33.1 slapos.toolbox = 0.33.1
...@@ -343,17 +345,17 @@ atomize = 0.1.1 ...@@ -343,17 +345,17 @@ atomize = 0.1.1
feedparser = 5.1.3 feedparser = 5.1.3
# Required by: # Required by:
# slapos.cookbook==0.74.0 # slapos.cookbook==0.74.1-dev
inotifyx = 0.2.0 inotifyx = 0.2.0
# Required by: # Required by:
# slapos.cookbook==0.74.0 # slapos.cookbook==0.74.1-dev
# slapos.core==0.35.1 # slapos.core==0.35.1
# xml-marshaller==0.9.7 # xml-marshaller==0.9.7
lxml = 3.1.0 lxml = 3.1.0
# Required by: # Required by:
# slapos.cookbook==0.74.0 # slapos.cookbook==0.74.1-dev
netaddr = 0.7.10 netaddr = 0.7.10
# Required by: # Required by:
...@@ -377,11 +379,11 @@ psycopg2 = 2.4.6 ...@@ -377,11 +379,11 @@ psycopg2 = 2.4.6
pyflakes = 0.6.1 pyflakes = 0.6.1
# Required by: # Required by:
# slapos.cookbook==0.74.0 # slapos.cookbook==0.74.1-dev
pytz = 2012j pytz = 2013b
# Required by: # Required by:
# slapos.cookbook==0.74.0 # slapos.cookbook==0.74.1-dev
# slapos.core==0.35.1 # slapos.core==0.35.1
# slapos.recipe.maarch==0.4 # slapos.recipe.maarch==0.4
# slapos.toolbox==0.33.1 # slapos.toolbox==0.33.1
...@@ -391,11 +393,7 @@ pytz = 2012j ...@@ -391,11 +393,7 @@ pytz = 2012j
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.recipe.maarch==0.4 # slapos.cookbook==0.74.1-dev
slapos.cookbook = 0.74.0
# Required by:
# slapos.cookbook==0.74.0
# slapos.toolbox==0.33.1 # slapos.toolbox==0.33.1
slapos.core = 0.35.1 slapos.core = 0.35.1
...@@ -408,7 +406,7 @@ supervisor = 3.0b1 ...@@ -408,7 +406,7 @@ supervisor = 3.0b1
unittest2 = 0.5.1 unittest2 = 0.5.1
# Required by: # Required by:
# slapos.cookbook==0.74.0 # slapos.cookbook==0.74.1-dev
# slapos.toolbox==0.33.1 # slapos.toolbox==0.33.1
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
......
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