Re: Best Practice for Setting up 19 Sites in Plone 4.3

dieter <[email protected]>
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <[email protected]>
Note: the following  message was already sent via email

Edward Soong wrote at 2014-8-5 14:02 -0700:
> ... successful "zeo" configuration ...
>But in ZMI, I am unable to do ZODB Mounting Point because the site is not listed under Contents.
>
>Then I tried to wrap the additional filestorages in zeo.conf with:
>zope-conf-additional = 
>  <zodb_db sitename>
>    # FileStorage for sitename
>    <filestorage>
>      path ╴.
>    </filestorage>
>    mount-point /sitename
>  </zodb_db>
>
>When zeoserver starts, errors:
>zeoserver: Error: 'zope-conf-additional' is not a known key name
>zeoserver: Error: unknown type name: 'zodb_db'
>zeoserver: Error: 'mount-point' is not a known key name

It is right. "zope-conf-additional" is a "buildout" (more precisely
a "plone.recipe.zope2instance") option. It causes it to
add the option content to Zope's configuration file "zope.conf".

Apparently, you had already a correct configuration file for ZEO
("zeo.conf"). Now, you must configure your Zope instance[s]
to use the storages serviced by this ZEO. Eventually,
"zope.conf" must contain this information. But, nowadays, "zope.conf"
is generated by "buildout" (and therefore it is not recommendable
to change it manually). You use the "zope-conf-additional" option
in your buildout to tell "buildout" what it should into
the generated "zope.conf" (beside "normal" stuff).


When you use ZEO, then Zope does not use the filestorage
directly - but indirectly via ZEO. Therefore, the Zope configuration
no longer contains the "filestorage" directive (this is now in "zeo.conf")
but instead a "zeoclient" directive, refering to the
ZEO server and via a name (and no longer a path) to the storage.
It may look like this:

 <zodb_db main>
   # The full mount-point syntax is:
   #
   # mount-point <localpath>[:<remotepath>]
   #
   # localpath - the path where the storage is mounted in this instance
   # remotepath - is the path to the object in the storage where it is mounted
   #              from. This defaults to whatever is supplied for localpath.
   mount-point /
   # ZODB cache, in number of objects
   cache-size 5000
   <zeoclient>
     # See .../ZODB/component.xml for directives (sectiontype
     # "zeoclient").
     # read-only true
     server localhost:8089
     storage 1
     var $INSTANCE/var
     # ZEO client cache, in bytes
     cache-size 20MB
     # Uncomment to have a persistent disk cache
     #client zeo1
   </zeoclient>

In your case, at least the "server", "mount-point" and "storage" directives
(and maybe the "cache-*" option) will be different.
"server" determines the ZEO server,
 "mount-point" where and which object of the
referenced storage can be mounted and "storage" which
of the storages managed by ZEO should be used. The "storage"
value refers to the "filestorage" "value" in your "zeo.conf".



-- 
Dieter



------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.