By Ingeniweb. A Django site.
Juin 13, 2008
» iw.recipe.pound


Hi !

I’m pleased to announce a new version of iw.recipe.pound.
The recipe is divided now in two part:

  1. A build part (iw.recipe.pound:build)
  2. A config part (iw.recipe.pound:config)

The build part accept new options as localisation of libssl.
If you have again need of compilation option (to disable some module perhaps) the extra-options keyword is for you .

The config part accept now all general configuration of pound server (see man pound). You can define TimeOut globally ( a big mistake I know ! ). The recipe give choice also to define Priority and TimeOut by backend server. The bind ip adresss of http server is required now ( before it’s always 127.0.0.1 !! so if apache or squid is located in another server the recipe serves to nothing ).

Now the backends configuration looks like that :

one  127.0.0.1:80 127.0.0.1:8080 127.0.0.1:8081,1

where :
one is the name of cluster
127.0.0.1 is the bind ip adress
80 the port of pound http server

After there is a list of backend of this pound server. Each backend have this form :

<ip backend>:<port backend>[,<priority backend>,[TimeOut backend]]

Notice that if you want define timeout you must define also priority

I hope that this recipe give you satisfaction. Don’t hesitate to submit an issue at http://trac.ingeniweb.com/ if you have problem.

Regards Youenn

Mai 13, 2008
» plone.recipe.apache


In this post we describe how to install and configure an apache server in front of zope with buildout.
It’s very simple. Ok let’s go

1 - Create an zope instance with buildout

If you have a paster in your system we create an buildout skeleton with it:

$ paster create -t plone3_buildout

This create an buildout.cfg witch create an zope server (listen in 8080)

$ python2.4 bootstrap.py
$ bin/buildout

Create an instance named plone

$ bin/instance start

Ok now with your favourite browser you can see in http://localhost:8080/plone
the plone instance..
We can declare a localdns (for test purpose) that says that www.testit.com go to localhost..
So http://www.testit.com:8080/plone works also.

2 - Apache serve your plone instance

It’s possible now with buildout
We add an apache server to serve our zope in http port
Edit buildout.cfg and put this config in buildout::

[buildout]
parts =
...
apachebuild
apacheconf
...
[apachebuild]
recipe = plone.recipe.apache:build
url = http://mir2.ovh.net/ftp.apache.org/dist/httpd/httpd-2.2.8.tar.gz

[apacheconf]
recipe = plone.recipe.apache:config
bind = 80
backends =
 www.testit.com:127.0.0.1:8080
zope2_vhm_map =
 www.testit.com:/plone

You have already an httpd installed in your system . No problem
delete apachebuild conf and add in apacheconf a new directive mainconfig as this

[apacheconf]
mainconfig = /etc/apache2/apache2.conf
recipe = plone.recipe.apache:config
bind = 80
backends =
 www.testit.com:127.0.0.1:10080
zope2_vhm_map =
 www.testit.com:/plone

BE CAREFUL : the user that launch buildout must write in mainconfig so give to him the good right !! Also in order to work the current apache server must have rewrite and proxy module allowed.

So now relaunch buildout::

# bin/buildout
Getting distribution for 'plone.recipe.apache'.
Got plone.recipe.apache 0.1.0.
...
apachebuild: Downloading apache tarball.
apachebuild: Compiling Apache
...
apachebuild: Unpacking and configuring
checking for chosen layout... Apache
...
Installing apacheconf.

And after, start (or restart) apache server

# sudo bin/apachectl start

and now::
http://www.testit.com/ go to your plone instance.. Viva buildout !

Février 22, 2008
» About iw.recipe.squid


I’m pleased to announce a new release of iw.recipe.squid. It’s aimed to configure easily an squid proxy server with zope. It’s does the same things of squid generator in cache fu product which generate some config for squid in order to work with zope. I was really inspired of this. But it work’s with buildout with some difference. So what’s else ? How configure squid with zope and apache ? Really simple (I hope)

1- install a squid and an apache server

2- you create an buildout.cfg with some config

[buildout]
parts = squid

[squid]
recipe=iw.recipe.squid
squid_accelerated_hosts =
www.mysite.com localhost:8080/myplone

www.mysite.com is the dns host name of your plone site
myplone is the plone instance name of your plone
localhost is the host name of zope server location
8080 is the port of your zope server

3- you launch buildout

> buildout -c buildout.cfg

this create several directory with some config in their.
in parts/squid/etc you have all config to work with squid
in parts/squid/apache you have all config to work with apache server
in parts/squid/log you have all log file for apache virtual host and squid acces log
in bin you have a squid controler script witch work with parts/squid/etc/squid.conf specific config

5 - finally

You must create a cache for squid

> bin/squidctl createswap

And launch your squid

> bin/squidctl start

After make symbolic link in your apache configuration location ie:

ln -s <absolute path to parts/squid/apache/*> <absolute path to apache virtual host>

And now restart apache and you have an apache/squid/zope architecture working (I hope).

The future

I’m planed to give more flexibility to the recipe.

Imagine you have 10 plone site in your zope server and you want to configure their with iw.recipe.squid . You must declare an dns name for all your plone site. Not always easy !!
So the next step is the capibility to iw.recipe.squid to deal with this use case.

The config MUST change to this way :

www.mysite.com/ localhost:8080/myplone
www.mysite.com/site2 localhost:8080/myplone2
www.mysite.com/site/myplone localhost:8080/myplone3

so when I take a browser and I type http://www.mysite.com/site2 I go to myplone2 instance without declare a specific dns name for it.