Reputation: 31
I have setup CKAN 2.0.3 (package installation) on Ubuntu 12.04 which runs fine. When I try to add a second instance using "ckan-create-instance", this runs into several errors. One reason is "common.sh" which gets invoked and is probably not up to date, because it relies on file locations (like /usr/share/pyshared/.../who.ini) or creates directories (like /var/lib/ckan/$instance/static) not appropriate for ckan 2.0. As I cant see what else goes wrong: Is there an easy way or a step-by-step-guide to create additional instances? Even some kind of copying the default instance would fit.
Any advice is welcome and Thanks in advance!
Upvotes: 3
Views: 1398
Reputation: 14590
The CKAN package install only supports a single instance currently. I'm not sure what this ckan-create-instance
command is, where did you find that?
If you want to deploy multiple instances of CKAN on one machine, we recommend doing a source install.
We don't yet have instructions for how to boot a second CKAN instance, but basically you'd need to repeat most of the source install and deployment steps, but changing all the directories, user names, database names, etc:
Create a second virtualenv (for example, /usr/lib/ckan/my_second_site
) and install CKAN into it. Technically you can run two instances of CKAN off one virtualenv, but then they'd both have to run the same version of CKAN and extensions.
Setup a second PostgreSQL database with a different user and database name, e.g. ckan_my_second_site
Create a second CKAN config file in /etc/ckan/my_second_instance/
.
Create a second Solr core. As long as your CKAN instances are always going to run the same version of CKAN they can use the same Solr core and you can skip this step, but otherwise we recommend one Solr core per CKAN instance.
Setup a second DataStore database, with a different name
If using the FileStore, setup a second filestore directory
Create a second WSGI script file at e.g. /etc/ckan/my_second_instance/apache.wsgi
Create a second Apache config file at /etc/apache2/sites-available/ckan_my_second_instance
Enable the second site with the a2ensite
command
Upvotes: 3