The EasyCKAN is a legacy project and not maintained anymore. I strongly recommend you to check the https://github.com/okfn/docker-ckan project. It's excellent work to set up a CKAN server and adapts it for your government or organization.
The easiest way to install the CKAN platform.
Compatible with all Linux x64 distros.
The EasyCKAN was updated to new technologies now based on Docker containers. If you still using the old version on you organization or govern portal, you can find the legacy version on legacy branch.
The EasyCKAN project was created for single node portals and development environmet. If you need load balancer or other advanced features, consider create your environment manually from the CKAN Source Installation.
- EasyCKAN CLI
- CKAN 2.6.2
- Plugins (officially supported)
Your server / virtual machine must meet the following requirements:
- Linux x64 kernel version 3.10 or higher
- Distributions supported with simple installer: Ubuntu, Fedora, CentOS, openSUSE.
- Other distros will require manual installation.
- 2.00 GB of RAM
- 6.00 GB of available disk space
- Nothing running over ports: 80, 5000
It is generally better to have a completely clean install of Ubuntu to work from, it's not required.
Run the following commands on your server / virtual machine:
curl -sSL https://raw.githubusercontent.com/thenets/Easy-CKAN/master/install_easyckan.sh | sudo bash
sudo easyckan install
The Easy CKAN command line is the best way to interact with your CKAN installation.
To run the server in a development enviroment, run:
# Development enviroment
sudo easyckan dev # Avaliable over port 5000
Once you have finished development and are ready to push your changes into a production environment, run:
# Production enviroment
sudo easyckan production # Avaliable over port 80
Replace "my_username" with the username you want.
easyckan exec paster sysadmin add my_username --config=/etc/ckan/default/development.ini
If you want to run custom commands and use bash on CKAN VirtualEnv.
easyckan exec
Enter on psql.
easyckan exec psql -h ckan-postgres -Upostgres
Let's considering you're setuping the production environment from the beggining. In this case, it's better create a clean configuration file. The follow command allow you to do it:
easyckan exec paster make-config ckan /etc/ckan/default/production.ini
Most common problems can be solved with "Have You Tried Turning It Off And On Again?"
The command below restart all Docker containers and create a fresh environment keepin all your CKAN data.
easyckan repair
Another common problem is wrong permission on CKAN dirs and files. To reset to default, run the following command:
sudo chown -R 5000.5000 /usr/lib/ckan/ /etc/ckan/ /var/lib/ckan/
CKAN allow you to create a simple plugin base from a scrath. You need to create the main structure and than compile for development. You can learn more at Customizing CKAN’s templates
First, enter on "virtualenv" and create the base template. Pay attention to change "my_plugin" by your plugin name. It's recommended to keep "ckanext-" prefix.
At the end, build your plugin.
# Enable virtual env and go to plugins dir
easyckan exec
cd /usr/lib/ckan/default/src
# Create the plugin from scratch
paster --plugin=ckan create -t ckanext ckanext-my_plugin
# Build
cd ./ckanext-my_plugin
python setup.py develop
# Close container
exit
Now add the plugin to your config file, on "ckan.plugins = my_plugin ..." at /etc/ckan/default/development.ini
Rebuilds the search index. This is useful to prevent search indexes from getting out of sync with the main database.
# Full rebuild
easyckan exec paster --plugin=ckan search-index rebuild -c /etc/ckan/default/development.ini
# Fast rebuild
easyckan exec paster --plugin=ckan search-index rebuild_fast -c /etc/ckan/default/development.ini
IRC: If you have any question or need support, talk with me at Freenode.net at channel #easyckan. Not need an account, just enter and type "thenets" and I'll answer you if I'm online.
If you have any questions, either raise an issue here on GitHub or send me an email: [email protected]
All files are located on default content. Check CKAN documentation for more information: http://docs.ckan.org/en/latest/maintaining/
/etc/easyckan # EasyCKAN files
/etc/ckan/ # CKAN settings files
/usr/lib/ckan/ # Main CKAN files and plugins/extensions
/var/lib/ckan/ # CKAN upload files
I want to add some additional improvements:
- Feature: Uninstaller
- Feature: Interface plugin installations
- Improvement: Better bash interface
- Plugin: Harvester
- @alersonluz : Help with first installer for Ubuntu
- @mohnjatthews : Improved README documentation
- @timgiles : New plugins installers
- @vladimirghetau : New plugins installers
- @samisnunu : Test for CKAN 2.6
If you want the lastest Easy CKAN version, use following lines to your installation.
!IMPORTANT! This version will most likely contain bugs, so use at your own risk.
You need to instal 'curl' and run the command below.
- For Ubuntu/Debian:
sudo apt-get install -y curl
- For Fedora/CentOS:
sudo yum install -y curl
curl -sSL https://raw.githubusercontent.com/thenets/Easy-CKAN/dev/install_easyckan.sh | sudo bash
sudo easyckan install
sudo easyckan dev