datapucher
# Create a virtualenv for datapusher sudo python3 -m venv /usr/lib/ckan/datapusher # Create a source directory and switch to it sudo mkdir /usr/lib/ckan/datapusher/src cd /usr/lib/ckan/datapusher/src # Clone the source (you should target the latest tagged version) sudo git clone -b 0.0.17 https://github.com/ckan/datapusher.git # Install the DataPusher and its requirements cd datapusher sudo /usr/lib/ckan/datapusher/bin/pip install -r requirements.txt sudo /usr/lib/ckan/datapusher/bin/python setup.py develop # Create a user to run the web service (if necessary) sudo addgroup www-data sudo adduser -G www-data www-data # Install uWSGI sudo /usr/lib/ckan/datapusher/bin/pip install uwsgi
sudo /usr/lib/ckan/datapusher/bin/pip install uwsgi
supervisorに登録
# sudo vi /etc/supervisor/conf.d/ckan-datapusher.conf
[program:ckan-datapusher] ; command=/usr/lib/ckan/default/bin/uwsgi -i /etc/ckan/datapusher/datapusher-uwsgi.ini command=/usr/lib/ckan/datapusher/bin/uwsgi -i /usr/lib/ckan/datapusher/src/datapusher/deployment/datapusher-uwsgi.ini ; Start just a single worker. Increase this number if you have many or ; particularly long running background jobs. numprocs=1 process_name=%(program_name)s-%(process_num)02d ; Log files stdout_logfile=/var/log/ckan/ckan-datapusher.stdout.log stderr_logfile=/var/log/ckan/ckan-datapusher.stderr.log ; Make sure that the worker is started on system start and automatically ; restarted if it crashes unexpectedly. autostart=true autorestart=true ; Number of seconds the process has to run before it is considered to have ; started successfully. startsecs=10 ; Need to wait for currently executing tasks to finish at shutdown. ; Increase this if you have very long running tasks. stopwaitsecs = 600 ; Required for uWSGI as it does not obey SIGTERM. stopsignal=QUIT
再起動
# sudo systemctl restart supervisor
状態確認
# sudo supervisorctl status