[Grok-dev] Can not use buildout to configure BLOB storage
Steve Schmechel
steveschmechel at yahoo.com
Mon Jul 13 23:10:25 EDT 2009
Adding blob-dir = ${buildout:parts-directory}/data/blobs to the [data]
section of buildout.cfg does not have any effect.
It does not effect /etc/zope.conf.in or the resulting
/parts/etc/zope.conf in a way that will allow BLOB support using
zope.file.
When attempting to upload a file, the user will receive an error like:
Unsupported: Storing Blobs in <ZODB.FileStorage.FileStorage.FileStorage object at 0x457cc90> is not supported.
Maybe some functionality went away when the /etc vs. parts/etc
work was done in grokproject.
The <zodb> section of zope.conf needs to end up looking like:
<zodb>
<blobstorage>
# Standard Filestorage
<filestorage>
path /path/to/data/Data.fs
</filestorage>
blob-dir /path/to/data/blobs-dir
</blobstorage>
This can be done outside of buildout by changing the zope.conf.in
template file and running buildout again.
If buildout is not going to handle setting up BLOB support, we should
change the documentation that mentions this.
The zope.conf.in file already contains some boilerplate comments for
supporting ZEO, so maybe it could be modified to look like:
<zodb>
# Uncomment the blob-related lines to allow BLOB storage.
# <blobstorage>
# Standard Filestorage
<filestorage>
path ${data:path}
</filestorage>
# blob-dir ${buildout:directory}/parts/data/blobs
# </blobstorage>
# Uncomment this if you want to connect to a ZEO server instead:
# <zeoclient>
# server localhost:8100
# storage 1
# # ZEO client cache, in bytes
# cache-size 20MB
# # Uncomment to have a persistent disk cache
# #client zeo1
# </zeoclient>
</zodb>
Any ideas on if this change is the right approach, or should someone go
back and try to get grokproject/buildout to handle this configuration
task?
Thanks,
Steve
More information about the Grok-dev
mailing list