forked from ckan/ckan-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/6374 qa extension upgrade (#2)
* Installed QA extension Enabled plugins archiver & report Added archiver config values Initialise db for archiver and report Added bulk & priority background jobs for archiver Added cron job for report generation Added nginx config to serve archiver cached resources Added ckan_storage volume to nginx to access cached resources * Install qsv dependency for extension ckanext-qa * Simplified installation of qsv * Fixed issues with env variable CKAN__PLUGINS using the value from base image * Added qa dependency file package Updated qa extension to develop branch
- Loading branch information
1 parent
ca5a331
commit b03f0d5
Showing
17 changed files
with
157 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ _solr/schema.xml | |
_src/* | ||
local/* | ||
.env | ||
dbca/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ FROM ckan/ckan-dev:2.10.3 | |
#RUN pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat && \ | ||
# pip3 install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt | ||
|
||
|
||
# Install any extensions needed by your CKAN instance | ||
COPY setup/dbca_requirements.sh ${APP_DIR} | ||
RUN pip3 install pip --upgrade && \ | ||
|
@@ -66,4 +65,4 @@ RUN chmod +x ${APP_DIR}/start_ckan_development.sh | |
COPY config/*.ini ${APP_DIR}/config/ | ||
|
||
# Override default CKAN config file to use dbca.ini | ||
ENV CKAN_INI=${APP_DIR}/config/dbca.ini | ||
ENV CKAN_INI=${APP_DIR}/config/dbca.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# Crontab for CKAN cron jobs | ||
# Example cron job runs the harvester run command every 15 mins | ||
#*/15 * * * * /usr/bin/ckan -c /srv/app/config/dbca/ckan.ini harvester run >> $APP_DIR/logs/ckan-cron-jobs.log 2>&1 | ||
#*/15 * * * * /usr/bin/ckan -c /srv/app/ckan.ini harvester run >> $APP_DIR/logs/ckan-cron-jobs.log 2>&1 | ||
# Midnight task to schedule embargo datasets to public visibility | ||
0 0 * * * /usr/bin/ckan -c /srv/app/config/dbca/ckan.ini dbca scheduled_datasets >> $APP_DIR/logs/ckan-cron-jobs.log 2>&1 | ||
# Midnight report generation for archiver broken links | ||
0 0 * * * /usr/bin/ckan -c /srv/app/ckan.ini report generate >> $APP_DIR/logs/ckan-cron-jobs.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/bin/sh | ||
|
||
## Must Have ## | ||
## CKAN Core extensions ## | ||
|
||
# Archiver | ||
pip3 install -e 'git+https://github.com/ckan/ckanext-archiver.git@master#egg=ckanext-archiver' | ||
pip3 install -e git+https://github.com/ckan/ckanext-archiver.git@master#egg=ckanext-archiver | ||
pip3 install -r ${SRC_DIR}/ckanext-archiver/requirements.txt | ||
|
||
# DCAT | ||
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat | ||
pip3 install -r ${SRC_DIR}/ckanext-dcat/requirements.txt | ||
|
||
# Harvester | ||
pip3 install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-harvest' | ||
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-harvest | ||
pip3 install -r ${SRC_DIR}/ckanext-harvest/requirements.txt | ||
|
||
# Hierarchy | ||
|
@@ -32,7 +33,7 @@ pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckan | |
pip3 install -r ${SRC_DIR}/ckanext-showcase/requirements.txt | ||
|
||
# Scheming | ||
pip3 install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-scheming' | ||
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-scheming | ||
|
||
# Spatial | ||
# dependencies | ||
|
@@ -46,15 +47,28 @@ pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckane | |
pip3 install -r ${SRC_DIR}/ckanext-spatial/requirements.txt | ||
|
||
# XLoader | ||
pip3 install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-xloader' | ||
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-xloader | ||
pip3 install -r ${SRC_DIR}/ckanext-xloader/requirements.txt | ||
|
||
# Geoview | ||
pip3 install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-geoview' | ||
pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-geoview | ||
|
||
|
||
# 3rd Party # | ||
## 3rd Party ## | ||
# DOI | ||
pip3 install -e git+https://github.com/NaturalHistoryMuseum/[email protected]#egg=ckanext-doi | ||
|
||
# DBCA Project | ||
|
||
## DBCA Project ## | ||
|
||
# DBCA | ||
pip3 install -e git+https://github.com/dbca-wa/ckanext-dbca.git@develop#egg=ckanext-dbca | ||
|
||
# QA | ||
# Install qsv dependency for extension ckanext-qa | ||
wget -O /tmp/qsv.zip https://github.com/jqnatividad/qsv/releases/download/0.110.0/qsv-0.110.0-x86_64-unknown-linux-musl.zip | ||
unzip /tmp/qsv.zip -d /usr/local/bin | ||
rm /tmp/qsv.zip | ||
apk add file | ||
pip3 install -e git+https://github.com/dbca-wa/ckanext-qa.git@develop#egg=ckanext-qa | ||
pip3 install -r ${SRC_DIR}/ckanext-qa/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
; ======================================================= | ||
; Supervisor configuration for CKAN background job worker | ||
; ======================================================= | ||
|
||
; 1. Copy this file to /etc/supervisor/conf.d | ||
; 2. Make sure the paths below match your setup | ||
|
||
|
||
[program:ckan-worker-bulk] | ||
|
||
; Use the full paths to the virtualenv and your configuration file here. | ||
command=/bin/bash -c "export CKAN__PLUGINS=$(grep '^ckan\.plugins' $APP_DIR/config/dbca.ini | cut -d'=' -f2); exec /usr/bin/ckan -c /srv/app/config/dbca.ini jobs worker bulk" | ||
|
||
|
||
; User the worker runs as. | ||
user=ckan | ||
|
||
|
||
; 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=/srv/app/logs/ckan-worker.stdout.log | ||
stderr_logfile=/srv/app/logs/ckan-worker.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
; ======================================================= | ||
; Supervisor configuration for CKAN background job worker | ||
; ======================================================= | ||
|
||
; 1. Copy this file to /etc/supervisor/conf.d | ||
; 2. Make sure the paths below match your setup | ||
|
||
|
||
[program:ckan-worker-priority] | ||
|
||
; Use the full paths to the virtualenv and your configuration file here. | ||
command=/bin/bash -c "export CKAN__PLUGINS=$(grep '^ckan\.plugins' $APP_DIR/config/dbca.ini | cut -d'=' -f2); exec /usr/bin/ckan -c /srv/app/config/dbca.ini jobs worker priority" | ||
|
||
|
||
; User the worker runs as. | ||
user=ckan | ||
|
||
|
||
; 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=/srv/app/logs/ckan-worker.stdout.log | ||
stderr_logfile=/srv/app/logs/ckan-worker.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters