Code Monkey home page Code Monkey logo

easyckan's Introduction

Check the Open Knowledge Foundation project

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.


Build Status

EasyCKAN v2.6 Beta.1

The easiest way to install the CKAN platform.

Compatible with all Linux x64 distros.

Do you still use the legacy version?

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.

Who should use EasyCKAN?

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.

What Is Included In Easy CKAN?

1. Requirements

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.

2. How To Install

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

3. Easy CKAN Command Line

The Easy CKAN command line is the best way to interact with your CKAN installation.

3.1. Start Server - Development Mode

To run the server in a development enviroment, run:

# Development enviroment
sudo easyckan dev # Avaliable over port 5000

3.2. Deploy - Production Mode

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

3.3. Create admin user

Replace "my_username" with the username you want.

easyckan exec paster sysadmin add my_username --config=/etc/ckan/default/development.ini

3.4. Enter on VirtualEnv

If you want to run custom commands and use bash on CKAN VirtualEnv.

easyckan exec

3.5. Enter on PostgreSQL CLI

Enter on psql.

easyckan exec psql -h ckan-postgres -Upostgres

3.6. Create additional config file

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

3.7. Repair

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/

3.8. Create plugin from scratch

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

3.9. Update search index

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

4. Questions? Support?

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]

Where are my files?

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

Todo

I want to add some additional improvements:

  • Feature: Uninstaller
  • Feature: Interface plugin installations
  • Improvement: Better bash interface
  • Plugin: Harvester

Special thanks

  • @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

Developer Installer

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

easyckan's People

Contributors

thenets avatar timgiles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

easyckan's Issues

Issue moving to production

Hi there and thanks for an amazing tool!

I've got CKAN working well in dev and now I want to deploy it to production. I've set up the production ini and run the command sudo easyckan production. After doing so I receive the following error:

docker: Error response from daemon: Conflict. The container name "/ckan-production" is already in use by container "617a50ba7366f5c22e7f0c61152d14beed856a1cc373895cee7e34051c644281". You have to remove (or rename) that container to be able to reuse that name.

I tried sudo easyckan repair but that did not resolve. Recommendations?

No password entry for user 'ckan'

Hi:
I just installed EasyCkan, to try it on (Ubuntu 14.4)
as per the instruction of installation I should then run the command:
sudo easyckan server
but I keep getting the message:

No passwd entry for user 'ckan'

even if I'm root

/usr/lib/ckan folder not created

As above, I dont know why (have not investigated) but the /usr/lib/ckan folder is not being generated. Should be an easy fix.

Harvest error

Hiya,one more error.
I harvested another ckan instance I have running successfully once, the second time i went to harvest the resource it stalled and has been running for 3 days. I don't know how to stop it either.

Problemas relacionados aos scripts

Após o último comitt,ao tentar executar o /easy_ckan ,tem ocorrido o alerta que 👍:
/bin/bash^M: bad interpreter: No such file or directory
com a identificação de erros nas linhas do scrits que estão em branco.
Estou convertendo os scripts por meio do dos2unix.
Mais alguém tem tido esse problema?

Datastore upload error

Hi Luiz,
I receive this error when I manually click to upload data to the datstore: "Error: Process completed but unable to post to result_url"

How to install CKAN plugins from github?

I am trying to get a plugin installed via easyckan and it's not working, I get a one liner "File not found!".

Is it possible to add support in the future releases for plugins that outside the ckan's official list of plugins?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.