[ckan-dev] production deployment

Rufus Pollock rufus.pollock at okfn.org
Tue May 31 12:37:11 UTC 2011


A suggestion, change your wsgi boot file to import ckanext as per this snippet

...
execfile(activate_this, dict(__file__=activate_this))
# this is werid but without importing ckanext first import of
paste.deploy will fail
import ckanext
from paste.deploy import loadapp
...

I don't know why this helps but it seems to be useful for the plugins.
Also how are you running your production? Apache + modwsgi? We've
occasionally found problems running apache + modwsgi in daemon mode
with certain plugins (you have datapreview loaded i see).

Rufus

On 31 May 2011 13:14, <p.romain at cg33.fr> wrote:
>
> Hi,
>
> I have been using CKAN on a test server so far and I followed the explanations given on http://ckan.org/install/
> I had some issues since my deployment environnment is RedHat and not Ubuntu.
> However I finally made it to work and I can use the paster serve datalocale.cg33.fr.ini command to see the ckan web pages diplaying on http://datalocale.cg33.fr:5000
>
> I am now willing to use this application in a production environnment so I followed the documentation given in http://packages.python.org/ckan/deployment.html
>
> I thought I could use my virtual environnment and my existing configFile.ini file so I create adatalocale.cg33.fr.py file as indicated on the web page
>
> However when I issue a python datalocale.cg33.fr.py I get the following errors
>
> Traceback (most recent call last):
>   File "datalocale.cg33.fr.py", line 7, in <module>
>     from paste.deploy import loadapp
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/paste/deploy/__init__.py", line 3, in <module>
>     from loadwsgi import *
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 7, in <module>
>     import pkg_resources
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2623, in <module>
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 679, in subscribe
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2623, in <lambda>
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2172, in activate
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1790, in declare_namespace
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1761, in _handle_ns
>   File "/opt/Python-2.7.1/lib/python2.7/pkgutil.py", line 238, in load_module
>     mod = imp.load_module(fullname, self.file, self.filename, self.etc)
>   File "/home/opendata/pyenv/src/ckanext-datapreview/ckanext/datapreview/__init__.py", line 32, in <module>
>     from pylons import config
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/pylons/__init__.py", line 4, in <module>
>     from pylons.config import config
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/pylons/config.py", line 2, in <module>
>     from pylons.configuration import *
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/pylons/configuration.py", line 25, in <module>
>     import pylons.legacy
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/pylons/legacy.py", line 11, in <module>
>     from pylons.util import deprecated, func_move
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/pylons/util.py", line 18, in <module>
>     from paste.script.appinstall import Installer
>   File "/home/opendata/pyenv/lib/python2.7/site-packages/paste/script/appinstall.py", line 23, in <module>
>     from paste.deploy import appconfig
> ImportError: cannot import name appconfig
>
>
> Cordialement,
> Pascal Romain
> responsable domaine applicatif gestion documentaire
> SPEC
> Direction des Systèmes d'Information
> 05 56 99 33 33 poste 6643
>
> __________________________________________________________________
>
> Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Ce message ne constitue pas un document officiel. Seuls les documents revêtus de la signature du Président du Conseil Général ou d'un de ses délégataires sont de nature à engager le Département.
> Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération et le Département de la Gironde décline toute responsabilité au titre de ce message s'il a été altéré, déformé, falsifié.
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>



--
Co-Founder, Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/




More information about the ckan-dev mailing list