[ckan-dev] How to Install Datastorer?

Dominik Moritz dominik.moritz at okfn.org
Fri Jul 12 08:11:50 UTC 2013


Hey Shawn,

On 10 Jul 2013, at 21:09, Constantine <zigchg at gmail.com> wrote:

> Hi,
> 
> Thank you! The command 'python setup.py development' runs smoothly.
> However, after that, when we tried to run 'paster datastorer update -c
> /etc/ckan/default/production.ini', we still got the error message as
> follows:
> *
> (default)root at ubuntu:~/pyenv/src/ckanext-datastorer/ckanext# paster
> datastorer update -c /etc/ckan/default/production.ini
> Traceback (most recent call last):
>  File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
>    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
>  File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 104, in run
>    invoke(command, command_name, options, args[1:])
>  File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 143, in invoke
>    exit_code = runner.run(args)
>  File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 238, in run
>    result = self.command()
>  File "/root/pyenv/src/ckanext-datastorer/ckanext/datastorer/commands.py",
> line 73, in command
>    import tasks
>  File "/root/pyenv/src/ckanext-datastorer/ckanext/datastorer/tasks.py",
> line 12, in <module>
>    from ckanext.archiver.tasks import download, update_task_status
> ImportError: No module named archiver.tasks*

You need to activate your virtual environment and then install the dependencies with `pip install -r pip-requirements.txt`.

> 
> And we also don't really understand this paragraph in datastorer read-me,
> *
> Start the celery daemon. This can be done in development by:
> 
> paster celeryd # this is assuming a development.ini file
> *
> *(What does the words after # mean? How should this command be like? Shall
> we use the production.ini file in /etc/ckan/default?)

It's a comment. If you don't have a development.ini config file, you need to provide it with -c FILE.

> *
> *
> In production the daemon should be run with a different ini file and be run
> as an init script. The simplest way to do this is to install supervisor:
> 
> apt-get install supervisor
> 
> You can use this file as a template and add it to /etc/supservisor/conf.d:
> 
> https://github.com/okfn/ckan/blob/master/ckan/config/celery-supervisor.conf*
> *
> *
> *(Anything else to complete other than download the file and copy it into
> /etc/supervisor/conf.d?)

You need to adapt the file to your environment. I'm afraid I can't get into the details of supervisor here and suggest you have a look at the manpage or the online documentation.

> *
> We are very grateful and truly appreciate the help you gave us! So sorry to
> bother you again with so many questions. Hope you can help us again.
> 
> Thank you!
> 
> Shawn

Hope I could help you with my comments,
Dominik

> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev

Dominik Moritz
CKAN developer  |  skype: d.moritz  |  @doobly_doo
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/  |  @okfn  |  http://ckan.org  |  @CKANproject





More information about the ckan-dev mailing list