Manlio Perillo wrote:
[..]


However, for my web application there is more work to do.

I use Nginx + wsgi module, so I also need to configure Nginx.
The Nginx configuration file is actually a Mako template, since some
parameters (server name, location paths) depends on the deployment type
(development PC, testing server, production server).

Again, if that's your use case I encourage you to look into
using buildout. At least I use it myself in situations that seem
similar to yours and I'm happy with it (thanks Jim!).

One of the many nice things about buildout configuration files
is that you can quite flexibly mix-and-match, meaning you can
have a 'base.cfg' which is then extended by other more specific
cfg files, etc. And it is very easy to selective overwrite individual
settings from those more specialized ones.

In case you want to explore that option, here a few more pointers:

buildout: http://pypi.python.org/pypi/zc.buildout

nginx: http://pypi.python.org/pypi/gocept.nginx


A non-trivial example explicitly spelled out:
http://www.martinaspeli.net/articles/an-uber-buildout-for-a-production-plone-server
(some but not all parts in there are Zope/Plone specific
but still it should help getting the big picture)

http://www.martinaspeli.net/articles/new-uber-buildout-with-repoze-and-deliverance
which points to cfgs in
http://svn.plone.org/svn/collective/buildout/uber/plone3.x-repoze/

would be another example illustrating a multi-platform,
development-and-production setup. See in particular
http://svn.plone.org/svn/collective/buildout/uber/plone3.x-repoze/README.txt
for more.

The last example sets up the Zope server clients to run under
'paster' with a WSGI pipeline.

Again, I'm not suggesting to use Plone here but I happen to know
that stuff ;-) and I think the examples illustrate nicely how
one can use buildout to manage somewhat complex systems quite
comfortably. (and I know some people are doing way more crazy
things with it ...)

YMMV,

        Raphael



These parameters are defined in a configuration file, and during setup
the configuration file needs to be generated.
Should this be done subclassing the config command?

Raphael

Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkt783UACgkQscQJ24LbaUQj5ACfYxFnEs3GUUi8ILccx1nDKLx9
3bgAn0yXdNn8kI92IhPxxI4AE6NHeINR
=aZvH
-----END PGP SIGNATURE-----
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to