[Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Charlie Clark
Hi,

thanks to Hanno's help I'm up and running with buildout. Having spent the  
last couple of years tied to to some frozen Zope and CMF checkouts it's  
quite refreshing to be able to try newer components with our own. :-)

There is, however, one thing I haven't quite worked out how to do is add  
stuff to the instance's etc folder. We have some configuration files  
which are instance specific which we have so far kept in in etc/config. Do  
I need to create a recipe that does this for this part?

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Chris Withers
Charlie Clark wrote:
 There is, however, one thing I haven't quite worked out how to do is add  
 stuff to the instance's etc folder. We have some configuration files  
 which are instance specific which we have so far kept in in etc/config. Do  
 I need to create a recipe that does this for this part?

You have a few options:

1 - just leave them as they are :-)

2 - use collective.recipe.template or topp.recipes.cfgtemplate if you 
need to replace bits of the stuff in etc with stuff from the buildout 
(such as the buildout directory)

3 - go the deployment route using zc.recipe.deployment where all 
config ends up in buildout.cfg. For this, you do need a recipe for each 
cfg file or group thereof. There are currently recipes for zeo servers 
and zeoraid servers, I'll be doing one for Zope 2.12 some time soon, 
which should suffice for Plone too...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Charlie Clark
Am 18.11.2009, 14:19 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

Hi Chris,

 You have a few options:
  1 - just leave them as they are

I just need to link/copy from something parts/instance/etc/config to say  
src/config or downloads/config

2 - use collective.recipe.template or
 topp.recipes.cfgtemplate if you need to replace bits of the stuff in etc  
 with stuff from the buildout (such as the buildout directory)

I'll have a look at them as this might be the easiest.

 3 - go the deployment route using zc.recipe.deployment where all  
 config ends up in buildout.cfg. For this, you do need a recipe for each  
 cfg file or group thereof.

hm, sort of makes sense configuring them in buildout but I still need them  
in parts/instance/etc/config. I guess I'll need to look at those, too.

 There are currently recipes for zeo servers and zeoraid servers, I'll be  
 doing one for Zope 2.12 some time soon, which should suffice for Plone  
 too...

And presumably CMF!

Thanks

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Chris Withers
Charlie Clark wrote:
 You have a few options:
  1 - just leave them as they are
 
 I just need to link/copy from something parts/instance/etc/config to say  
 src/config or downloads/config

I don't understand what you're trying to say :-S

 3 - go the deployment route using zc.recipe.deployment where all  
 config ends up in buildout.cfg. For this, you do need a recipe for each  
 cfg file or group thereof.
 
 hm, sort of makes sense configuring them in buildout but I still need them  
 in parts/instance/etc/config. 

Beware of keeping anything that can't be rebuilt from scratch by running 
bin/buildout in ./parts, buildout has a habit of blowing away that whole 
folder at will...

 There are currently recipes for zeo servers and zeoraid servers, I'll be  
 doing one for Zope 2.12 some time soon, which should suffice for Plone  
 too...
 
 And presumably CMF!

Indeed, provided you're on 2.12...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Hanno Schlichting
On Wed, Nov 18, 2009 at 1:29 PM, Charlie Clark
charlie.cl...@clark-consulting.eu wrote:
 There is, however, one thing I haven't quite worked out how to do is add
 stuff to the instance's etc folder. We have some configuration files
 which are instance specific which we have so far kept in in etc/config. Do
 I need to create a recipe that does this for this part?

We use this snippet for something similar:

[link-extensions]
recipe = plone.recipe.command
command =
for i in ${buildout:parts-directory}/instance*; do rm -rf
$i/Extensions; ln -s ${buildout:directory}/Extensions $i/Extensions;
done
update-command = ${link-extensions:command}


I'm sure you can adopt this to linking everything in
${buildout:directory}/config into the various parts/instance*
directories.

Hanno
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Charlie Clark
Am 18.11.2009, 14:42 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 I don't understand what you're trying to say :-S

hehe. Stuff needs to go in the instance's etc folder from somewhere else  
in the project.

  3 - go the deployment route using zc.recipe.deployment where all   
 config ends up in buildout.cfg. For this, you do need a recipe for each   
 cfg file or group thereof.
  hm, sort of makes sense configuring them in buildout but I still need  
 them  in parts/instance/etc/config.

 Beware of keeping anything that can't be rebuilt from scratch by running  
 bin/buildout in ./parts, buildout has a habit of blowing away that whole  
 folder at will...

Everything is in our repository so that shouldn't be a problem.

 There are currently recipes for zeo servers and zeoraid servers, I'll  
 be  doing one for Zope 2.12 some time soon, which should suffice for  
 Plone  too...
  And presumably CMF!
  Indeed, provided you're on 2.12...

Indeed I am!

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Handling instance specific configuration files with buildout

2009-11-18 Thread Charlie Clark
Am 18.11.2009, 14:48 Uhr, schrieb Hanno Schlichting ha...@hannosch.eu:

 We use this snippet for something similar:
 [link-extensions]
 recipe = plone.recipe.command
 command =
 for i in ${buildout:parts-directory}/instance*; do rm -rf
 $i/Extensions; ln -s ${buildout:directory}/Extensions $i/Extensions;
 done
 update-command = ${link-extensions:command}
 I'm sure you can adopt this to linking everything in
 ${buildout:directory}/config into the various parts/instance*
 directories.

Hi Hanno,

that does indeed look pretty usable.

[camaoCms.cfg]
recipe = plone.recipe.command
command =
  rm -rf ${buildout:parts-directory}/instance/etc/cfg;
  cp -R ./src/camaoCms.cfg ${buildout:parts-directory}/instance/etc/cfg;

Works fine even thought I'm sure it can be improved.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )