[Grok-dev] Deploying into production - site.zcml with credentials

Michael Haubenwallner michael at d2m.at
Thu Nov 6 04:56:42 EST 2008


Ivo van der Wijk wrote:
> Hi,
> 
> My customer wants to deploy my grok application into production. I've
> provided a rather default buildout.cfg with a admin/admin
> username/password for a main manager account.
> 
> Of course my customer wants to change this. However, as soon as I
> provide an update, any changes to buildout.cfg or site.zcml will be
> undone and the old 'admin/admin' u/p will be setup. I also can't
> provide a buildout.cfg without site.zcml credentials - you need them
> for the first time deployment. The only alternative option I can thing
> of is providing two buildouts, one with (for first time deployment)
> and one without site.zcml.
> 
> How do you guys usually solve this problem? In the Zope2/Plone
> buildout world this is not an issue - there you only define a inituser
> which can be changed in the ZODB (acl_users) which buildout won't
> modify after updates.
> 
>

You can move the relevant parts from the site.zcml definition in
buildout.cfg to a 'principals.zcml' file (don't forget to include the
namespace declarations) and include the new file in your buildout.cfg
inside the site.zcml definition like

 <include file="../../principals.zcml" />

(Adjust the path to where the principals.zcml file is stored relative to
the parts/app folder).

Hth,
Michael

-- 
http://blog.d2m.at
http://planetzope.org



More information about the Grok-dev mailing list