library/roles/ckan: Fix the SQLalchemy version, because the newest is not supported by the spatial plugin.

d4science-ghn-cluster: ckan dev, do not install the hierarchy changes.
This commit is contained in:
Andrea Dell'Amico 2016-11-16 15:30:15 +01:00
parent 4036c62ec1
commit ceedd93a0e
2 changed files with 24 additions and 10 deletions

View File

@ -25,6 +25,8 @@ ckan_logdir: /var/log/ckan
ckan_db_name: ckan
ckan_db_user: ckan
# CKAN plugins
ckan_plugins_state: latest
# Order is important
ckan_geonetwork_harvester: False
ckan_ckanext_harvester_url: 'git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest'
@ -81,6 +83,10 @@ ckan_pip_dependencies:
- rdflib
- 'urllib3[secure]'
- bleach
ckan_pip_versioned_dependencies:
- { name: 'SQLAlchemy', version: '0.9.6', state: 'present' }
#
apache_additional_packages:
- libapache2-mod-uwsgi

View File

@ -5,17 +5,24 @@
with_items: '{{ ckan_additional_packages }}'
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
- name: Install some plugins dependencies inside the CKAN virtualenv
- name: Install some python versioned plugins dependencies inside the CKAN virtualenv
become: True
become_user: '{{ ckan_shell_user }}'
pip: name={{ item }} virtualenv={{ ckan_virtenv }} state=latest
pip: name={{ item.name }} virtualenv={{ ckan_virtenv }} version={{ item.version }} state={{ item.state }}
with_items: '{{ ckan_pip_versioned_dependencies }}'
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
- name: Install some python plugins dependencies inside the CKAN virtualenv
become: True
become_user: '{{ ckan_shell_user }}'
pip: name={{ item }} virtualenv={{ ckan_virtenv }} state=present
with_items: '{{ ckan_pip_dependencies }}'
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
- name: Download the CKAN ckanext-harvest plugin
become: True
become_user: '{{ ckan_shell_user }}'
pip: name='{{ ckan_ckanext_harvester_url }}' virtualenv={{ ckan_virtenv }}
pip: name='{{ ckan_ckanext_harvester_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
notify: Restart CKAN
when: ckan_geonetwork_harvester
register: ckanext_harvest_install
@ -24,7 +31,7 @@
- name: Download the CKAN ckanext-harvest requirements
become: True
become_user: '{{ ckan_shell_user }}'
pip: requirements={{ ckan_virtenv }}/src/ckanext-harvest/pip-requirements.txt virtualenv={{ ckan_virtenv }}
pip: requirements={{ ckan_virtenv }}/src/ckanext-harvest/pip-requirements.txt virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
when: ckan_geonetwork_harvester
tags: [ 'ckan', 'geonetwork', 'ckan_plugins' ]
@ -38,16 +45,17 @@
- name: Download the CKAN ckanext-spatial plugin
become: True
become_user: '{{ ckan_shell_user }}'
pip: name='{{ ckan_ckanext_spatial_url }}' virtualenv={{ ckan_virtenv }}
pip: name='{{ ckan_ckanext_spatial_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
notify: Restart CKAN
when: ckan_geonetwork_harvester
register: ckanext_spatial_install
tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ]
# SQL alchemy cannot be too new. Otherwise it will not work against VDM
- name: Download the CKAN ckanext-spatial requirements
become: True
become_user: '{{ ckan_shell_user }}'
pip: requirements={{ ckan_virtenv }}/src/ckanext-spatial/pip-requirements.txt virtualenv={{ ckan_virtenv }}
pip: requirements={{ ckan_virtenv }}/src/ckanext-spatial/pip-requirements.txt virtualenv={{ ckan_virtenv }} state=present
when: ckan_geonetwork_harvester
tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ]
@ -87,7 +95,7 @@
- name: Download the CKAN PDF viewer plugin
become: True
become_user: '{{ ckan_shell_user }}'
pip: name='{{ ckan_ckanext_pdfview_url }}' virtualenv={{ ckan_virtenv }}
pip: name='{{ ckan_ckanext_pdfview_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
when: ckan_pdfview
notify: Restart CKAN
tags: [ 'ckan', 'ckan_pdfview', 'ckan_plugins' ]
@ -95,7 +103,7 @@
- name: Download the CKAN Privatedatasets extension
become: True
become_user: '{{ ckan_shell_user }}'
pip: name='{{ ckan_privatedatasets_url }}' virtualenv={{ ckan_virtenv }}
pip: name='{{ ckan_privatedatasets_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
when: ckan_privatedatasets
notify: Restart CKAN
tags: [ 'ckan', 'ckan_privdatasets', 'ckan_plugins' ]
@ -103,7 +111,7 @@
- name: Download the CKAN hierarchy plugin code
become: True
become_user: '{{ ckan_shell_user }}'
pip: name='{{ ckan_hierarchy_url }}' virtualenv={{ ckan_virtenv }}
pip: name='{{ ckan_hierarchy_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
when: ckan_hierarchy
notify: Restart CKAN
tags: [ 'ckan', 'ckan_hierarchy', 'ckan_plugins' ]
@ -111,7 +119,7 @@
- name: Download the CKAN pages plugin code
become: True
become_user: '{{ ckan_shell_user }}'
pip: name='{{ ckan_pages_url }}' virtualenv={{ ckan_virtenv }}
pip: name='{{ ckan_pages_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
when: ckan_pages
notify: Restart CKAN
tags: [ 'ckan', 'ckan_pages', 'ckan_plugins' ]