Git Product home page Git Product logo

ckan-it's Introduction

CKAN-IT - The Italian distribution

Data and open data on forum.italia.it Join the #pdnd-ckan channel Get invited

CKAN is a powerful data management system that makes data accessible – by providing tools to streamline publishing, sharing, finding and using data. This project provides everything you need to run CKAN plus a set of extensions for supporting Italian open data in a set of Docker images.

Any Italian public institution that wants to publish its data in an open format should follow these guidelines: "Linee Guida Nazionali per la Valorizzazione del Patrimonio Informativo Pubblico". Technical details and best practices for data catalogues development and management are contained in these guidelines: "Linee guida per i cataloghi dati". Open data published by Italian public institutions should be compliant to the national metadata profile called DCAT-AP_IT.

CKAN-IT is the Italian official CKAN distribution packaged with plugins and external components that ensure the compliance with DCAT_AP-IT and all the official guidelines mentioned above. Docker technology facilitates installation and deploy in production-ready environments. All third-party repository containing source code of components and plugins are mirrored under /italia Github organization, but maintained by original maintainer and community (ie. CKAN core, solr, postgresql, redis, and ckanext-harvest and -dcat). Only three plugins are directly developed and maintained within CKAN-IT project: ckanext-spatial (fork of the official one), -multilang, and -dcatapit. Read below for more details.

Tools references

The tools used in this repository are

Main components

Plugins references

Maintained plugins:

Official third-party plugins:

How to run CKAN-IT

In this repository, CKAN and its related tools are redistributed as a set of Docker containers interacting with one each other.

The Dockerfile and the docker-compose.yml files are in the root of this repository.

NOTE: the docker-compose.yml file sets different environment variables that could be used to adapt and customized many platform functionalities, read more in "Environment variables" section below.

If you want a CKAN-IT instance up and running in a couple of minutes, follow these steps.

  1. Create and enter an empty folder: mkdir ckan-it && cd ckan-it/ (or use the name you prefer)
  2. Download the docker-compose.yml from here
  3. Pull and run all containers: docker-compose up -d

After a while you can open the CKAN-IT home http://localhost:5000 and login with the provided credentials. You can follow the log stream running docker-compose logs -f (then ctrl+c to exit).

The following default credentials can be used to access the portal (you should change them after the first login).

Username: ckanadmin
Password: ckanpassword

If you only want to run a CKAN-IT instance and use it to manage and publish your own data, you can stop here. In a production environment you can install and setup a proxy server in front of CKAN-IT with https support.

WARNING: all data are stored in Docker named volumes! In a production environment you should mount these volumes on local folders updating the docker-compose configuration accordingly.

To bring down and remove the containers use docker-compose down.

How to build and test CKAN-IT

If you want to build local images instead of pull them from Dockerhub, ie. for testing pourpose, you need some extra steps.

  1. Clone this repo: git clone https://github.com/italia/ckan-it.git (if you want to clone the repo in a folder other than ckan-it/ add the name you want after the previous command, ie. git clone https://github.com/italia/ckan-it.git my_custom_folder)
  2. Enter the created folder: cd ckan-it/ (or the name you have chosen in previous step, ie. cd my_custom_folder/)
  3. Change working branch if needed: git checkout branch-name
  4. Initialize submodules: git submodule update --init --recursive
  5. Build images: docker-compose -f docker-compose.yml -f docker-compose.build.yml build
  6. Run all containers using built images: docker-compose -f docker-compose.yml -f docker-compose.build.yml up -d (if you want to check logs run docker-compose logs -f)

A notice about CKAN customization

This project brings together many components and plugins in a set of Docker images to facilitates installation and deploy. If you already have a running instance of CKAN or if you want to build a custom distribution from scratch you can install and use single plugins following the official documentation.

CKAN-IT harvesting (optional)

CKAN-IT can acts also as an aggregator of data sources, harvesting dataset metadata from external sources. If you want to import data from external sources, follow these additional steps.

WARNING: note that if CKAN_HARVEST variable in docker-compose is not set to "true" no organizations and sources are initially loaded (see below), so you must use the GUI to manually add new organizations and sources of your choice before next steps.

  1. Browse to http://localhost:5000/harvest to check all available sources or add new sources
  2. Identify the name of the CKAN container with docker container ls (ie. italia-ckan-it) and run the following command: docker exec -it italia-ckan-it /ckan-harvest.sh

You can see logs during harvesting import with following command: docker-compose logs -f. You can find more logs in /var/log/ckan folder inside the container.

Run CKAN-IT periodic harvesting

Schedule a CRON job on the host machine to run the /ckan-harvest.sh script at the root of the file system of the CKAN container.

How to do this really depends on how you run the containers. When running containers with docker-compose for instance we did this by getting the container id and using docker-exec to run a command inside the container, as follows: docker exec -it italia-ckan-it /ckan-harvest.sh 2>&1 /var/log/periodic-harvest.out

So you can schedule a periodic run of the above script, ie. every hour, with CRON on the host machine and save logs.

Pre-load organizations and sources

The italia/public-opendata-sources repository contains all sources harvested by the national catalog of the Piattaforma Digitale Nazionale Dati (PDND) - previously DAF.

If you want to import all the official sources provided, simply run CKAN-IT setting the environment variable CKAN_HARVEST="true", ie. docker-compose -f docker-compose.yml -f docker-compose.harvest.yml up -d.

If you want to include them (and others of your choice) in built images (ie. for testing purpose), follow these additional steps:

  1. Check if data/init/harvesters folder exists and fill them with the content of https://github.com/italia/public-opendata-sources (or whatever you want, but be sure that folders and json schemas are the same)
  2. Build images: docker-compose -f docker-compose.yml -f docker-compose.build.yml build
  3. Add CKAN_HARVEST="true" environment variable to the ckan service in docker-compose.yml (ie. see docker-compose.harvest.yml)
  4. Run all containers using built images: docker-compose -f docker-compose.yml -f docker-compose.build.yml up -d (if you want to check logs run docker-compose logs -f)
  5. Wait for organizations and harvest sources loading, then run docker exec -it italia-ckan-it /ckan-harvest.sh
  6. Follow previous section to setup a periodic harvesting

How to export your harvesting sources

Read more here.

Environment variables

The following environment variables are mandatory and should be set in order to deploy CKAN-IT. The docker-compose.yml file in this repository applies some exemplar values, to be used for demos and local tests.

General variables

  • CKAN_DEBUG (format: {"true"|"false"}) - Whether to activate or not the debug log messages. It should always be false for production environments.

  • CKAN_HARVEST (format: {"true"|"false"}) - Whether to activate or not the built-in harvesters. It should be false if you want to only build your own catalog and not harvest external sources.

  • CKAN_SITE_URL - The base URL of your CKAN-IT deployment.

  • CKAN_ADMIN_EMAIL - The email address of the local admin user.

  • CKAN_ADMIN_USERNAME - The user name of the local admin user.

  • CKAN_ADMIN_PASSWORD - The password of the local admin user.

PostgreSQL variables

  • CKAN_DB_HOST - The host name of the CKAN PostgreSQL database.

  • CKAN_DB_PORT - The port of the CKAN PostgreSQL database.

  • CKAN_DB_USER - The user name of the CKAN PostgreSQL database.

  • PGPASSWORD - The password of the CKAN PostgreSQL database.

  • CKAN_SQLALCHEMY_URL (format: {postgresql://{CKAN_DB_USER}:{PGPASSWORD}@{CKAN_DB_HOST}:{CKAN_DB_PORT}/}) - The connection string to your PostgreSQL database.

Redis variables

  • CKAN_REDIS_HOST - The host name of your Redis service.

  • CKAN_REDIS_PORT - The port of your Redis service.

  • CKAN_REDIS_URL (format: redis://{CKAN_REDIS_HOST}:/{CKAN_REDIS_PORT}) - The full address of the Redis service.

Solr variables

  • CKAN_SOLR_HOST - The host name of the Solr service.

  • CKAN_SOLR_PORT - The port of the Solr service.

  • CKAN_SOLR_URL (format: http://{CKAN_SOLR_HOST}:{CKAN_SOLR_PORT}/solr/ckan) - The full URL of the Solr service.

CKAN 2.6.8 extensions reference

  • stats
  • view
    • text_view
    • image_view
    • recline_view
  • datastore
  • spatial (tag 2.6.8-2)
    • spatial_metadata
    • spatial_query
  • harvest (tag v1.1.1)
    • ckan_harvester
  • multilang (tag 2.6.8-2)
    • multilang_harvester
  • dcat (tag v0.0.9)
    • dcat_rdf_harvester
    • dcat_json_harvester
    • dcat_json_interface
  • dcatapit (tag 2.6.8-2)
    • dcatapit_pkg
    • dcatapit_org
    • dcatapit_config
    • dcatapit_harvester
    • dcatapit_csw_harvester
    • dcatapit_harvest_list
    • dcatapit_subcatalog_facets

How to contribute

Contributions are welcome. Feel free to open issues and submit a pull request at any time!

ckan-it's People

Contributors

alranel avatar dgreco avatar etj avatar giux78 avatar gvarisco avatar jenkin avatar libremente avatar lucaprete avatar piersoft avatar randomorder avatar rasky avatar ruphy avatar

Stargazers

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

Watchers

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

ckan-it's Issues

Problemi preview della risorsa

Salve a tutti,
ho installato il pacchetto docker di CKAN in due server diversi.
In entrambi riscontro un problema nel preview delle risorse.
Una volta inserita una risorsa (es. un file csv), se provo a visualizzare il preview, riscontro un "Internal server error".

ckan-1

ckan-2

Analizzando il log, vedo un warning:
WARNI [ckan.lib.maintain] Function _resource_preview() in module ckan.controllers.package has been deprecated and will be removed in a later release of ckan. Resource preview is deprecated. Please use the new resource views

È possibile che abbia mancato oppure che debba cambiare qualcosa nella configurazione del ckan.ini?

Grazie

pull access denied for teamdigitale/daf-ckan-solr, repository does not exist or may require 'docker login'

Hi all

getting the master branch and running docker-compose up -d, I receive:

$ docker-compose up -d
Creating network "datickandocker_default" with the default driver
Creating volume "datickandocker_solrdb" with default driver
Creating volume "datickandocker_ckanlog" with default driver
Creating volume "datickandocker_pgsqldb" with default driver
Pulling solr (teamdigitale/daf-ckan-solr:0.1.0)...
ERROR: pull access denied for teamdigitale/daf-ckan-solr, repository does not exist or may require 'docker login'

is this solved by this PR?

Thank you.

Problema con build ckan

Salve a tutti,

nel fare la build del ckan con comando "docker-compose -f docker-compose.yml -f docker.compose.build.yml build" si blocca con questo errore:

Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
load_entry_point('pip==21.0', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
ERROR: Service 'ckan' failed to build: The command '/bin/sh -c pip install pytz diagnostics' returned a non-zero code: 1

qualcuno sta riscontrando lo stesso problema?

Problems with Datapusher and Datastore

Hi, I've added this to docker-compose.yml:

CKAN_DATASTORE_WRITE_URL : postgresql://ckan:ckan@db/datastore
CKAN_DATASTORE_READ_URL: postgresql://datastore_ro:ckan@db/datastore
CKAN_DATAPUSHER_URL: http://datapusher:8800
DS_RO_PASS: ckan

datapusher:
container_name: datapusher
restart: always
image: clementmouchet/datapusher
ports:
- "8800:8800"

And I've added datastore and datapusher plugins to ckan-entrypoint.sh.
But datapusher and datastore don't work

Datapusher logs:

Job "push_to_datastore (trigger: RunTriggerNow, run = True, next run at: None)" raised an exception
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/apscheduler/scheduler.py", line 512, in _run_job
retval = job.func(*job.args, **job.kwargs)
File "/usr/src/app/datapusher/jobs.py", line 222, in push_to_datastore
resource = get_resource(resource_id, ckan_url, api_key)
File "/usr/src/app/datapusher/jobs.py", line 178, in get_resource
'Authorization': api_key}
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 94, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 49, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 457, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 569, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 407, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))

./init.sh

init lancia un docker exec ma il nome del container sembra sbaggliato. @randomorder @etj forse quel comando non lo devo nemmeno lanciare? E se voglio entrare come admin su ckan user e pass?

versione 2.6.7 ckan docker

Ho provato ad installare il nuovo ckan versione 2.6.7 su docker. Ho un problema legato all'inserimento dei tag finali (Localized Tag Name). Inserisco i valori, salvo ma non si memorizzano. Sapete dirmi qualcosa?
Grazie.

Errori interni nella creazione di un DataSet

Installato il Docker.
Apparentemente sembra Ok, l'ho configurato e compaiono le info, il logo ecc.
Se provo ad aggiungere un dataset, però, vengono visualizzati degli errori, fra cui uno in particolare: "Estensione temporale - errore interno: lista / <type 'dict'>"
Se provo però a cliccare su "aggiungi estensione temporale" il pulsante è disabilitato così come alcuni altri (cerchiati in giallo). C'è quacosa che non è andato per il verso giusto?

v1.pdf

Errore su ckanext.multilang.model.package_multilang durante harvesting

Slave sto testando harvesting su un motore di dati RNDT che abbiamo sviluppato, durante un harvesting di tipo DCAT_AP-IT CSW Harvester ottengo il seguente errore:

2020-03-26 07:34:24,921 INFO  [ckanext.dcatapit.harvesters.csw_harvester] Medatata harvested dataset languages: 'ITA'
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:79: SAWarning: Usage of the 'related attribute set' operation is not currently supported within the execution stage of the flush process. Results may not be consistent.  Consider using alternative event listeners or connection-level operations instead.
  sess._flush_warning("related attribute set")
2020-03-26 07:34:25,055 DEBUG [ckanext.spatial.plugin] Received: '{"type": "Polygon", "coordinates": [[[-20.664783, 36.316963], [64.219734, 36.316963], [64.219734, 70.433136], [-20.664783, 70.433136], [-20.664783, 36.316963]]]}'
2020-03-26 07:34:25,088 DEBUG [ckanext.spatial.lib] Created new extent for package 3a00e6d6-1d10-4a0e-a38f-3745d166ad03
2020-03-26 07:34:25,091 DEBUG [ckanext.dcatapit.interfaces] Creating create_loc_field for package ID: '3a00e6d6-1d10-4a0e-a38f-3745d166ad03'
2020-03-26 07:34:25,096 ERROR [ckanext.multilang.model.package_multilang] Exception occurred while persisting DB objects: (IntegrityError) null value in column "text" violates not-null constraint
DETAIL:  Failing row contains (6, 3a00e6d6-1d10-4a0e-a38f-3745d166ad03, publisher_name, extra, en, null).
 'INSERT INTO package_multilang (package_id, field, field_type, lang, text) VALUES (%(package_id)s, %(field)s, %(field_type)s, %(lang)s, %(text)s) RETURNING package_multilang.id' {'lang': 'en', 'text': None, 'package_id': u'3a00e6d6-1d10-4a0e-a38f-3745d166ad03', 'field': u'publisher_name', 'field_type': 'extra'}

Traceback (most recent call last):
  File "/usr/bin/paster", line 10, in <module>
    sys.exit(run())
  File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 193, in command
    fetch_callback(consumer, method, header, body)
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 407, in fetch_callback
    fetch_and_import_stages(harvester, obj)
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 424, in fetch_and_import_stages
    success_import = harvester.import_stage(obj)
  File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/harvesters/base.py", line 609, in import_stage
    package_id = p.toolkit.get_action('package_create')(context, package_dict)
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 431, in wrapped
    result = _action(context, data_dict, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/action/create.py", line 207, in package_create
    item.after_create(context, data)
  File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/plugin.py", line 305, in after_create
    self.create_loc_field(extra, lang, pkg_dict.get('id'))
  File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/plugin.py", line 468, in create_loc_field
    interfaces.save_extra_package_multilang({'id': pkg_id, 'text': extra.get('value'), 'field': extra.get('key')}, lang, 'extra')
  File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/interfaces.py", line 83, in save_extra_package_multilang
    PackageMultilang.persist(pkg, lang, field_type)
  File "/usr/lib/ckan/default/src/ckanext-multilang/ckanext/multilang/model/package_multilang.py", line 151, in persist
    session.commit()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 768, in commit
    self.transaction.commit()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 370, in commit
    self._prepare_impl()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 339, in _prepare_impl
    self.session.dispatch.before_commit(self.session)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/event/attr.py", line 257, in __call__
    fn(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/model/meta.py", line 73, in before_commit
    session.flush()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1907, in flush
    self._flush(objects)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2025, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1989, in _flush
    flush_context.execute()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 371, in execute
    rec.execute(self)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 524, in execute
    uow
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 64, in save_obj
    mapper, table, insert)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 600, in _emit_insert_statements
    execute(statement, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 727, in execute
    return meth(self, multiparams, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 824, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 954, in _execute_context
    context)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1116, in _handle_dbapi_exception
    exc_info
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 189, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
    context)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 435, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (IntegrityError) null value in column "text" violates not-null constraint
DETAIL:  Failing row contains (6, 3a00e6d6-1d10-4a0e-a38f-3745d166ad03, publisher_name, extra, en, null).
 'INSERT INTO package_multilang (package_id, field, field_type, lang, text) VALUES (%(package_id)s, %(field)s, %(field_type)s, %(lang)s, %(text)s) RETURNING package_multilang.id' {'lang': 'en', 'text': None, 'package_id': u'3a00e6d6-1d10-4a0e-a38f-3745d166ad03', 'field': u'publisher_name', 'field_type': 'extra'}
2020-03-26 07:34:31,827 INFO  [ckanext.multilang.harvesters.multilang] CSW Multilang harvester: extending ISODocument with PT_FreeText
2020-03-26 07:34:32,246 DEBUG [ckanext.spatial.plugin] Setting up the spatial model
2020-03-26 07:34:32,287 DEBUG [ckanext.spatial.model.package_extent] Spatial tables defined in memory
2020-03-26 07:34:32,294 DEBUG [ckanext.spatial.model.package_extent] Spatial tables already exist
2020-03-26 07:34:32,308 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2020-03-26 07:34:32,310 DEBUG [ckanext.harvest.model] Harvest tables already exist
2020-03-26 07:34:32,455 DEBUG [ckanext.harvest.queue] Fetch queue consumer registered

Sto usando il docker-compose.yml attuale.
Dove protrebbe essere il problema?
Grazie a buon lavoro.

Ricerca nei dataset non restituisce nulla

Buon giorno , installando il docker ckan come da guida, la ricerca del dataset via tag funziona dalla home page del ckan ma non dall'interno dell'organizzazione.

Qualsiasi ricerca, fornisce il risultato di "nessun dataset trovato", nonostante i dataset siano presenti.
mentre la stessa ricerca ottiene risultati dalla schermata principale.

Si deve forse abilitare quealche altro plugin ?
Grazie per l'aiuto.

AUTHORS file

Come anche richiesto da #30 è necessario indicare owner, maintainer(s) e contributori del repository. Il file su cui lavorare è in #32 (ispirato a quello di swift).

harvest da rdf non corretto

sto importando a causa spostamento server e provider, il catalogo dati.comune.francavillafontana.br.it

Quando lo realizzai non usai il docker ma l'installazione classica con il plug in dcatap_it.

Ora il nuovo server ha l'ultima versione del Docker e quando facco l'harvesting usando la soluzione rdf (quindi puntando al catalog.rdf del sito si sopra) le importazioni non sono corrette:

  1. il campo Titolare non appare nel Dataset (esce N/A) ma è presente nel nuovo rdf del portale harvestante. non potendolo cambiare (è un campo bloccato nella nuova versione del plugin) non so come fare
  2. tutte le frequenze sono importate come "unknow" quando nell'rdf originale hanno correttamente il valore
  3. i temi sono importati come ECON o Dati Provvisori e non con i valori corretti.

Sto aggiustando a mano tutti i dataset purtroppo.

schermata 2018-04-07 alle 07 59 59

schermata 2018-04-07 alle 08 00 54

errore link RDF ini ckan-init.sh

le ontologie territoriali e delle licenze hanno un link modificato sulla repo AGID delle ontologie e ckan-init.sh va in errore.

tale errore diventa poi Server Error in tutti i dataset perchè non viene caricato più il menu a tendina nella risorsa per la licenza.
Correggere i link:

wget "https://github.com/italia/daf-ontologie-vocabolari-controllati/raw/c998fb435ee77082880b6f98e230ec5273a09e6d/VocabolariControllati/ClassificazioneTerritorio/Istat-Classificazione-08-Territorio.rdf" -O "/tmp/Istat-Classificazione-08-Territorio.rdf"
paster --plugin=ckanext-dcatapit vocabulary load --filename "/tmp/Istat-Classificazione-08-Territorio.rdf" --name regions --config "$CKAN_INI_PATH"

wget "https://raw.githubusercontent.com/italia/daf-ontologie-vocabolari-controllati/50738e7527b44af9c25d75b955f67f927553f51f/VocabolariControllati/Licenze/Licenze.rdf"
-O "/tmp/Licenze.rdf"
paster --plugin=ckanext-dcatapit vocabulary load --filename "/tmp/Licenze.rdf" --name licenses --config "$CKAN_INI_PATH"

valori nel Localized Tag Name

Anche dopo gli aggiornamenti di questi ultimi giorni il ckan ha un problema legato all'inserimento dei tag finali (Localized Tag Name). Inserisco i valori, salvo ma non si memorizzano. Il problema era già presente anche precedentemente a quest'ultimo aggiornamento e avevo aperto una issue apposita. Sapete dirmi qualcosa cortesemente?
Grazie.

Licenza

Potrei chiedere di indicare una licenza per gli script?

Grazie.

Aggiornamento CKAN e passaggio a Python 3.x

Salve,
ho installato un ambiente CKAN usando le vostre linee guida per docker. Fin qui tutto bene ma ho notato che è ancora su Python 2.
Vorrei sapere se questo ambiente è ancora in aggiornamento e se è previsto l'aggiornamento a Python 3 stante l'imminente end of life di Python 2.x

grazie

Inserimento file publiccode.yml

Ciao, apro questa issue per intavolare la discussione relativa alla pubblicazione del software contenuto in questo repo all'interno del nuovo catalogo in Developers Italia in ottemperanza al CAD e alla nuove LG su acquisizione e riuso.
Per far ciò, bisogna realizzare un file publiccode.yml da inserire nella root del repo nel branch master contenente le informazioni che serviranno al crawler per popolare la entry nel catalogo, seguendo queste specifiche.
Aprirò a breve una PR dove vi coinvolgerò come reviewer per rivedere/integrare informazioni che potrebbero sfuggirmi.
Grazie molte 😉
@jenkin

Come installare plugin aggiuntivi

Ciao a tutti. non sono pratico di docker e mi scuso se faccio domande magari banali

ho installato e finalmente ora funziona stabilmente il docker con il ckan dentro. Ero abituato a installare tutti i componenti separatamente e quindi ho visto quello che mancava rispetto alle mie installazioni. Quello che è subito balzato agli occhi (a parte il bug noto del plugin che genera il catalog.rdf stra-segnalato nella issue del dcatap_it), è che manca il plugin per la visualizzazione dei dati geografici. I vari geojson piuttosto che wms ect.
Sono entrato nel docker con docker exec -u 0 -it ckan bash , ho installato il plugin e aggiornato il ckan.ini ma al riavvio mi da errore che non trova il plugin e da lì panico perchè va cancellato il docker ckan e ricostruito purtroppo...

come si fa?
grazie!

upgrade e mantenimento

vorremmo mettere in produzione il docker, ma abbiamo timori sul mantenimento di questo setup docker rispetto ad una installazione ordinaria: quanto praticabile/conveniente pensate sia mantenere aggiornato il software (ckan) entro il docker?

harvesting nuova versione alert

nella versione attuale del docker, se si installa la parte "deprecata" e opzionale dell'harvesting, ho avuto alcuni problemi.
In particolare viene creato un link strano per ogni risorsa che cambia url in dominio/?hosted/nomerisorsa al posto del classico dominio/dataset/risorsa

formato distribuzione risorse errato

Ciao,

ho installato tanti docker in vari portali in produzione senza grandi problemi.
Ma l’altro giorno ho visto che la procedura di installazione ha un bug che prima non c’era: il menu a tendina del formato di distribuzione delle risorse, non ha più i formati classici (csv, xml etc) ma pochi campi non utilizzabili

Accesso da IP e non da localhost

provando a inserire l'ip della macchina per poter accedere via browser, non accetta connessioni.

ho notato che Apache , Ngix non vengono installati nel docker.
E' normale?

Campo Titolare non compilabile

ho provato ad usare questa nuova versione del docker con il nuovo aggiornamento del plugin dcatap_it.

nel backend il campo Titolare (name e IPA) non è valorizzabile. manca proprio lo spazio dove inserire i dati.

schermata 2018-02-25 alle 12 32 58

Un dubbio sull'obiettivo di questo container

Buongiorno,
ho un dubbio "stupido": in #2 @dgreco scrive "Tieni conto che questo progetto serve solo per fare test".

Questo container è pensato per un comune che, avendo al suo interno un sysadmin con competenze di docker e CKAN, voglia mettere in produzione il proprio portale? O è solo per fare test?

Grazie

root_path is not effective

Good afternoon, I'm trying to run the ckan docker container on my server. Since I wanna point my catalog to localhost:5000/ckan/foo (just to try) I edited ckan_entrypoint.sh and added "ckan.root_path = /ckan/{{LANG}}/foo" (Tested also without {{LANG}}).
Result: the home is visible at localhost:5000 but all the links (dataset, organizations, groups, about, etc) correctly point to localhost:5000/ckan.
image

Any advice to solve?

postfix da inserire per recupero password

converrebbe inserire nell'installazione di default la lingua italiana (ho aperto pull request) e anche il postfix modificando quindi il ckan.ini decommentando la riga SMTP.

altrimenti non funziona l'invio del link per il ripristino password in caso di smarrimento.

my5cents

Issue with language

Hi everybody !

I download and configure CKAN with your repository but I can´t change language in the web. Is possible to change ? Someone can hel me please ! I´m searching but I don´t found solution.

Thanks for all.

Best regards.

Attivazione datastore

Ho provato ad attivare il datastore sulla versione rivista rilasciata su github. Per attivarlo nel file di configurazione ckan.ini, inserisco datastore nella voce ckan.plugins e tolgo il commento alle due righe:

ckan.datastore.write_url = postgresql://ckan:ckan@db:5432/datastore

ckan.datastore.read_url = postgresql://datastore:datastore@db:5432/datastore

Il risultato è che mi va in crash il container ckan per mancata connessione al container postgres. In pratica non mi parte più il container.
Sapreste dirmi qualcosa?
Grazie.

problemi con harvesting al riavvio

ciao a tutti. dopo aver installato l'immagine in un docker sul mio mac, aver settato un harvesting andato a buon fine da varie source (sia con catalog.rdf che direttamente sulla url del ckan remoto), ho riavviato la VM con il docker e l'istanza ckan non sale più:

2017-10-01 19:18:07,605 DEBUG [ckanext.harvest.queue] pika connection using {'retry_delay': 2.0, 'frame_max': 10000, 'channel_max': 0, 'locale': 'en_US', 'socket_timeout': 0.25, 'ssl': False, 'host': 'localhost', 'ssl_options': {}, 'virtual_host': '/', 'heartbeat': 0, 'credentials': <pika.credentials.PlainCredentials object at 0x7fdff8256110>, 'backpressure_detection': False, 'port': 5672, 'connection_attempts': 1}
2017-10-01T19:18:07.619042789Z 
2017-10-01 19:18:07,614 ERROR [pika.adapters.base_connection] socket error: Connection refused
2017-10-01 19:18:07,615 WARNI [pika.adapters.base_connection] Could not connect due to "Connection refused," retrying in 2 sec
2017-10-01 19:18:07,615 ERROR [pika.adapters.base_connection] Could not connect: Connection refused
Traceback (most recent call last):
  File "/usr/local/bin/paster", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 189, in command
    consumer = get_fetch_consumer()
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 468, in get_fetch_consumer
    consumer = get_consumer(get_fetch_queue_name(), fetch_routing_key)
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 250, in get_consumer
    connection = get_connection()
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 38, in get_connection
    return get_connection_amqp()
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 61, in get_connection_amqp
    return pika.BlockingConnection(parameters)
  File "/usr/local/lib/python2.7/dist-packages/pika/adapters/base_connection.py", line 61, in __init__
    super(BaseConnection, self).__init__(parameters, on_open_callback)
  File "/usr/local/lib/python2.7/dist-packages/pika/connection.py", line 513, in __init__
    self._connect()
  File "/usr/local/lib/python2.7/dist-packages/pika/connection.py", line 804, in _connect
    self._adapter_connect()
  File "/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 138, in _adapter_connect
    super(BlockingConnection, self)._adapter_connect()
  File "/usr/local/lib/python2.7/dist-packages/pika/adapters/base_connection.py", line 120, in _adapter_connect
    self.params.retry_delay)
pika.exceptions.AMQPConnectionError: 2.0
Traceback (most recent call last):
  File "/usr/local/bin/paster", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 329, in loadapp
    **kw)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 48, in make_app
    **app_conf)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/pylons_app.py", line 113, in make_pylons_stack
    who_parser.parse(open(app_conf['who.config_file']))
IOError: [Errno 2] No such file or directory: '/etc/ckan/default/who.ini'

ho provato più volte, poi mi sono arreso. suggerimenti?

aggiornamento: ho chiuso l'interfaccia grafica kitematic, ho spento la VM, riavviata e poi da riga di comando rilanciato il docker-compose up -d e ora sta reggendo. Ma temo che se riapro l'interfaccia grafica o riavvio, il problema potrebbe sussistere. a voi

come far partire ckan docker

seguire il readme e eseguire tutti i comandi, una volta terminato il docher ckan lo troverete in stato exit (docker ps -a).
lanciando il comando docker ps -a troverete l'id del container di ckan che è in stato exit.
copiate l'id del container e inseritelo nel comando docker container start ID ( inserite al posto di ID l'id del container )
A questo punto il container salirà correttamente.
il problema è dovuto dal fatto che al momento dell'avvio di ckan il db di postgress non è ancora salito, di conseguenza la dipendenza funzionale di ckan non è rispettata

API per associare licenze a risorse

Buongiorno, nelle API "standard" di CKAN non sembra prevista la possibilità di associare una licenza a una risorsa https://docs.ckan.org/en/2.8/api/#ckan.logic.action.create.resource_create

La licenza è però un elemento obbligatorio del profilo DCAT-AP_IT.

In questa versione di CKAN del Team Digitale/AgID è stata aggiunta la possibilità di associare via API una licenza a una risorsa?

Lo chiedo perché un comando come

curl -H'Authorization: xxxx' \
'http://mysite/api/3/action/resource_create' \
--form package_id=testpackage \
--form description="descrizione" \
--form format=csv \
--form name="test" \
--form created="2019-06-27T09:27:03.840700" \
--form last_modified="2019-10-29T14:48:02.422579" \
--form [email protected] \
--form distribution_format="CSV" \
--form license_id=cc-by

non associa la licenza cc-by alla risorsa; quella associata è la licenza di default (che credo sia una generica "dominio pubblico").

Grazie

Errore installazione su Ubuntu 17.04

Sto provando a seguire l'installazione del package Dati-Ckan-Docker su un Ubuntu 17.04.. ma non riesco a completare l'ultima compose..

Ho seguito le istruzioni.. tutto bene sino a quando (ultimo comando) lancio il comando docker-compose up -d

marco@marco-LIFEBOOK-E752:~/dati-ckan-docker$ docker-compose up -d

Pulling solr (daf-ckan-solr:1.0.0)...
Pulling repository docker.io/library/daf-ckan-solr
ERROR: Error: image library/daf-ckan-solr:1.0.0 not found

Riprovato tante volte. Suggerimenti?

Issue load vocabolary

hi,
I'm trying to install docker image but when i execute the command .
docker exec -ti /ckan-init.sh

the following error message appears:

File "/usr/bin/paster", line 11, in
sys.exit(run())
File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/commands/dcatapit.py", line 151, in command
self.load()
File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/commands/dcatapit.py", line 214, in load
load_subthemes(theme_map, eurovoc)
File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/model/subtheme.py", line 282, in load_subthemes
Subtheme.map_themes(themes_g, eurovoc_g)
File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/model/subtheme.py", line 211, in map_themes
cls.add_for_theme(eurovoc_g, theme, sub_theme)
File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/model/subtheme.py", line 146, in add_for_theme
theme_tag = ThemeToSubtheme.get_tag(theme)
File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/model/subtheme.py", line 69, in get_tag
raise ValueError("No tag for {}".format(name))
ValueError: No tag for AGRI

can you help me?

Aggiornare DCATAP_IT

Sul github di Geosolutions che ha sviluppato il plugin per il DCAT_AP_IT ci sono tante patch rispetto alla versione inclusa nel docker. sono anche patch fondamentali per la creazione del catalog.rdf

Dovreste aggiornare la versione del plugin inclusa nel docker.

Tracking

Ciao,

ho cercato di implementare il tracking delle pagine ma non riesco a lanciare un crontab periodico da dentro il docker. E' una funzionalità molto utile averla .

help.

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.