
ckanext-linked-storage
CKAN extension enabling files accessible via a mounted network share to be created as dataset resources with CKAN acting as a proxy.
Requirements
Compatibility with core CKAN versions:
| CKAN version |
Compatible? |
| 2.8 and earlier |
not tested |
| 2.9 |
yes |
Installation
To install ckanext-linked-storage:
- Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
- Clone the source and install it on the virtualenv:
git clone https://github.com/USEPA/ckanext-linked-storage.git
cd ckanext-linked-storage
pip install -e .
Add linked_storage to the ckan.plugins setting in your CKAN
config file (by default the config file is located at /etc/ckan/default/ckan.ini).
Add storage locations via ckanext.linked_storage.mountpoints and
ckanext.linked_storage.net_paths in the CKAN config file
Restart CKAN
Adding resources using linked storage
To create a resource using this functionality via the API call resource_create with url_type = 'link-storage' and
provide the path to the resource either as the url or link_path. An example can be seen below:
resource_create(package_id='some package', name='a linked resource package', url_type='link-storage', link_path="\\some-host\share\linked_file.csv" )
Config settings
To connect resources using the linked storage system the available mounted resources need to be defined. This is done using two of the configuration inputs.