[ckan-dev] [ckan-discuss] How to install extensions for a package installation?

Max Ludwig maxe.ludwig at googlemail.com
Fri Sep 9 09:48:18 UTC 2011


Wow, thanks for this overwhelming response (in a positive way). Really
nice support.


2011/9/8 James Gardner <james at 3aims.com>:
> [...] I'm working on a set of tools that will make it
> easy to package up your own CKAN extensions too

I'm looking forward.

> There are broadly two approaches you can take if you want a CKAN
> installation with extra packages:
>
> 1. Install them into the system Python as Flo has done
>
> The advantage of the first approach is that you don't need to change any
> settings. Apache, postgreSQL etc can all stay the same. If you don't want to
> package your extension, and you have an entire machine dedicated for a CKAN
> install, this is actually the approach I'd recommend. At OKCon in Berlin,
> David Read and I gave a workshop which took people though this process. The
> notes are still online at the URL below:
>
> http://ckan.okfnpad.org/sprint-okcon-2011-wishlist
>
> If you look at line 110 onward you'll see how we install the
> ckanext-exampletheme extension.

I will definitely try it this way today.

> 2. Create a virtual environment and serve CKAN from that
>
> The advantage of the second approach is that your new CKAN installation is
> completely isolated from the system CKAN but the disadvantage is that you
> effectively have to know everything a developer would about installing CKAN,
> re-configuring Apache etc. The current documentation is slightly misleading
> in that it appears to suggest you can easily use the system CKAN from a
> virtual environment without changing any other settings when actually you
> can't. You'd need to change Apache to use the Python instance in your
> virtual environment at the very least so we should write that in the docs.

That would explain some things ;)

> @Max, it sounds like the problems are mounting up one after the other! Let's
> try to resolve the initial problem of how to install extensions properly
> first and then take things from there?

Yep.

>> No. In step 1 it says /home/ubuntu/pyenv for the virtual environment
>> but in step 2 its ~/var/srvc/ckan.net/pyenv. I don't understand.
>
> It doesn't really matter where you put your virtualenv but if you use one,
> you need to change your Apache settings so it can find it.

I was rather confused that there are two environments. Also I have
never seen a place like "~/var/".

>> Yes. But when I did this, the server crashes giving me a
>> "PluginNotFoundException: admin".
>
> I suspect you haven't re-configured Apache that which is why you are getting
> this error.

I think this extension is broken as I already wrote in my last mail. Is it?

> Each CKAN instance is called something like ckan-std, ckan-dgu etc and is
> treated as an *instance package*, that is, CKAN is installed as an
> application with Apache, PostgreSQL etc all set up as part of the
> installation. Multiple different CKAN instances can all be installed on the
> same server as long as they use the same versions of other dependencies such
> as the Python libraries.

How can I create another CKAN instance using the package installation?
Does "ckan-std-install" has some kind of option? (Sorry, I'd look it
up myself but servers are down here at the moment.)

> In the future we aim to provide tools that make creating packages and
> testing they work much simpler so that you can package extensions yourself
> and just have them installed via apt-get the same way as everything else. To
> that end, I'd like to invite you to a packaging community meet up on the
> 22nd September to discuss packaging going forward. Max, Jan, Flo, can you
> make it at some point during the day? Perhaps 4pm UK time? I'll announce it
> properly with a separate email to the list nearer the time.

I have a meeting today in which we decide whether we will use CKAN
further on but after this mail it's very likely ;)
I'm almost sure I will join you regardless of whether we use CKAN or not.

> Apart from that, thanks for the great work, it's a pleasure to use and
> hack CKAN.

I'd appreciate to agree to that in the future ;P

Max




More information about the ckan-dev mailing list