[ckan-dev] Developer Environment for Developing CKAN Plugins

Timothy Giles timothy.giles at slu.se
Mon Oct 3 18:13:43 UTC 2016


Nathan,


Its amazing how many people have asked this over the years I have been following CKAN, and the lack of assistance in the documentation. Prehaps a few of us should put something together, because I wish I knew then what I knew now and know that I have lots more to learn!


My setup, which I find almost perfect is:


1. Starting with a base install 14.04, I add in openssh server

2. Then install EasyCKAN (https://github.com/thenets/Easy-CKAN)

3. From there, I putty (SSH) in to the VM

4. From putty, I run sudo easyckan server - and this runs ckan in development, with debugging (which is fantastic)

5. I then, on my PC, use FileZilla to SSH in and open various files I want to develop or debug with either Eclipse or Notepad++

6. Once I have saved my changes, Filezilla asks if I want to sync it up to vm, which it does. The EasyCKAN debug session automatically reloads if there is any python code changes made. This allows live debugging and development - with almost no need to restart manually the ckan session


You install the programs on the VM (Ubuntu 14.04) and RDP or VNC in to it, or use nano, emacs etc... to edit/create python and related code files. But the above works for me and has at least doubled the amount of work I can get done in a day, from the times I used to paster server....... and need to restart that every time I made a code change.



Hope it helps. EasyCKAN is a must if you are new to all this - do check it out. I am trying to add more extensions to the system - but remember you can manually install extensions just as you would to a normal development type (source) install. It is no different, just saves an awful lot of install time.​


Regards Tim


________________________________
From: ckan-dev <ckan-dev-bounces at lists.okfn.org> on behalf of Jared Smith <jared at highwaythreesolutions.com>
Sent: 03 October 2016 07:13 PM
To: CKAN Development Discussions
Subject: Re: [ckan-dev] Developer Environment for Developing CKAN Plugins


Hello Nathan,

For my particular environment, I use vagrant, setup using shared folders between my machine and the vm. I find this an easy way of sharing the same code base that allows me to edit on my machine and run the code in the vm.

For debugging, I haven't tried it at all, I'm not sure how difficult it is to setup, so I would also be interested in hearing how other devs have setup their env for debugging.

For developing plugins, apart from reading the docs on plugin development, I would advise keeping up-to-date with the pylons-to-flask migration. As this will affect future plugin development for newer versions of ckan. Other then that, the docs should provide all the necessary info for developing plugins.

On 2016-10-03 9:51 AM, Nathan Hook wrote:
Good Day,

We are going to start doing a reasonable amount of development on some customization of CKAN via plugins.

Are there any CKAN developer recommendations, hints, tips and/or tricks that people use when developing plugins for CKAN?

Things that we are specifically looking for help on are the following:

Recommendations on how to do development in an IDE (like PyCharm) and move/deploy our code to a remote Vagrant VM (where we will have development instance of ckan running).

How does debugging work in a remote Vagrant VM instance with WSGI? Does anyone do remote debugging with an IDE (like PyCharm) and WSGI?

Then in general how do most CKAN developers do their programming? Do they use Vi? Do they do development in ckan on their local machine? Do they use remote VMs (like with Vagrant/VirtualBox)?

We have tried looking for how anyone does CKAN plugin development and we have not been able to find any useful information at this time and any friendly recommendations would be greatly appreciated.

I have also posted this same email/post to Stackoverflow:
http://stackoverflow.com/questions/39779531/developer-environment-for-developing-ckan-plugins

Thank you for your time,

Nathan



_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev



--
—
Jared Smith
Highway Three Solutions Ltd.
Github: @jrods
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161003/769b3882/attachment-0003.html>


More information about the ckan-dev mailing list