ckan 2.0: a deeper look
Internship @ Academia Sinica
Report #2
This work is licensed under a
Creative Commons Attribution-ShareAlike 3.0 Taiwan License.
Presenter: Cheng-Jen Lee (Sol)
Email: u10313335 AT citi.sinica.edu.tw
Aug 5, 2013 2
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migration
●
OpenID & UNIX user auth
Aug 5, 2013 3
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migration
●
OpenID & UNIX user auth
Aug 5, 2013 4
Jetty8/9+solr4
●
For ckanext-spatial
●
IKAnalyzer: 2012FF_fh1
●
Different schema
Aug 5, 2013 5
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migrate to pomelo
●
OpenID & UNIX user auth
Aug 5, 2013 6
ckanext-spatial
●
Geo related plugins for CKAN
●
spatial_metadata
●
Spatial Search Widget
●
Dataset Extent Map
●
WMS Preview
●
GeoJSON Preview
●
CSW Server
●
Spatial Harvesters
Aug 5, 2013 7
Spatial Search Widget
●
Map widget integrated on the
search form
●
Live Demo
Aug 5, 2013 8
Dataset Extent Map
Aug 5, 2013 9
WMS Preview
Aug 5, 2013 10
GeoJSON Prevew
●
a GeoJSON previewer
●
Live Demo
Aug 5, 2013 11
CSW Server
Spatial Harvesters
●
still in investigation
●
CSW Server
– to server metadata from the CKAN instance
●
Spatial Harvesters
– for importing spatial metadata into CKAN
– 3 formats: CSW, WAF, doc
– 3 stages: gather, fetch, import
Aug 5, 2013 12
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migration
●
OpenID & UNIX user auth
Aug 5, 2013 13
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migration
●
OpenID & UNIX user auth
Aug 5, 2013 14
Import/Export
●
Importing Datasets with the CKAN
RESTful API
– request =
urllib2.Request('http://www.my_ckan_site.
com/api/action/package_create')
●
Export: json, csv, and db dump
– paster db ...
– Restore and migration?
Aug 5, 2013 15
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migration
●
OpenID & UNIX user auth
Aug 5, 2013 16
Migration
●
paster db simple-dump-json/csv
– datasets and users cannot be imported
simultaneously
●
paster db dump
– SQLAlchemy error (maybe the version of
PostgreSQL...)
●
Raw db dump
●
Target machine:
– Apache + mod_wsgi OK→
– Sub-url redirection sucks
– PostgreSQL 8.4 (instead of 9.1)
●
postgresql-8.4-postgis is no longer supported
Aug 5, 2013 17
Agenda
●
Jetty8/9+solr4
●
ckanext-spatial
●
ckanext-harvest
●
Import/Export
●
Migration
●
OpenID & UNIX user auth
Aug 5, 2013 18
OpenID
●
No longer supported!
Aug 5, 2013 19
UNIX user auth
●
Data.gov.uk:
– User log-on and credentials are handled by
Drupal
– Drupal provides an internal API for CKAN to
confirm the details
Aug 5, 2013 20
Thanks for your attention!
Any Q?

ckan 2.0: a deeper look

  • 1.
    ckan 2.0: adeeper look Internship @ Academia Sinica Report #2 This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Taiwan License. Presenter: Cheng-Jen Lee (Sol) Email: u10313335 AT citi.sinica.edu.tw
  • 2.
    Aug 5, 20132 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migration ● OpenID & UNIX user auth
  • 3.
    Aug 5, 20133 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migration ● OpenID & UNIX user auth
  • 4.
    Aug 5, 20134 Jetty8/9+solr4 ● For ckanext-spatial ● IKAnalyzer: 2012FF_fh1 ● Different schema
  • 5.
    Aug 5, 20135 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migrate to pomelo ● OpenID & UNIX user auth
  • 6.
    Aug 5, 20136 ckanext-spatial ● Geo related plugins for CKAN ● spatial_metadata ● Spatial Search Widget ● Dataset Extent Map ● WMS Preview ● GeoJSON Preview ● CSW Server ● Spatial Harvesters
  • 7.
    Aug 5, 20137 Spatial Search Widget ● Map widget integrated on the search form ● Live Demo
  • 8.
    Aug 5, 20138 Dataset Extent Map
  • 9.
    Aug 5, 20139 WMS Preview
  • 10.
    Aug 5, 201310 GeoJSON Prevew ● a GeoJSON previewer ● Live Demo
  • 11.
    Aug 5, 201311 CSW Server Spatial Harvesters ● still in investigation ● CSW Server – to server metadata from the CKAN instance ● Spatial Harvesters – for importing spatial metadata into CKAN – 3 formats: CSW, WAF, doc – 3 stages: gather, fetch, import
  • 12.
    Aug 5, 201312 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migration ● OpenID & UNIX user auth
  • 13.
    Aug 5, 201313 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migration ● OpenID & UNIX user auth
  • 14.
    Aug 5, 201314 Import/Export ● Importing Datasets with the CKAN RESTful API – request = urllib2.Request('http://www.my_ckan_site. com/api/action/package_create') ● Export: json, csv, and db dump – paster db ... – Restore and migration?
  • 15.
    Aug 5, 201315 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migration ● OpenID & UNIX user auth
  • 16.
    Aug 5, 201316 Migration ● paster db simple-dump-json/csv – datasets and users cannot be imported simultaneously ● paster db dump – SQLAlchemy error (maybe the version of PostgreSQL...) ● Raw db dump ● Target machine: – Apache + mod_wsgi OK→ – Sub-url redirection sucks – PostgreSQL 8.4 (instead of 9.1) ● postgresql-8.4-postgis is no longer supported
  • 17.
    Aug 5, 201317 Agenda ● Jetty8/9+solr4 ● ckanext-spatial ● ckanext-harvest ● Import/Export ● Migration ● OpenID & UNIX user auth
  • 18.
    Aug 5, 201318 OpenID ● No longer supported!
  • 19.
    Aug 5, 201319 UNIX user auth ● Data.gov.uk: – User log-on and credentials are handled by Drupal – Drupal provides an internal API for CKAN to confirm the details
  • 20.
    Aug 5, 201320 Thanks for your attention! Any Q?

Editor's Notes

  • #12 gather_stage - Aggregates all the remote identifiers for a particular source (ie identifiers for a CSW server, files for a WAF). fetch_stage - Fetches all the remote documents and stores them on the database. import_stage - Performs all the processing for transforming the remote content into a CKAN dataset: validates the document, parses it, converts it to a CKAN dataset dict and saves it in the database.