Slide 1

Slide 1 text

How we combined CKAN with WordPress Stefan Oderbolz CKANCon 2016 4th October 2016

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Requirements ● Use CKAN for the data catalogue ○ DCAT-AP Switzerland metadata standard ○ Multilingual content ● Arbitrary pages (FAQ, About, Blog) ○ Multilingual content ● Manageable forms (Contact, surveys etc.) ● Harvesting of data in DCAT-AP Switzerland format ● ...

Slide 4

Slide 4 text

Solution: let’s combine CKAN with WordPress ● Loosly coupled: they call each others APIs ● We use Apache as a proxy ○ WordPress runs on port 80 ○ CKAN runs on port 8080 ○ Specific routes are proxied on WordPress ● User management only on WordPress

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Goal: one administration interface ● Our WordPress plugin (soon Open Source!) let’s us manage CKAN entities: ○ Datasets ○ Groups ○ Organizations ○ Harvester ● We save all data in WordPress and make API calls to “sync” them to CKAN ● Form has some usability issues ○ Too long, no possibility to collapse ○ Save button is on the top

Slide 8

Slide 8 text

Intermezzo: What is DCAT-AP? ● DCAT = Data Catalog vocabulary ○ Vocabulary to describe catalogs, dataset and distributions ● AP = Application profile ○ Ruleset of mandatory, optional or conditional fields ● E.g. “DCAT-AP for data portals in Europe” (DCAT-AP EU) is a standard for public sector data in Europe ● DCAT-AP Switzerland is compatible to DCAT-AP EU, but has some additional fields or fields that are currently not used More Information: http://handbook.opendata.swiss/en/library/ch-dcat-ap

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

DCAT-AP XML Import/Export ● Easy transfer from test system to production ● Reference implementation for data owners, transition to DCAT-AP XML harvester

Slide 12

Slide 12 text

Harvester Dashboard ● Manage harvesters from WordPress ● Start, stop & clear harvester jobs ● Indicator of status ● Check the error log of previous jobs

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

APIs are key ● To exchange data between the two systems we use APIs on both sides ● CKAN ○ Standard API calls for CRUD operations on all entities ○ Custom API calls where needed (e.g. dataset count total + per group, to have only one call) ● WordPress ○ Expose WordPress entities as custom API (e.g. “Application”) ○ To increase performance we save some API responses for 10 minutes in Redis (e.g. Dataset count on frontpage)

Slide 16

Slide 16 text

@odi Questions?