[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Tue Aug 23 14:20:59 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/d1f7563d9d90/
changeset:   d1f7563d9d90
branch:      feature-1275-solr-search
user:        John Glover
date:        2011-08-23 16:19:44
summary:     [solr] Update docs with info on solr installation and setup
affected #:  3 files (983 bytes)

--- a/doc/configuration.rst	Tue Aug 23 11:20:29 2011 +0100
+++ b/doc/configuration.rst	Tue Aug 23 15:19:44 2011 +0100
@@ -352,26 +352,28 @@
 
  ckan.build_search_index_synchronously=
 
+or::
+
+ ckan.plugins = synchronous_search
+
 Default (if you don't define it)::
  indexing is on
 
 This controls the operation of the CKAN Postgres full text search indexing. If you don't define this option then indexing is on. You will want to turn this off if you want to use a different search engine for CKAN (e.g. Solr). In this case you need to define the option equal to blank (as in the example).
 
-.. _config-search-backend:
+.. index::
+   single: ckan.site_id
 
-search_backend
-^^^^^^^^^^^^^^
-
-.. index::
-   single: search_backend
+ckan.site_id
+^^^^^^^^^^^^
 
 Example::
 
- search_backend = solr
+ ckan.site_id = my_ckan_instance
 
-Default value:  ``sql``
-
-This controls the type of search backend. Currently valid values are ``sql`` (meaning Postgres full text search) and ``solr`` (meaning Solr). If you specify ``sql`` then ensure indexing is on (`build_search_index_synchronously`_ is not defined). If you specify ``solr`` then ensure you specify a `solr_url`_.
+CKAN uses Solr to index and search packages. The search index is linked to the value of the ``ckan.site_id``, so if you have more than one
+CKAN instance using the same `solr_url`_, they will each have a separate search index as long as their ``ckan.site_id`` values are different. If you are only running
+a single CKAN instance then this can be ignored.
 
 .. index::
    single: solr_url


--- a/doc/install-from-source.rst	Tue Aug 23 11:20:29 2011 +0100
+++ b/doc/install-from-source.rst	Tue Aug 23 15:19:44 2011 +0100
@@ -26,7 +26,7 @@
        sudo apt-get install build-essential libxml2-dev libxslt-dev 
        sudo apt-get install wget mercurial postgresql libpq-dev git-core
        sudo apt-get install python-dev python-psycopg2 python-virtualenv
-       sudo apt-get install subversion
+       sudo apt-get install subversion solr-jetty openjdk-6-jdk
 
    Otherwise, you should install these packages from source. 
 
@@ -45,6 +45,7 @@
    build-essential        Tools for building source code (or up-to-date Xcode on Mac)
    git                    `Git source control (for getting MarkupSafe src) <http://book.git-scm.com/2_installing_git.html>`_
    subversion             `Subversion source control (for pyutilib) <http://subversion.apache.org/packages.html>`_
+   solr                   `Search engine <http://lucene.apache.org/solr>`_
    =====================  ===============================================
 
    
@@ -250,7 +251,40 @@
       mkdir data
 
 
-9. Run the CKAN webserver.
+9. Setup Solr.
+
+   Edit the jetty config file (/etc/default/jetty by default on Ubuntu),
+   changing the following:
+
+   ::
+
+       NO_START=0            # (line 4)
+       JETTY_HOST=127.0.0.1  # (line 15)
+
+   Then create a symlink from the schema.xml file in your ckan config
+   directory to the solr directory:
+
+   ::
+    
+       sudo ln -s ~/pyenv/src/ckan/ckan/config/schema.xml /usr/share/solr/config/schema.xml
+
+   Set appropriate values for the ``ckan.site_id`` and ``solr_url`` config variables in your CKAN config file:
+
+   ::
+
+       ckan.site_id=my_ckan_instance
+       solr_url=http://127.0.0.1:8080/solr
+
+   You should now be able to start solr:
+
+   ::
+
+       sudo service jetty start
+
+   For more information on Solr setup and configuration, see the CKAN wiki:
+   http://wiki.ckan.net/Solr_Search
+
+10. Run the CKAN webserver.
 
   NB If you've started a new shell, you'll have to activate the environment
   again first - see step 3.
@@ -261,7 +295,7 @@
 
       paster serve development.ini
 
-10. Point your web browser at: http://127.0.0.1:5000/
+11. Point your web browser at: http://127.0.0.1:5000/
 
     The CKAN homepage should load.
 


--- a/requires/lucid_missing.txt	Tue Aug 23 11:20:29 2011 +0100
+++ b/requires/lucid_missing.txt	Tue Aug 23 15:19:44 2011 +0100
@@ -13,6 +13,8 @@
 -e git+https://github.com/wwaites/autoneg.git@b4c727b164f411cc9d60#egg=autoneg
 # flup>=0.5
 -e hg+http://hg.saddi.com/flup@301a58656bfb#egg=flup
+# solrpy == 0.9.4
+solrpy==0.9.4
 # All the conflicting dependencies from the lucid_conflict.txt file
 -e hg+https://bitbucket.org/okfn/ckan-deps@6287665a1965#egg=ckan-deps
 # FormAlchemy


http://bitbucket.org/okfn/ckan/changeset/6003d6fe9b17/
changeset:   6003d6fe9b17
branch:      feature-1275-solr-search
user:        John Glover
date:        2011-08-23 16:20:50
summary:     [solr] merge with default
affected #:  1 file (1.1 KB)

--- a/doc/authorization.rst	Tue Aug 23 15:19:44 2011 +0100
+++ b/doc/authorization.rst	Tue Aug 23 15:20:50 2011 +0100
@@ -171,10 +171,42 @@
 
 .. _permissions-publisher-mode:
 
-Publisher Mode
+Openness Modes
 --------------
 
-Although the `Data Hub <http://datahub.org>`_ prefers the Wikipedia-style model of allowing anyone to add and improve metadata, some CKAN instances prefer to operate in 'publisher mode'. 
+CKAN instances can be configured to operate in a range of authorization modes, with varying openness to edit. Here are some examples with details of how to set-up and convert between them.
+
+
+1. Anonymous Edit Mode
+++++++++++++++++++++++
+
+Anyone can edit and create packages without logging in. This is the default for CKAN out of the box.
+
+
+2. Logged-in Edit Mode
+++++++++++++++++++++++
+
+You need to log-in and create/edit packages. Anyone can create an account.
+
+To operate in this mode:
+
+1. First, change the visitor (any non-logged in user) rights from being able to create and edit packages to just reading them::
+
+     paster rights make visitor reader system
+     paster rights make visitor reader package:all
+     paster rights remove visitor anon_editor package:all
+     paster rights remove visitor anon_editor system
+
+2. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+
+     ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["editor"]}
+     ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["editor"]}
+     ckan.default_roles.System = {"visitor": ["reader"], "logged_in": ["editor"]}
+     ckan.default_roles.AuthorizationGroup = {"visitor": ["reader"], "logged_in": ["editor"]} 
+
+
+3. Publisher Mode
++++++++++++++++++
 
 This allows edits only from authorized users. It is designed for installations where you wish to limit write access to CKAN and orient the system around specific publishing groups (e.g. government departments or specific institutions).

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list