Difference between revisions of "How-to purge a ckan catalogue instance"
From Gcube Wiki
(Created page with " == Actions needed to purge a CKAN instance configured in the D4Science Infrastructure == 1. Purge the DB instance; 2. Purge the Solr Index (without the shutting down of Sol...") |
(→Actions needed to purge a CKAN instance configured in the D4Science Infrastructure) |
||
Line 12: | Line 12: | ||
</pre> | </pre> | ||
− | 3. Reconfigure the DB instance to add support for the installed plugins (run | + | 3. Reconfigure the DB instance to add support for the installed plugins (run the commands as ''ckan'' user): |
<pre> | <pre> | ||
Line 19: | Line 19: | ||
. /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-ga-report ; paster initdb --config=/etc/ckan/default/production.ini | . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-ga-report ; paster initdb --config=/etc/ckan/default/production.ini | ||
. /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-rating rating init --config=/etc/ckan/default/production.ini | . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-rating rating init --config=/etc/ckan/default/production.ini | ||
+ | </pre> | ||
+ | |||
+ | 4. Create a Sysadmin user (run the commands as ''ckan'' user): | ||
+ | |||
+ | <pre> | ||
+ | . /usr/lib/ckan/default/bin/activate | ||
+ | cd /usr/lib/ckan/default/src/ckan | ||
+ | paster sysadmin add [username] -c /etc/ckan/default/production.ini | ||
</pre> | </pre> |
Revision as of 11:51, 26 September 2019
Actions needed to purge a CKAN instance configured in the D4Science Infrastructure
1. Purge the DB instance;
2. Purge the Solr Index (without the shutting down of Solr server) by performing the query:
<delete><query>*:*</query></delete> //the "match all docs" query in a delete <commit/> //the commit
3. Reconfigure the DB instance to add support for the installed plugins (run the commands as ckan user):
. /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-harvest harvester initdb --config=/etc/ckan/default/production.ini . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-spatial spatial initdb --config=/etc/ckan/default/production.ini . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-ga-report ; paster initdb --config=/etc/ckan/default/production.ini . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-rating rating init --config=/etc/ckan/default/production.ini
4. Create a Sysadmin user (run the commands as ckan user):
. /usr/lib/ckan/default/bin/activate cd /usr/lib/ckan/default/src/ckan paster sysadmin add [username] -c /etc/ckan/default/production.ini