This repository was archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Plugin : ckanext harvest
Luiz Felipe F M Costa edited this page Oct 27, 2017
·
11 revisions
Enter on virtualenv and go to plugins dir:
easyckan exec
cd /usr/lib/ckan/default/src
Install ckanext-harvest, dependeces and create database tables:
pip install -e git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest
cd /usr/lib/ckan/default/src/ckanext-harvest/
pip install -r pip-requirements.txt
paster --plugin=ckanext-harvest harvester initdb --config=/etc/ckan/default/development.ini
Exit from virtualenv:
exit
easyckan exec nano /etc/ckan/default/development.ini
ckan.plugins = harvest ckan_harvester [...]
# Harvest
ckan.harvest.mq.type = redis
ckan.harvest.mq.hostname = ckan-supervisor
Supervisor files should be placed in /etc/ckan/default/supervisor
.
Redis is a key-value database with content keeped in memory. Is used by ckanext-archiver throw Celery.
easyckan exec nano /etc/ckan/easyckan/plugins/redis.supervisor
[program:redis]
command=redis-server
easyckan exec nano /etc/ckan/easyckan/plugins/harvest.supervisor
[program:harvest-gather]
command=/usr/lib/ckan/default/bin/paster --plugin=ckanext-harvest harvester gather_consumer --config=/etc/ckan/default/development.ini
logfile=/var/log/supervisor/harvest-gather.log
[program:harvest-fetch]
command=/usr/lib/ckan/default/bin/paster --plugin=ckanext-harvest harvester fetch_consumer --config=/etc/ckan/default/development.ini
logfile=/var/log/supervisor/harvest-fetch.log
[program:harvest-run]
command=sh -c "/usr/lib/ckan/default/bin/paster --plugin=ckanext-harvest harvester run --config=/etc/ckan/default/development.ini && sleep 60"
logfile=/var/log/supervisor/harvest-run.log
autorestart=true
easyckan repair